void InitConsequencesPanel() { Skinning.ResetSkin(selectedSkin); if (consequencesManager == null) { Debug.LogError(debuguableInterface.debugLabel + "ConsequencesManager component shouldn't be null. If we can't get scene references we can't do anything."); } EnemyBundle bundle = gameData.enemyContent.Find(item => { return(item.enemy == actualEnemy); }); CombatDialogue selectedCombat = bundle.combatDialogue; string textToShow = string.Empty; switch (selectedCombat.actualState) { case GameData.GameState.GAME_OVER_GENERAL: textToShow = bundle.combatDialogue.playerLoseGeneralConsequence; break; case GameData.GameState.GAME_OVER_FINISHER: textToShow = bundle.combatDialogue.playerLoseFinalConsequence; break; default: textToShow = bundle.combatDialogue.playerWinConsequence; break; } consequencesManager.Init( selectedCombat.actualState, (int)actualEnemy, () => panelManager.JumpTo(GamePhase.END, () => { endManager = FindObjectOfType <EndManager>(); audioProjectManager.FadeMusicOut(); }), () => panelManager.JumpTo(GamePhase.SHOGUN, () => { shogunManager = FindObjectOfType <ShogunManager>(); shogunManager.PreInit( selectedCombat.actualState, gameData.enemyContent.Find(item => { return(item.enemy == actualEnemy); }).shogunDialogue, AddClueToPlayer ); audioProjectManager.FadeMusicOut(); }), () => panelManager.JumpTo(GamePhase.FIGHT, () => { fightManager = FindObjectOfType <FightManager>(); fightManager.PreInit(selectedCombat); audioProjectManager.FadeMusicOut(); }), () => actualEnemy++, textToShow ); }
// called when we get to the intro panel void InitIntroPanel() { Skinning.ResetSkin(selectedSkin); if (introManager == null) { Debug.LogError(debuguableInterface.debugLabel + "IntroManager component shouldn't be null. If we can't get scene references we can't do anything."); return; } introManager.Init( useCheats, () => panelManager.JumpTo(GamePhase.SHOGUN, () => { shogunManager = FindObjectOfType <ShogunManager>(); shogunManager.PreInit( GameState.NORMAL, gameData.enemyContent.Find(item => { return(item.enemy == actualEnemy); }).shogunDialogue, AddClueToPlayer ); audioProjectManager.FadeMusicOut(); })); }