private void Update() { if (this.mMutex == null) { return; } this.mMutex.WaitOne(); bool flag = this.mResult != 0; this.mMutex.ReleaseMutex(); if (!flag) { return; } this.mMutex.Close(); this.mMutex = (Mutex)null; if (this.mResult < 0) { DebugUtility.LogError("Failed to load MasterParam"); } ((Behaviour)this).set_enabled(false); CriticalSection.Leave(CriticalSections.Default); MonoSingleton <GameManager> .Instance.MasterParam.DumpLoadedLog(); this.ActivateOutputLinks(100); }
private void Start() { if (UnityEngine.Object.op_Inequality((UnityEngine.Object) this.Input, (UnityEngine.Object)null)) { // ISSUE: method pointer ((UnityEvent <string>) this.Input.get_onValueChanged()).AddListener(new UnityAction <string>((object)this, __methodptr(OnInputFieldChange))); } if (this.ExtraInput != null) { // ISSUE: object of a compiler-generated type is created // ISSUE: variable of a compiler-generated type UIValidator.\u003CStart\u003Ec__AnonStorey2B9 startCAnonStorey2B9 = new UIValidator.\u003CStart\u003Ec__AnonStorey2B9(); // ISSUE: reference to a compiler-generated field startCAnonStorey2B9.\u003C\u003Ef__this = this; foreach (InputField inputField in this.ExtraInput) { // ISSUE: reference to a compiler-generated field startCAnonStorey2B9.i = inputField; // ISSUE: reference to a compiler-generated field // ISSUE: method pointer ((UnityEvent <string>)startCAnonStorey2B9.i.get_onValueChanged()).AddListener(new UnityAction <string>((object)startCAnonStorey2B9, __methodptr(\u003C\u003Em__287))); } } this.UpdateInteractable(CriticalSection.GetActive()); }
public void OnMultiMaintenance() { ((Behaviour)this).set_enabled(false); CriticalSection.Leave(CriticalSections.SceneChange); Network.RemoveAPI(); this.ActivateOutputLinks(4); }
private void Init() { GameManager instanceDirect = MonoSingleton <GameManager> .GetInstanceDirect(); GameManager gameManager; if (Object.op_Inequality((Object)instanceDirect, (Object)null)) { Object.DestroyImmediate((Object)instanceDirect); gameManager = (GameManager)null; } CriticalSection.ForceReset(); SRPG_TouchInputModule.UnlockInput(true); PunMonoSingleton <MyPhoton> .Instance.Disconnect(); UIUtility.PopCanvasAll(); AssetManager.UnloadAll(); AssetDownloader.Reset(); AssetDownloader.ResetTextSetting(); Network.Reset(); gameManager = MonoSingleton <GameManager> .Instance; GameUtility.ForceSetDefaultSleepSetting(); if (GameUtility.IsStripBuild) { GameUtility.Config_UseAssetBundles.Value = true; } LocalizedText.UnloadAllTables(); }
public override void OnActivate(int pinID) { if (!GameUtility.Config_UseAssetBundles.Value) { this.ActivateOutputLinks(this.PINID_NOT_EXIST); } else if (pinID == this.PINID_CHECK) { if (this.IsExist()) { this.ActivateOutputLinks(this.PINID_EXIST); } else { this.ActivateOutputLinks(this.PINID_NOT_EXIST); } } else { if (pinID != this.PINID_DELETE) { return; } CriticalSection.Enter(CriticalSections.Default); this.StartCoroutine(this.DeleteOldData()); } }
public override void Update() { if (this.mAsyncOp != null) { if (this.mAsyncOp.canBeActivated) { this.mAsyncOp.ActivateScene(); } if (!this.mAsyncOp.isDone) { return; } if (this.FadeIn) { GameUtility.FadeIn(this.FadeInTime); } CriticalSection.Leave(CriticalSections.SceneChange); this.mAsyncOp = (SceneRequest)null; } else { if (this.WaitFadeIn && GameUtility.IsScreenFading && this.FadeIn) { return; } this.ActivateNext(); } }
public void UnlockContents() { if (!this.mDesiredSceneIsHome || this.mDesirdSceneSet || ((CriticalSection.GetActive() & CriticalSections.SceneChange) != (CriticalSections)0 || !PlayerPrefs.HasKey("lastplv")) || !PlayerPrefs.HasKey("lastviplv")) { return; } PlayerData player = MonoSingleton <GameManager> .Instance.Player; int num1 = PlayerPrefs.GetInt("lastplv"); int lv = player.Lv; int num2 = PlayerPrefs.GetInt("lastviplv"); int vipRank = player.VipRank; if (num1 >= lv && num2 >= vipRank) { return; } foreach (UnlockParam unlock in MonoSingleton <GameManager> .Instance.MasterParam.Unlocks) { if ((unlock.PlayerLevel == 0 || num1 < unlock.PlayerLevel && unlock.PlayerLevel <= lv) && (unlock.VipRank == 0 || num2 < unlock.VipRank && unlock.VipRank <= vipRank)) { NotifyList.PushContentsUnlock(unlock); } } PlayerPrefs.SetInt("lastplv", lv); PlayerPrefs.SetInt("lastviplv", vipRank); LevelLock.UpdateLockStates(); }
public override void OnActivate(int pinID) { if (pinID != 0 || ((Behaviour)this).get_enabled()) { return; } this.mResult = 0; if (GameUtility.Config_UseAssetBundles.Value) { ((Behaviour)this).set_enabled(true); CriticalSection.Enter(CriticalSections.Default); FlowNode_LoadMasterParam.ThreadStartParam threadStartParam = new FlowNode_LoadMasterParam.ThreadStartParam(); threadStartParam.self = this; threadStartParam.GameManager = MonoSingleton <GameManager> .Instance; threadStartParam.Language = GameUtility.Config_Language; Debug.Log((object)"Starting Thread"); this.mMutex = new Mutex(); new Thread(new ParameterizedThreadStart(FlowNode_LoadMasterParam.LoadMasterDataThread)).Start((object)threadStartParam); } else { ((Behaviour)this).set_enabled(false); this.ActivateOutputLinks(100); } }
private void StartGachaScene(FlowNode_ExecGacha.GachaModes mode) { CriticalSection.Enter(CriticalSections.SceneChange); this.mGachaMode = mode; this.mGachaResultSet = false; ((Behaviour)this).set_enabled(true); this.StartCoroutine(this.StartGachaSceneAsync(mode)); }
public void FgGIDLoginCheck() { if (!this.mDesiredSceneIsHome || this.mDesirdSceneSet || ((CriticalSection.GetActive() & CriticalSections.SceneChange) != (CriticalSections)0 || MonoSingleton <GameManager> .Instance.AuthStatus != ReqFgGAuth.eAuthStatus.Synchronized)) { return; } MonoSingleton <GameManager> .Instance.Player.OnFgGIDLogin(); }
public void OnMismatchVersion() { ((Behaviour)this).set_enabled(false); CriticalSection.Leave(CriticalSections.SceneChange); Network.RemoveAPI(); Network.ResetError(); this.ActivateOutputLinks(3); }
private void Start() { if (UnityEngine.Object.op_Inequality((UnityEngine.Object) this.Input, (UnityEngine.Object)null)) { // ISSUE: method pointer ((UnityEvent <string>) this.Input.get_onValueChanged()).AddListener(new UnityAction <string>((object)this, __methodptr(OnInputFieldChange))); } this.UpdateInteractable(CriticalSection.GetActive()); }
private void OnGachaSceneLoad(GameObject scene) { this.mGachaScene = (GachaScene)scene.GetComponent <GachaScene>(); if (UnityEngine.Object.op_Inequality((UnityEngine.Object) this.mGachaScene, (UnityEngine.Object)null)) { SceneAwakeObserver.RemoveListener(new SceneAwakeObserver.SceneEvent(this.OnGachaSceneLoad)); } CriticalSection.Leave(CriticalSections.SceneChange); }
public override void OnActivate(int pinID) { switch (pinID) { case 200: if (Network.Mode != Network.EConnectMode.Online) { this.Failure(); break; } ((Behaviour)this).set_enabled(true); this.ExecRequest((WebAPI) new ReqMultiPlayResume((long)GlobalVars.BtlID, new Network.ResponseCallback(((FlowNode_Network)this).ResponseCallback))); break; case 201: PunMonoSingleton <MyPhoton> .Instance.IsMultiPlay = true; CriticalSection.Enter(CriticalSections.SceneChange); this.mStartingQuest = MonoSingleton <GameManager> .Instance.FindQuest(GlobalVars.SelectedQuestID); if (!string.IsNullOrEmpty(this.QuestID)) { GlobalVars.SelectedQuestID = this.QuestID; GlobalVars.SelectedFriendID = string.Empty; } if (FlowNode_MultiPlayResume.BtlInfo == null) { break; } MyPhoton instance = PunMonoSingleton <MyPhoton> .Instance; if (Object.op_Inequality((Object)instance, (Object)null)) { instance.IsMultiPlay = true; instance.IsMultiVersus = this.mType == FlowNode_MultiPlayResume.RESUME_TYPE.VERSUS; } this.StartCoroutine(this.StartScene(new BattleCore.Json_Battle() { btlinfo = (BattleCore.Json_BtlInfo)FlowNode_MultiPlayResume.BtlInfo, btlid = (long)GlobalVars.BtlID })); break; case 202: if (Network.Mode != Network.EConnectMode.Online) { this.Failure(); break; } ((Behaviour)this).set_enabled(true); this.ExecRequest((WebAPI) new ReqVersusResume((long)GlobalVars.BtlID, new Network.ResponseCallback(((FlowNode_Network)this).ResponseCallback))); break; default: base.OnActivate(pinID); break; } }
public override void OnActivate(int pinID) { if (pinID != 0 || ((Behaviour)this).get_enabled()) { return; } ((Behaviour)this).set_enabled(true); CriticalSection.Enter(CriticalSections.SceneChange); this.StartCoroutine(this.StartScene(MonoSingleton <GameManager> .Instance.FindQuest((string)GlobalVars.ReplaySelectedQuestID))); }
public bool Error() { if (!Network.IsError) { return(false); } if (Network.ErrCode == Network.EErrCode.NotExist_tower) { if (this.mResume) { GlobalVars.BtlID.Set(this.btlID); CriticalSection.Leave(CriticalSections.SceneChange); Network.RequestResult = Network.RequestResults.Back; if (Network.IsImmediateMode) { return(true); } Network.RemoveAPI(); Network.ResetError(); ((Behaviour)this).set_enabled(false); this.ActivateOutputLinks(7); return(true); } this.OnFailed(); return(true); } Network.EErrCode errCode = Network.ErrCode; switch (errCode) { case Network.EErrCode.UnSelectable: this.OnBack(); return(true); case Network.EErrCode.OutOfDateQuest: this.OnBack(); return(true); case Network.EErrCode.ChallengeLimit: this.OnBack(); return(true); default: if (errCode != Network.EErrCode.QuestEnd) { if (errCode != Network.EErrCode.NoBtlInfo) { return(TowerErrorHandle.Error((FlowNode_Network)this)); } this.OnFailed(); return(true); } this.OnFailed(); return(true); } }
public override void OnActivate(int pinID) { if (pinID != 0 || ((Behaviour)this).get_enabled()) { return; } CriticalSection.Enter(CriticalSections.Default); ((Behaviour)this).set_enabled(true); this.StartCoroutine(this.ClearCacheAsync()); this.ActivateOutputLinks(100); }
private void OnInputFieldChange(string value, InputField input) { for (int startIndex = 0; startIndex < value.Length; ++startIndex) { if (this.IsEmoji(value[startIndex])) { input.set_text(value.Remove(startIndex)); break; } } this.UpdateInteractable(CriticalSection.GetActive()); }
public void OnSceneAwake(GameObject scene) { SceneReplay component = (SceneReplay)scene.GetComponent <SceneReplay>(); if (!Object.op_Inequality((Object)component, (Object)null)) { return; } CriticalSection.Leave(CriticalSections.SceneChange); SceneAwakeObserver.RemoveListener(new SceneAwakeObserver.SceneEvent(this.OnSceneAwake)); component.StartQuest(this.mQuestParam.iname); }
public void OnSceneAwake(GameObject scene) { SceneBattle component = (SceneBattle)scene.GetComponent <SceneBattle>(); if (!UnityEngine.Object.op_Inequality((UnityEngine.Object)component, (UnityEngine.Object)null)) { return; } CriticalSection.Leave(CriticalSections.SceneChange); CriticalSection.Leave(CriticalSections.SceneChange); SceneAwakeObserver.RemoveListener(new SceneAwakeObserver.SceneEvent(this.OnSceneAwake)); component.StartQuest(this.Quest.iname, this.InitData); }
private void OnButtonEvent(bool isForce, object obj) { if (!isForce && ((CriticalSection.GetActive() & this.CSMask) != (CriticalSections)0 || UnityEngine.Object.op_Inequality((UnityEngine.Object)HomeWindow.Current, (UnityEngine.Object)null) && HomeWindow.Current.IsSceneChanging)) { return; } if (this.DoLock) { ButtonEvent.Lock(this.LockKey); } FlowNode_ButtonEvent.currentValue = obj; this.ActivateOutputLinks(1); }
public void OnVersusNoPlayer() { MyPhoton instance = PunMonoSingleton <MyPhoton> .Instance; if (UnityEngine.Object.op_Inequality((UnityEngine.Object)instance, (UnityEngine.Object)null) && instance.IsOldestPlayer()) { instance.OpenRoom(true, false); } ((Behaviour)this).set_enabled(false); CriticalSection.Leave(CriticalSections.SceneChange); Network.RemoveAPI(); this.ActivateOutputLinks(2); }
public override void OnActivate(int pinID) { MonoSingleton <GameManager> .Instance.AudienceMode = false; if (pinID == 10) { this.mResume = true; pinID = 0; } if (pinID != 0 || ((Behaviour)this).get_enabled()) { return; } ((Behaviour)this).set_enabled(true); CriticalSection.Enter(CriticalSections.SceneChange); PlayerPartyTypes type = PlayerPartyTypes.Tower; GlobalVars.SelectedPartyIndex.Set((int)type); MonoSingleton <GameManager> .Instance.Player.SetPartyCurrentIndex((int)type); PunMonoSingleton <MyPhoton> .Instance.IsMultiPlay = false; PunMonoSingleton <MyPhoton> .Instance.IsMultiVersus = false; if (this.mResume) { this.btlID = (long)GlobalVars.BtlID; GlobalVars.BtlID.Set(0L); this.ExecRequest((WebAPI) new ReqTowerBtlComResume(this.btlID, new Network.ResponseCallback(((FlowNode_Network)this).ResponseCallback))); } else { GameManager instance = MonoSingleton <GameManager> .Instance; if (!string.IsNullOrEmpty(this.QuestID)) { GlobalVars.SelectedQuestID = this.QuestID; GlobalVars.SelectedFriendID = string.Empty; } this.mStartingQuest = instance.FindQuest(GlobalVars.SelectedQuestID); if (this.PlayOffline || Network.Mode != Network.EConnectMode.Online) { return; } PartyData partyOfType = instance.Player.FindPartyOfType(type); if (this.mStartingQuest.type != QuestTypes.Tower) { return; } TowerFloorParam towerFloor = MonoSingleton <GameManager> .Instance.FindTowerFloor(this.mStartingQuest.iname); this.ExecRequest((WebAPI) new ReqBtlTowerComReq(towerFloor.tower_id, towerFloor.iname, partyOfType, new Network.ResponseCallback(((FlowNode_Network)this).ResponseCallback))); } }
public void OnColoRankModify() { CriticalSection.Leave(CriticalSections.SceneChange); string errMsg = Network.ErrMsg; Network.RemoveAPI(); Network.ResetError(); SRPG_TouchInputModule.LockInput(); UIUtility.SystemMessage((string)null, errMsg, (UIUtility.DialogResultEvent)(go => { SRPG_TouchInputModule.UnlockInput(false); ((Behaviour)this).set_enabled(false); this.ActivateOutputLinks(6); }), (GameObject)null, true, -1); }
private void OnSceneAwake(GameObject scene) { SceneBattle component = (SceneBattle)scene.GetComponent <SceneBattle>(); if (!UnityEngine.Object.op_Inequality((UnityEngine.Object)component, (UnityEngine.Object)null)) { return; } CriticalSection.Leave(CriticalSections.SceneChange); CriticalSection.Leave(CriticalSections.SceneChange); SceneAwakeObserver.RemoveListener(new SceneAwakeObserver.SceneEvent(this.OnSceneAwake)); component.StartQuest(this.mStartingQuest.iname, this.mQuestData); ((Behaviour)this).set_enabled(false); this.ActivateOutputLinks(1); }
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); } } }
public static void RequestAPI(WebAPI api, bool highPriority = false) { if (highPriority) { MonoSingleton <SRPG.Network> .Instance.mRequests.Insert(0, api); } else { MonoSingleton <SRPG.Network> .Instance.mRequests.Add(api); } if (MonoSingleton <SRPG.Network> .Instance.mRequests.Count != 1) { return; } CriticalSection.Enter(CriticalSections.Network); }
public static void RequestAPI(WebAPI api, bool highPriority = false) { DebugUtility.Log("Request WebAPI: " + Network.Host + api.name); if (highPriority) { MonoSingleton <Network> .Instance.mRequests.Insert(0, api); } else { MonoSingleton <Network> .Instance.mRequests.Add(api); } if (MonoSingleton <Network> .Instance.mRequests.Count != 1) { return; } CriticalSection.Enter(CriticalSections.Network); }
private void Play(string fileName) { ((Behaviour)this).set_enabled(true); this.hBGMVolume = new MySound.VolumeHandle(MySound.EType.BGM); this.hBGMVolume.SetVolume(0.0f, 0.0f); this.hVoiceVolume = new MySound.VolumeHandle(MySound.EType.VOICE); this.hVoiceVolume.SetVolume(0.0f, 0.0f); if (this.AutoFade) { SRPG_TouchInputModule.LockInput(); CriticalSection.Enter(CriticalSections.Default); FadeController.Instance.FadeTo(this.FadeColor, 1f, 0); this.StartCoroutine(this.PlayDelayed(fileName, new StreamingMovie.OnFinished(this.OnFinished))); } else { MonoSingleton <StreamingMovie> .Instance.Play(fileName, new StreamingMovie.OnFinished(this.OnFinished), (string)null); } }
public override void OnActivate(int pinID) { switch (pinID) { case 0: CriticalSection.Enter(this.Mask); this.ActivateOutputLinks(10); break; case 1: CriticalSection.Leave(this.Mask); this.ActivateOutputLinks(10); break; case 2: ((Behaviour)this).set_enabled(true); break; } }