Example #1
0
        public EntityPainting(TypedEntity e)
            : base(e)
        {
            EntityPainting e2 = e as EntityPainting;

            if (e2 != null)
            {
                _xTile  = e2._xTile;
                _yTile  = e2._yTile;
                _zTile  = e2._zTile;
                _dir    = e2._dir;
                _motive = e2._motive;
            }
        }
Example #2
0
 public static EntityPainting.DirectionType RotatePortrait(EntityPainting.DirectionType dtData, int intRotation)
 {
     switch (intRotation)
     {
         case 1:
             switch (dtData)
             {
                 case EntityPainting.DirectionType.NORTH: return EntityPainting.DirectionType.WEST;
                 case EntityPainting.DirectionType.EAST: return EntityPainting.DirectionType.NORTH;
                 case EntityPainting.DirectionType.SOUTH: return EntityPainting.DirectionType.EAST;
                 case EntityPainting.DirectionType.WEST: return EntityPainting.DirectionType.SOUTH;
                 default: Debug.Fail("Painting rotation"); break;
             }
             return dtData;
         case 2:
             switch (dtData)
             {
                 case EntityPainting.DirectionType.NORTH: return EntityPainting.DirectionType.EAST;
                 case EntityPainting.DirectionType.EAST: return EntityPainting.DirectionType.SOUTH;
                 case EntityPainting.DirectionType.SOUTH: return EntityPainting.DirectionType.WEST;
                 case EntityPainting.DirectionType.WEST: return EntityPainting.DirectionType.NORTH;
                 default: Debug.Fail("Painting rotation"); break;
             }
             return dtData;
         case 3:
             switch (dtData)
             {
                 case EntityPainting.DirectionType.NORTH: return EntityPainting.DirectionType.SOUTH;
                 case EntityPainting.DirectionType.EAST: return EntityPainting.DirectionType.WEST;
                 case EntityPainting.DirectionType.SOUTH: return EntityPainting.DirectionType.NORTH;
                 case EntityPainting.DirectionType.WEST: return EntityPainting.DirectionType.EAST;
                 default: Debug.Fail("Painting rotation"); break;
             }
             return dtData;
         default:
             //Debug.Fail("Painting rotated to default");
             return dtData;
     }
 }