Пример #1
0
    protected override void Awake()
    {
        base.Awake();
        s_instance                   = this;
        this.m_CurrentSubScene       = null;
        this.m_TransitionOutSubScene = null;
        AdventureConfig config = AdventureConfig.Get();

        config.OnAdventureSceneAwake();
        config.AddSubSceneChangeListener(new AdventureConfig.SubSceneChange(this.OnSubSceneChange));
        config.AddSelectedModeChangeListener(new AdventureConfig.SelectedModeChange(this.OnSelectedModeChanged));
        config.AddAdventureModeChangeListener(new AdventureConfig.AdventureModeChange(this.OnAdventureModeChanged));
        this.m_StartupAssetLoads++;
        bool @bool = Options.Get().GetBool(Option.HAS_SEEN_NAXX);

        if (!@bool)
        {
            this.m_StartupAssetLoads++;
        }
        this.LoadSubScene(config.GetCurrentSubScene(), new AssetLoader.GameObjectCallback(this.OnFirstSubSceneLoaded));
        if (!@bool)
        {
            SoundManager.Get().Load("VO_KT_INTRO_39");
            AssetLoader.Get().LoadGameObject("KT_Quote", new AssetLoader.GameObjectCallback(this.OnKTQuoteLoaded), null, false);
        }
        Options.Get().SetBool(Option.BUNDLE_JUST_PURCHASE_IN_HUB, false);
        if (ApplicationMgr.IsInternal())
        {
            CheatMgr.Get().RegisterCheatHandler("advdev", new CheatMgr.ProcessCheatCallback(this.OnDevCheat), null, null, null);
        }
        this.InitializeAllDefs();
    }
Пример #2
0
    private void Awake()
    {
        AdventureConfig config = AdventureConfig.Get();

        config.AddAdventureMissionSetListener(new AdventureConfig.AdventureMissionSet(this.OnMissionSelected));
        config.AddSubSceneChangeListener(new AdventureConfig.SubSceneChange(this.OnSubsceneChanged));
        if (this.m_rewardsChest != null)
        {
            this.m_rewardsChest.AddEventListener(UIEventType.ROLLOVER, e => this.ShowCardRewards());
            this.m_rewardsChest.AddEventListener(UIEventType.ROLLOUT, e => this.HideCardRewards());
        }
    }