Esempio n. 1
0
 // Use this for initialization
 void Awake()
 {
     playerTarget = GameObject.Find ("PlayerTarget");
     playerHealth = (PlayerHealth) playerTarget.GetComponent(typeof(PlayerHealth));
     playerScore = (PlayerScore) playerTarget.GetComponent (typeof (PlayerScore));
     spawnSphere = GameObject.Find ("Spawner Sphere");
     spawner = (SpawnParticles) spawnSphere.GetComponent(typeof(SpawnParticles));
 }
Esempio n. 2
0
 void ResumeGameMechanic()
 {
     handleCollision.enabled = true;
     startMenu.enabled = false;
     particles = GameObject.FindGameObjectsWithTag("Respawn");
     foreach(GameObject particle in particles) {
         particle.GetComponent<ParticleScript>().TurnOn ();
     }
     spawner = GameObject.Find ("Spawner Sphere");
     spawnerScript = (SpawnParticles) spawner.GetComponent(typeof(SpawnParticles));
     spawnerScript.Pause ();
     GameObject playerTarget = GameObject.Find ("PlayerTarget");
     PlayerHealth playerHealth = (PlayerHealth) playerTarget.GetComponent (typeof (PlayerHealth));
     playerHealth.RestartGame();
 }