Beispiel #1
0
 public bool isTheSameAs(Tile compTile)
 {
     if (compTile == null)
     {
         return(false);
     }
     if (this.sTileHeader != compTile.sTileHeader)
     {
         return(false);
     }
     if (this.active())
     {
         if (this.type != compTile.type)
         {
             return(false);
         }
         if (Main.tileFrameImportant[this.type] && (this.frameX != compTile.frameX || this.frameY != compTile.frameY))
         {
             return(false);
         }
     }
     if (this.wall != compTile.wall || this.liquid != compTile.liquid)
     {
         return(false);
     }
     if (compTile.liquid == 0)
     {
         if (this.wallColor() != compTile.wallColor())
         {
             return(false);
         }
         if (this.wire4() != compTile.wire4())
         {
             return(false);
         }
     }
     else if (this.bTileHeader != compTile.bTileHeader)
     {
         return(false);
     }
     return(true);
 }
Beispiel #2
0
        public bool isTheSameAs(Tile compTile)
        {
            if (compTile == null || (int)this.sTileHeader != (int)compTile.sTileHeader || this.active() &&
                ((int)this.type != (int)compTile.type || Main.tileFrameImportant[(int)this.type] &&
                 ((int)this.frameX != (int)compTile.frameX || (int)this.frameY != (int)compTile.frameY)) ||
                ((int)this.wall != (int)compTile.wall || (int)this.liquid != (int)compTile.liquid))
            {
                return(false);
            }
            if (compTile.liquid == (byte)0)
            {
                if ((int)this.wallColor() != (int)compTile.wallColor() || this.wire4() != compTile.wire4())
                {
                    return(false);
                }
            }
            else if ((int)this.bTileHeader != (int)compTile.bTileHeader)
            {
                return(false);
            }

            return(true);
        }