Ejemplo n.º 1
0
        public override void RefreshTile(Vec3I gridPos, TM.ITilemap tilemap)
        {
            Vec2I pos     = GridToTile(gridPos);
            Vec2I subTile = GridToSubTile(gridPos);

            Map.BBTile tile = GetTile(pos);

            if (!disableRefresh || HasSprite(tile, pos, subTile))
            {
                tilemap.RefreshTile(gridPos);
            }

            if (disableRefresh)
            {
                return;
            }

            for (int tx = 0; tx < 2; ++tx)
            {
                for (int ty = 0; ty < 2; ++ty)
                {
                    Vec2I t = pos + new Vec2I(tx + subTile.x - 1, ty + subTile.y - 1);
                    if (t != pos)
                    {
                        t *= 2;
                        for (int i = 0; i < 4; ++i)
                        {
                            tilemap.RefreshTile(new Vec3I(t.x + (i >> 1), t.y + (i % 2), 0));
                        }
                    }
                }
            }
        }
Ejemplo n.º 2
0
 public override void RefreshTile(Vector3Int location, ITilemap tileMap)
 {
     for (int yd = -1; yd <= 1; yd++)
     {
         for (int xd = -1; xd <= 1; xd++)
         {
             Vector3Int position = new Vector3Int(location.x + xd, location.y + yd, location.z);
             if (TileValue(tileMap, position))
             {
                 tileMap.RefreshTile(position);
             }
         }
     }
 }
Ejemplo n.º 3
0
 public override void RefreshTile(Vector3Int position, ITilemap tilemap)
 {
     GeneratePatterns();
     for (int y = -1; y <= 1; y++)
     {
         for (int x = -1; x <= 1; x++)
         {
             var location = new Vector3Int(position.x + x, position.y + y, position.z);
             if (TileValue(tilemap, position))
             {
                 tilemap.RefreshTile(position);
             }
         }
     }
 }
Ejemplo n.º 4
0
 public override void RefreshTile(Vector3Int location, ITilemap tileMap)
 {
     for (int yd = -1; yd <= 1; yd++)
     {
         for (int xd = -1; xd <= 1; xd++)
         {
             var position = new Vector3Int(location.x + xd, location.y + yd, location.z);
             var tile     = tileMap.GetTile(position);
             if (tile == this)
             {
                 tileMap.RefreshTile(position);
             }
         }
     }
 }
Ejemplo n.º 5
0
 public override void RefreshTile(Vector3Int position, ITilemap tilemap)
 {
     tilemap.RefreshTile(position);
 }
Ejemplo n.º 6
0
 public virtual void RefreshTile(Vector3Int position, ITilemap tilemap)
 {
     tilemap.RefreshTile(position);
 }