protected override void OnRelease(PlayerActor player) { IState state = player.PlayerController.State; if (state is Normal || state is Onbu) { this._prevInteractionState = true; this._prevValidType = Input.ValidType.Action; this._prevAcceptionState = CommandLabel.AcceptionState.InvokeAcception; } if (this._prevInteractionState != player.CurrentInteractionState) { player.SetScheduledInteractionState(this._prevInteractionState); player.ReleaseInteraction(); } if (this._prevValidType != Singleton <Input> .Instance.State) { Singleton <Input> .Instance.ReserveState(this._prevValidType); Singleton <Input> .Instance.SetupState(); } if (this._prevAcceptionState == MapUIContainer.CommandLabel.Acception) { return; } MapUIContainer.SetCommandLabelAcception(this._prevAcceptionState); }
protected override void Awake() { base.Awake(); if (Singleton <Game> .IsInstance()) { if (Object.op_Inequality((Object)Singleton <Game> .Instance.Config, (Object)null)) { Object.Destroy((Object)((Component)Singleton <Game> .Instance.Config).get_gameObject()); Singleton <Game> .Instance.Config = (ConfigWindow)null; GC.Collect(); Resources.UnloadUnusedAssets(); } Singleton <Game> .Instance.Config = this; } this.timeScale = Time.get_timeScale(); Time.set_timeScale(0.0f); if (!Singleton <Input> .IsInstance()) { return; } this._validType = Singleton <Input> .Instance.State; Singleton <Input> .Instance.ReserveState(Input.ValidType.UI); Singleton <Input> .Instance.SetupState(); }
protected override void Awake() { if (Singleton <Game> .IsInstance()) { Singleton <Game> .Instance.MapShortcutUI = this; } if (Singleton <Input> .IsInstance()) { this._validType = Singleton <Input> .Instance.State; Singleton <Input> .Instance.ReserveState(Input.ValidType.UI); Singleton <Input> .Instance.SetupState(); } Sprite sprite; this._imageTable.TryGetValue(MapShortcutUI.ImageIndex, out sprite); this._image.set_sprite(sprite); }
protected override void Awake() { if (Singleton <Game> .IsInstance()) { Singleton <Game> .Instance.Dialog = this; } this._timeScale = Time.get_timeScale(); Time.set_timeScale(0.0f); this._backColor = ((Graphic)this._panel).get_color(); this._offsetTarget = ((Graphic)this._back).get_rectTransform(); this._offset = this._offsetTarget.get_anchoredPosition(); if (!Singleton <Input> .IsInstance()) { return; } this._validType = Singleton <Input> .Instance.State; Singleton <Input> .Instance.ReserveState(Input.ValidType.UI); Singleton <Input> .Instance.SetupState(); }
protected override void OnAwake(PlayerActor player) { this._currentFarmPoint = player.CurrentFarmPoint; if (Object.op_Equality((Object)this._currentFarmPoint, (Object)null)) { player.PlayerController.ChangeState("Normal"); } else { this._input = Singleton <Input> .Instance; Input.ValidType state = this._input.State; this._input.ReserveState(Input.ValidType.UI); this._input.SetupState(); this._input.ReserveState(state); MapUIContainer.SetCommandLabelAcception(CommandLabel.AcceptionState.None); MapUIContainer.SetVisibleHUD(false); int registerId = this._currentFarmPoint.RegisterID; List <AIProject.SaveData.Environment.ChickenInfo> chickenInfoList1 = (List <AIProject.SaveData.Environment.ChickenInfo>)null; Dictionary <int, List <AIProject.SaveData.Environment.ChickenInfo> > dictionary = !Singleton <Game> .IsInstance() ? (Dictionary <int, List <AIProject.SaveData.Environment.ChickenInfo> >)null : Singleton <Game> .Instance.Environment?.ChickenTable; if (dictionary != null && (!dictionary.TryGetValue(registerId, out chickenInfoList1) || chickenInfoList1 == null)) { List <AIProject.SaveData.Environment.ChickenInfo> chickenInfoList2 = new List <AIProject.SaveData.Environment.ChickenInfo>(); dictionary[registerId] = chickenInfoList2; chickenInfoList1 = chickenInfoList2; } if (chickenInfoList1 == null) { chickenInfoList1 = new List <AIProject.SaveData.Environment.ChickenInfo>(); } MapUIContainer.ChickenCoopUI.currentChickens = chickenInfoList1; MapUIContainer.ChickenCoopUI.ClosedEvent = (Action)(() => MapUIContainer.CommandList.Visibled = true); MapUIContainer.RefreshCommands(0, player.ChickenCoopCommandInfos); MapUIContainer.CommandList.CancelEvent = (Action)(() => { MapUIContainer.SetActiveCommandList(false); player.PlayerController.ChangeState("Normal"); }); MapUIContainer.SetActiveCommandList(true, "鶏小屋"); } }
protected override void Awake() { if (Singleton <Game> .IsInstance()) { if (Object.op_Inequality((Object)Singleton <Game> .Instance.Dialog, (Object)null)) { Singleton <Game> .Instance.DestroyDialog(); } Singleton <Game> .Instance.ExitScene = this; } this._timeScale = Time.get_timeScale(); Time.set_timeScale(0.0f); if (!Singleton <Input> .IsInstance()) { return; } this._validType = Singleton <Input> .Instance.State; Singleton <Input> .Instance.ReserveState(Input.ValidType.UI); Singleton <Input> .Instance.SetupState(); }
protected override void OnAwake(PlayerActor player) { this._prevAcceptionState = MapUIContainer.CommandLabel.Acception; this._prevValidType = Singleton <Input> .Instance.State; this._prevInteractionState = player.CurrentInteractionState; if (this._prevAcceptionState != CommandLabel.AcceptionState.None) { MapUIContainer.SetCommandLabelAcception(CommandLabel.AcceptionState.None); } if (this._prevValidType != Input.ValidType.None) { Singleton <Input> .Instance.ReserveState(Input.ValidType.None); Singleton <Input> .Instance.SetupState(); } if (!this._prevInteractionState) { return; } player.SetScheduledInteractionState(false); player.ReleaseInteraction(); }
public void SetupState() { this._state = this._reservedState; }
public void ReserveState(Input.ValidType type) { this._reservedState = type; }