void InitFightPanel() { Skinning.ResetSkin(selectedSkin); if (fightManager == null) { Debug.LogError(debuguableInterface.debugLabel + "FightManager 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; actualTutorial.Init(() => { fightManager.Init( useCheats, bundle.punchlines, bundle.shogunDialogue, audioProjectManager, () => { panelManager.JumpTo(GamePhase.CONSEQUENCES, () => consequencesManager = FindObjectOfType <ConsequencesManager>()); audioProjectManager.FadeMusicOut(1); } ); }); }
// called when we get to the shogun panel void InitShogunPanel() { Skinning.ResetSkin(selectedSkin); if (shogunManager == null) { Debug.LogError(debuguableInterface.debugLabel + "ShogunManager component shouldn't be null. If we can't get scene references we can't do anything."); return; } EnemyBundle bundle = gameData.enemyContent.Find(item => { return(item.enemy == actualEnemy); }); GeneralDialogue selectedGeneral = bundle.shogunDialogue; selectedGeneral.Init(); CombatDialogue selectedCombat = bundle.combatDialogue; shogunManager.Init(useCheats, () => { popupManager.Pop(GamePopup.SHOGUN_DEDUCTION); audioProjectManager.FadeMusicOut(); }, audioProjectManager.FadePopupMusicIn); popupManager.GetPopupFromType <ShogunPopup>().SpecificInit( useCheats, selectedGeneral.GetAllClues(), selectedGeneral.unlockableConclusions, shogunManager.characters, selectedGeneral.goodDeityFeedback, selectedGeneral.badDeityFeedback, () => { popupManager.CancelPop(); audioProjectManager.FadeMusicIn(); }, () => { audioProjectManager.FadeMusicOut(); audioProjectManager.FadePopupMusicOut(); panelManager.JumpTo(GamePhase.FIGHT, () => { fightManager = FindObjectOfType <FightManager>(); fightManager.PreInit(selectedCombat); audioProjectManager.FadeMusicOut(); }); }, selectedCombat.actualState ); if (selectedCombat.actualState == GameState.NORMAL) { gameData.ResetPlayerClues(); } actualTutorial.Init(() => shogunManager.StartDialogue(selectedGeneral)); }
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 ); }
void InitEnd() { Skinning.ResetSkin(selectedSkin); if (endManager == null) { Debug.LogError(debuguableInterface.debugLabel + "EndManager component shouldn't be null. If we can't get scene references we can't do anything."); } endManager.Init(); }
// called when we get to the title panel void InitTitlePanel() { Skinning.ResetSkin(selectedSkin); if (titleManager == null) { Debug.LogError(debuguableInterface.debugLabel + "TitleManager component shouldn't be null. If we can't get scene references we can't do anything."); return; } titleManager.Init( () => panelManager.JumpTo(GamePhase.INTRO, () => { introManager = FindObjectOfType <IntroManager>(); audioProjectManager.FadeMusicOut(); }), () => Application.Quit() ); }
// 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(); })); }