예제 #1
0
 void BeginObjective()
 {
     Debug.Log("Objective " + currentObjective + " Begin");
     objectiveIcon.GetComponent <ObjectiveIconController>().followingObjective = objectives[currentObjective];
     //changing the parent won't change the scale, but since children will inherit
     //the scale of parents, resetting the scale will make the icon scale correctly
     //based on parent size
     objectiveIcon.transform.localScale = Vector3.Scale(objectiveIconScale, objectives[currentObjective].transform.localScale);
     foreach (GameObject factory in enemyFactories[currentObjective])
     {
         factory.GetComponent <EnemyFactory>().SpawnNewEnemy();
     }
     gameHUD.StartObjectiveMessage(currentObjective, objectiveMessages[currentObjective], instructionTimeout);
 }