private bool canSpawn() { bool flag = false; if (MyTile != null && !MyTile.IsOccupied(TileLayer)) { flag = true; } return(flag); }