Example #1
0
 public void disableShip(GameObject enemie)
 {
     if (enemie.gameObject.activeSelf == true)
     {
         CatchAnimalAndRun cacthScript = enemie.transform.GetComponent <CatchAnimalAndRun> ();
         if (cacthScript != null)
         {
             cacthScript.releaseAnimal();
             score_handler.sum_score(5);
         }
         //sounds.sound_explotion.Play ();
         effectFireworks.simulateFireworkIn(enemie.transform.position);
         enemie.SetActive(false);
     }
 }
Example #2
0
    void escape()
    {
        if (sound_handler.sound_escape.isPlaying == true)
        {
            sound_handler.sound_escape.Stop();
        }
        sound_handler.sound_escape.Play();

        //Destroy (this.gameObject);
        this.gameObject.SetActive(false);
        destroyScript();
        Destroy(animal_tochase);
        ScoreHandlerVecinosInvasores score_handler = FindObjectOfType <ScoreHandlerVecinosInvasores> ();

        score_handler.sum_score(-8);
    }