示例#1
0
        public override void OnActivate(int pinID)
        {
            if (pinID != 100 || ((Behaviour)this).get_enabled())
            {
                return;
            }
            string str = (string)null;

            switch (this.SceneType)
            {
            case FlowNode_LoadScene.SceneTypes.HomeTown:
                SectionParam homeWorld = HomeUnitController.GetHomeWorld();
                if (homeWorld != null)
                {
                    str = homeWorld.home;
                    break;
                }
                break;

            case FlowNode_LoadScene.SceneTypes.BootScene:
                FlowNode_LoadScene.LoadBootScene();
                this.ActivateOutputLinks(21);
                return;

            default:
                str = this.SceneName;
                break;
            }
            if (string.IsNullOrEmpty(str))
            {
                DebugUtility.LogError("No Scene to load");
            }
            else
            {
                ((Behaviour)this).set_enabled(true);
                CriticalSection.Enter(CriticalSections.SceneChange);
                this.ActivateOutputLinks(20);
                DebugUtility.Log("LoadScene [" + str + "]");
                if (AssetManager.IsAssetBundle(str))
                {
                    this.StartCoroutine(this.PreLoadSceneAsync(str));
                }
                else
                {
                    this.StartSceneLoad(str);
                }
            }
        }
示例#2
0
        protected override void Start()
        {
            CriticalSection.Enter(CriticalSections.SceneChange);
            SectionParam homeWorld = HomeUnitController.GetHomeWorld();

            if (homeWorld == null)
            {
                Debug.LogError((object)"home world is null.");
            }
            else
            {
                UnitData unitDataByUnitId = MonoSingleton <GameManager> .Instance.Player.FindUnitDataByUnitID(homeWorld.unit);

                if (unitDataByUnitId == null)
                {
                    Debug.LogError((object)("ホーム画面用ユニットが存在しません '" + homeWorld.unit + "'"));
                }
                else
                {
                    this.SetupUnit(unitDataByUnitId, -1);
                    base.Start();
                }
            }
        }
示例#3
0
        public void Activated(int pinID)
        {
            if (99 <= pinID && pinID < 122)
            {
                TrophyState[] trophyStates = MonoSingleton <GameManager> .Instance.Player.TrophyStates;
                if (trophyStates != null)
                {
                    for (int index = 0; index < trophyStates.Length; ++index)
                    {
                        if (trophyStates[index].IsCompleted)
                        {
                            TrophyParam trophy = MonoSingleton <GameManager> .Instance.MasterParam.GetTrophy(trophyStates[index].iname);

                            if (trophy != null)
                            {
                                GameCenterManager.SendAchievementProgress(trophy.iname);
                            }
                        }
                    }
                }
                if (this.mDesirdSceneSet)
                {
                    return;
                }
                // ISSUE: object of a compiler-generated type is created
                // ISSUE: variable of a compiler-generated type
                HomeWindow.\u003CActivated\u003Ec__AnonStorey251 activatedCAnonStorey251 = new HomeWindow.\u003CActivated\u003Ec__AnonStorey251();
                // ISSUE: reference to a compiler-generated field
                activatedCAnonStorey251.desiredSceneName = (string)null;
                bool flag1 = false;
                bool flag2 = GlobalVars.ForceSceneChange;
                GlobalVars.ForceSceneChange = false;
                if (pinID == 99)
                {
                    SectionParam homeWorld = HomeUnitController.GetHomeWorld();
                    if (homeWorld != null)
                    {
                        // ISSUE: reference to a compiler-generated field
                        activatedCAnonStorey251.desiredSceneName = homeWorld.home;
                        flag1 = true;
                    }
                }
                else
                {
                    // ISSUE: reference to a compiler-generated field
                    activatedCAnonStorey251.desiredSceneName = this.SceneNames[pinID - 100];
                    // ISSUE: reference to a compiler-generated field
                    if (activatedCAnonStorey251.desiredSceneName == "world001")
                    {
                        // ISSUE: reference to a compiler-generated field
                        activatedCAnonStorey251.desiredSceneName = "world001_sg";
                    }
                }
                // ISSUE: reference to a compiler-generated method
                if (Array.FindIndex <string>(this.IgnoreSameSceneCheck, new Predicate <string>(activatedCAnonStorey251.\u003C\u003Em__29C)) != -1)
                {
                    flag2 = true;
                }
                // ISSUE: reference to a compiler-generated field
                // ISSUE: reference to a compiler-generated field
                if (string.IsNullOrEmpty(activatedCAnonStorey251.desiredSceneName) || !flag2 && !(this.mLastSceneName != activatedCAnonStorey251.desiredSceneName) || !MonoSingleton <GameManager> .Instance.PrepareSceneChange())
                {
                    return;
                }
                this.mDesirdSceneSet = true;
                // ISSUE: reference to a compiler-generated field
                this.mDesiredSceneName   = activatedCAnonStorey251.desiredSceneName;
                this.mDesiredSceneIsHome = flag1;
                if ((MonoSingleton <GameManager> .Instance.Player.TutorialFlags & 1L) == 0L)
                {
                    GameManager instance = MonoSingleton <GameManager> .Instance;
                    if (!this.mDesiredSceneIsHome)
                    {
                        // ISSUE: reference to a compiler-generated field
                        if (activatedCAnonStorey251.desiredSceneName == "Home_Gacha")
                        {
                            if (instance.GetNextTutorialStep() != "ShowSummonButton")
                            {
                                this.mDesirdSceneSet = false;
                            }
                        }
                        else
                        {
                            // ISSUE: reference to a compiler-generated field
                            if (activatedCAnonStorey251.desiredSceneName == "Home_UnitList")
                            {
                                if (instance.GetNextTutorialStep() != "ShowUnitButton")
                                {
                                    this.mDesirdSceneSet = false;
                                }
                            }
                            else
                            {
                                // ISSUE: reference to a compiler-generated field
                                if (activatedCAnonStorey251.desiredSceneName == "world001_sg")
                                {
                                    if (instance.GetNextTutorialStep() != "ShowStoryButton")
                                    {
                                        this.mDesirdSceneSet = false;
                                    }
                                }
                                else
                                {
                                    this.mDesirdSceneSet = false;
                                    return;
                                }
                            }
                        }
                    }
                }
                this.mIgnorePopups = !this.mDesiredSceneIsHome;
                if (!this.mDesiredSceneIsHome)
                {
                    return;
                }
                FlowNode_PlayBGM.PlayHomeBGM();
            }
            else
            {
                switch (pinID)
                {
                case 12:
                    this.mFadingOut = false;
                    break;

                case 30:
                    if (this.RestoreScenes == null)
                    {
                        break;
                    }
                    GlobalVars.IsTutorialEnd = true;
                    if (HomeWindow.mRestorePoint != RestorePoints.Home)
                    {
                        if (!this.IsNotHomeBGM())
                        {
                            FlowNode_PlayBGM.PlayHomeBGM();
                        }
                        for (int index = 0; index < this.RestoreScenes.Length; ++index)
                        {
                            if (this.RestoreScenes[index].Type == HomeWindow.mRestorePoint)
                            {
                                this.Activated(100 + this.RestoreScenes[index].Index);
                                return;
                            }
                        }
                    }
                    this.Activated(99);
                    break;

                case 1002:
                    this.mStateMachine.GotoState <HomeWindow.State_Tutorial>();
                    break;
                }
            }
        }
