Exemple #1
0
 void Start()
 {
     GameManager.registerPlanetSpawner(gameObject);
     totalPoints = 0;
     foreach (Wave wave in waves)
     {
         foreach (EnemyTypeAmmount enemyAmmount in wave.enemies)
         {
             GameObject   enemyPrefab  = GameManager.enemyPrefabManager.getPrefab(enemyAmmount.type);
             EnemySpawned enemySpawned = enemyPrefab.GetComponent <EnemySpawned>();
             int          costPerUnit  = enemySpawned.pointsCost;
             totalPoints += (costPerUnit * enemyAmmount.ammount);
         }
     }
     planetCorruption = GetComponent <PlanetCorruption> ();
 }
 protected override void initialize()
 {
     planetSpawnerManager = GetComponent<PlanetSpawnerManager> ();
     planetCorruption = GetComponent<PlanetCorruption> ();
     planetEventsManager = GetComponent<PlanetEventsManager> ();
 }
 protected override void initialize()
 {
     planetSpawnerManager = GetComponent <PlanetSpawnerManager> ();
     planetCorruption     = GetComponent <PlanetCorruption> ();
     planetEventsManager  = GetComponent <PlanetEventsManager> ();
 }
 void Start()
 {
     GameManager.registerPlanetSpawner (gameObject);
     totalPoints = 0;
     foreach(Wave wave in waves){
         foreach(EnemyTypeAmmount enemyAmmount in wave.enemies){
             GameObject enemyPrefab = GameManager.enemyPrefabManager.getPrefab(enemyAmmount.type);
             EnemySpawned enemySpawned= enemyPrefab.GetComponent<EnemySpawned>();
             int costPerUnit = enemySpawned.pointsCost;
             totalPoints+= (costPerUnit * enemyAmmount.ammount);
         }
     }
     planetCorruption = GetComponent<PlanetCorruption> ();
 }