Пример #1
0
 void Awake()
 {
     if (_instance == null)
     {
         _instance = this;
     }
     else if (_instance != this)
     {
         Destroy(this);
     }
 }
Пример #2
0
        void PlaceCoins(Coordinate deadEnd)
        {
            var treasurePositions = RoomSearch.FloodSearch(tileTypeMap, width, deadEnd.ToPosition(width, height), TileType.Walkable, TileType.SpikeTrap);

            TreasureChest.Spawn(treasurePositions, width);
        }