public void Spawn() { if (GameCenter.player_money >= 1000) { GameCenter.is_loss = true; GameCenter.player_money -= 1000; print("SpawnPerfabCOntroller, current index:" + GameCenter.current_piece_index); NetworkSpawner.Spawn(this, prefabs[GameCenter.current_piece_index]); // UPDATE PIECE INDEX GameCenter.current_piece_index += 1; GameCenter.is_spawn = true; if (GameCenter.current_piece_index >= 7) { GameCenter.current_piece_index = 6; } } }
public void Spawn() { NetworkSpawner.Spawn(this, Prefab); }