Example #1
0
    // 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));
    }