Пример #1
0
 // Start is called before the first frame update
 void Start()
 {
     //aqui llamaremos las animacion del jugador, al igual que localizar los componentes del UImngr para poder actualizar las vidas.
     animator  = GetComponent <Animator>();
     UiManager = GameObject.Find("UIMngr").GetComponent <UIMngr>();
     if (UiManager != null)
     {
         UiManager.ActualizarVidas(Jugadorvida);
     }
 }
Пример #2
0
    bool playedSound;           // make sure the win sound only get's played once.

    // Use this for initialization
    void Start()
    {
        playedSound = false;
        ui          = UIMngr.Instance;
        mngr        = GameObject.FindObjectOfType <AudioManager>();
    }
Пример #3
0
 //Ensure the instance is removed when the game is closed
 void OnApplicationQuit()
 {
     instance = null;
 }