public static void UseLife() { RestoreHP(); Lives--; if (Lives <= 0) { GameplayInfo.OpenLastStage(); } else { SceneManager.LoadScene(SceneManager.GetActiveScene().name); } }
void Start() { fade.FadeIn(); //Audio SoundManager.instance.PlayBGM(BGM); SoundManager.instance.PlayBGS(BGS); //Salva o progresso GameplayInfo.MaxLevelUnlock = levelAtual; GameplayInfo.LastStageUnlock = stageAtual; GameplayInfo.SaveProgress(); //Dialogos if (RandomTextsPlayer.Count > 0) { InvokeRepeating("TextPlayer", DelayPlayer, RepeatPlayer); } if (RandomTextsBoss.Count > 0) { InvokeRepeating("TextBoss", DelayBoss, RepeatBoss); } }