示例#4
0
        public void Activated(int pinID)
        {
            if (99 <= pinID && pinID < 129)
            {
                if (this.mDesirdSceneSet)
                {
                    return;
                }
                string desiredSceneName = (string)null;
                bool   flag1            = false;
                bool   flag2            = GlobalVars.ForceSceneChange;
                GlobalVars.ForceSceneChange = false;
                if (pinID == 99)
                {
                    SectionParam homeWorld = HomeUnitController.GetHomeWorld();
                    if (homeWorld != null)
                    {
                        desiredSceneName = homeWorld.home;
                        flag1            = true;
                    }
                }
                else
                {
                    desiredSceneName = this.SceneNames[pinID - 100];
                }
                if (Array.FindIndex <string>(this.IgnoreSameSceneCheck, (Predicate <string>)(scene => scene.Equals(desiredSceneName))) != -1)
                {
                    flag2 = true;
                }
                if (!string.IsNullOrEmpty(desiredSceneName) && (flag2 || this.mLastSceneName != desiredSceneName))
                {
                    if (!MonoSingleton <GameManager> .Instance.PrepareSceneChange())
                    {
                        return;
                    }
                    this.SceneChangeSendLog(this.mDesiredSceneName, desiredSceneName);
                    this.mDesirdSceneSet     = true;
                    this.mDesiredSceneName   = desiredSceneName;
                    this.mDesiredSceneIsHome = flag1;
                    this.mIgnorePopups       = !this.mDesiredSceneIsHome;
                    GlobalVars.SetDropTableGeneratedTime();
                }
                else
                {
                    if (!UnityEngine.Object.op_Inequality((UnityEngine.Object)GameObject.Find("EventQuest"), (UnityEngine.Object)null))
                    {
                        return;
                    }
                    GlobalEvent.Invoke("UPDATE_EVENT_LIST", (object)this);
                }
            }
            else
            {
                switch (pinID)
                {
                case 12:
                    this.mFadingOut = false;
                    break;

                case 30:
                    if (this.RestoreScenes == null)
                    {
                        break;
                    }
                    GlobalVars.IsTutorialEnd = true;
                    if (HomeWindow.mRestorePoint != RestorePoints.Home)
                    {
                        if (!this.IsNotHomeBGM())
                        {
                            FlowNode_PlayBGM.PlayHomeBGM();
                        }
                        for (int index = 0; index < this.RestoreScenes.Length; ++index)
                        {
                            if (this.RestoreScenes[index].Type == HomeWindow.mRestorePoint)
                            {
                                this.Activated(100 + this.RestoreScenes[index].Index);
                                return;
                            }
                        }
                    }
                    this.Activated(99);
                    break;

                case 1001:
                    this.mRankmatchRewarded = true;
                    break;

                case 2001:
                    HomeWindow.BeginnerNotified = true;
                    break;
                }
            }
        }