void Awake()
 {
     if (_instance == null)
     {
         _instance = this;
     }
     else if (_instance != this)
     {
         Destroy(this);
     }
 }
Esempio n. 2
0
        void PlaceCoins(Coordinate deadEnd)
        {
            var treasurePositions = RoomSearch.FloodSearch(tileTypeMap, width, deadEnd.ToPosition(width, height), TileType.Walkable, TileType.SpikeTrap);

            TreasureChest.Spawn(treasurePositions, width);
        }