Esempio n. 1
0
 public TileOrientation.sTileOrientation GetRotated(TileOrientation.sTileOrientation Orientation)
 {
     TileOrientation.sTileOrientation orientation2;
     orientation2.SwitchedAxes = this.SwitchedAxes ^ Orientation.SwitchedAxes;
     if (Orientation.SwitchedAxes)
     {
         if (Orientation.ResultXFlip)
         {
             orientation2.ResultXFlip = !this.ResultYFlip;
         }
         else
         {
             orientation2.ResultXFlip = this.ResultYFlip;
         }
         if (Orientation.ResultYFlip)
         {
             orientation2.ResultYFlip = !this.ResultXFlip;
             return orientation2;
         }
         orientation2.ResultYFlip = this.ResultXFlip;
         return orientation2;
     }
     if (Orientation.ResultXFlip)
     {
         orientation2.ResultXFlip = !this.ResultXFlip;
     }
     else
     {
         orientation2.ResultXFlip = this.ResultXFlip;
     }
     if (Orientation.ResultYFlip)
     {
         orientation2.ResultYFlip = !this.ResultYFlip;
         return orientation2;
     }
     orientation2.ResultYFlip = this.ResultYFlip;
     return orientation2;
 }
Esempio n. 2
0
 public void Tile_Add(int TileNum, TileOrientation.sTileDirection TileOutwardOrientation, uint Chance)
 {
     this.Tiles = (sTileOrientationChance[]) Utils.CopyArray((Array) this.Tiles, new sTileOrientationChance[this.TileCount + 1]);
     this.Tiles[this.TileCount].TextureNum = TileNum;
     this.Tiles[this.TileCount].Direction = TileOutwardOrientation;
     this.Tiles[this.TileCount].Chance = Chance;
     this.TileCount++;
     this.TileChanceTotal += (int) Chance;
 }
Esempio n. 3
0
 public TileOrientation.sTileDirection GetRotated(TileOrientation.sTileOrientation Orientation)
 {
     TileOrientation.sTileDirection direction2;
     if (Orientation.SwitchedAxes)
     {
         if (Orientation.ResultXFlip)
         {
             direction2.X = (byte) (2 - this.Y);
         }
         else
         {
             direction2.X = this.Y;
         }
         if (Orientation.ResultYFlip)
         {
             direction2.Y = (byte) (2 - this.X);
             return direction2;
         }
         direction2.Y = this.X;
         return direction2;
     }
     if (Orientation.ResultXFlip)
     {
         direction2.X = (byte) (2 - this.X);
     }
     else
     {
         direction2.X = this.X;
     }
     if (Orientation.ResultYFlip)
     {
         direction2.Y = (byte) (2 - this.Y);
         return direction2;
     }
     direction2.Y = this.Y;
     return direction2;
 }