//Restarts game public IEnumerator RestartGame(bool manual) { Debug.Log("Reinicio"); ended = true; score = 0; RestartUI(); //RestoreBonus(); bs.RestoreAll(); if (!manual) { yield return(new WaitForSeconds(1.3f)); } StopAllCoroutines(); RestartMovement(); cc.RestartCamera(); ch.ActivateBoost(false); }
public void UseNitro() { if (boost.Count > 0) { boostBackup.Add(boost[0]); boost.RemoveAt(0); StartCoroutine(pm.UseNitro()); ch.UpdateBoost(boost.Count); } if (boost.Count == 0) { ch.ActivateBoost(false); } }