void Start()
 {
     scene = Scene.Scene01;
     primaryBar = GetComponent<PrimaryBar>();
     secondaryBar = GetComponent<SecondaryBar>();
     characterController = GetComponent<MainCharacterController>();
     if (scene.Equals(Scene.Scene01))
     {
         secondaryBar.HasBar = true;
         secondaryBar.setopcao(2);
         StartCoroutine(CheckCharacterPhysicalCondition());
     }
     else if (scene.Equals(Scene.Scene02))
     {
         GrabTorch();
         secondaryBar.HasBar = true;
         secondaryBar.setopcao(1);
         StartCoroutine(CheckCharacterBodyTemperature());
     }
     else
     {
         secondaryBar.HasBar = false;
     }
     object[] obj = GameObject.FindObjectsOfType(typeof(Entity));
     foreach (object o in obj) {
         Entity e = (Entity) o;
         e.SetMainCharacter(this.gameObject);
         listOfEnemies.Add(e);
         e.enabled = true;
     }
 }
Ejemplo n.º 2
0
 void Start()
 {
     Time.timeScale = 1;
     primaryBar = GetComponent<PrimaryBar>();
     secondaryBar = GetComponent<SecondaryBar>();
     characterController = GetComponent<MainCharacterController>();
     secondaryBar.HasBar = true;
     secondaryBar.setopcao(2);
     StartCoroutine(CheckCharacterPhysicalCondition());
     object[] obj = GameObject.FindObjectsOfType(typeof(Entity));
     foreach (object o in obj) {
         Entity e = (Entity) o;
         e.SetMainCharacter(this.gameObject);
         listOfEnemies.Add(e);
     }
     myScore = GetComponent<Score>();
     myScore.SetScore(0);
     StartCoroutine(ActivateEnemies());
 }