public void SpawnPlayer(PlayerController player) { if (player == null) { return; } player.gameObject.SetActive(false); VFXSpawn v = Instantiate(VFXSpawnPrefabs, player.transform.position, Quaternion.identity); player.Spawning(); v.OnCompleteVFX += player.BeginInRound; }
public Enemy SpawnEnemy(Enemy Prefab, Vector3 position) { Enemy enemy = Instantiate(Prefab, position, Quaternion.identity); if (VFXSpawnPrefabs == null) { Debug.Log("Không có VFXSpawn, không thể spawn enemy"); enemy.gameObject.SetActive(true); } else { VFXSpawn v = Instantiate(VFXSpawnPrefabs, position, Quaternion.identity); enemy.Spawning(); v.OnCompleteVFX += enemy.BeginInRound; } return(enemy); }