IEnumerator EndBattle() { if (state == BattleState.WON) { screenHUD.writeLog("You win\n"); yield return(new WaitForSeconds(1f)); screenHUD.writeLog("You leveled up!\n"); playerUnit.unitLevel++; if (playerUnit.unitLevel % 2 == 0) { screenHUD.writeLog("You gain 1 more damage\n"); playerUnit.damage++; } else { screenHUD.writeLog("You gain 5 more health\n"); playerUnit.maxHP += 5; playerUnit.currentHP += 5; } yield return(new WaitForSeconds(2f)); if (enemyUnit.unitName == "Circlo") { animator.reproduceCutscene(Mid); animator.fadeExit(4); } else if (enemyUnit.unitName == "SS08") { animator.reproduceCutscene(Ending); bl.resetAccess(); animator.fadeExit(4); } else { animator.fadeExit(2); } } else if (state == BattleState.LOST) { screenHUD.writeLog("You lose"); yield return(new WaitForSeconds(2f)); if (enemyUnit.unitName == "Rectanguler" || enemyUnit.unitName == "Circlo") { animator.reproduceCutscene(Defeat1); animator.fadeExit(4); } else { animator.reproduceCutscene(Defeat2); animator.fadeExit(4); } bl.resetAccess(); //SceneManager.LoadScene(0); } CombatHistory.instance.Clear(); }
public void loadBattle(Enemy eventEnemy) { if (access[battleId] == 1) { BattleInfoBridge.instance.SetEnemy(eventEnemy); if (battleId != access.Length - 1) { access[battleId + 1] = 1; } access[battleId] = 0; FadeLoader.fadeExit(3); } }
IEnumerator executeIntro() { yield return(new WaitForSeconds(3f)); bl.fadeExit(1); }
public void ExitCutscene() { bl.fadeExit(nextScene); }