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