// 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); } }
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>(); }
//Ensure the instance is removed when the game is closed void OnApplicationQuit() { instance = null; }