public void OnInputAction(InputsManager.InputAction action) { if (this.m_Type == MovieType.Simple) { if (action == InputsManager.InputAction.SkipMovie) { if (!this.m_TextSkip.gameObject.activeSelf) { this.m_TextSkip.gameObject.SetActive(true); } else { this.StopMovie(); } } } else if (this.m_Type == MovieType.WithFade && action == InputsManager.InputAction.SkipMovie && this.m_State == MovieWithFadeState.Movie) { if (!this.m_TextSkip.gameObject.activeSelf) { this.m_TextSkip.gameObject.SetActive(true); } else { this.SetState(MovieWithFadeState.PostFadeOut); } } }
public void OnInputAction(InputsManager.InputAction action) { if (GreenHellGame.DEBUG && (action == InputsManager.InputAction.SkipDialogNode || action == InputsManager.InputAction.Quit)) { this.FinishNode(); } }
public override void OnInputAction(InputsManager.InputAction action) { if (action == InputsManager.InputAction.Drop) { this.Drop(); } }
public void OnInputAction(InputsManager.InputAction action) { if (action == InputsManager.InputAction.Read) { this.OnReadButton(); } }
public override void OnInputAction(InputsManager.InputAction action) { if (action == InputsManager.InputAction.Quit || action == InputsManager.InputAction.AdditionalQuit) { this.SetState(MakeFireController.State.Fail); } }
public override void OnInputAction(InputsManager.InputAction action) { base.OnInputAction(action); if (action == InputsManager.InputAction.BowAim) { if (!Inventory3DManager.Get().gameObject.activeSelf&& this.m_State == BowController.State.Idle && this.m_Arrow != null && Time.time - this.m_EnterStateTime >= 0.5f && !PlayerConditionModule.Get().IsStaminaCriticalLevel()) { this.SetState(BowController.State.AimLoop); this.m_Player.StartAim(Player.AimType.Bow); this.PlayDrawSound(); } } else if (action == InputsManager.InputAction.BowShot) { if (this.m_State == BowController.State.AimLoop) { this.SetState(BowController.State.Shot); this.m_Player.StopAim(); this.PlayShotSound(); } } else if (action == InputsManager.InputAction.BowCancelAim && this.m_State == BowController.State.AimLoop) { this.SetState(BowController.State.Idle); this.m_Player.StopAim(); } }
public override void OnInputAction(InputsManager.InputAction action) { if (!this.CanAttack()) { return; } if (action == InputsManager.InputAction.FistFight) { if (this.IsAttack()) { this.m_ClickBuffer = 1; } else { this.Attack(FistFightController.Mode.Normal); } } else if (action == InputsManager.InputAction.FistFightHard) { if (this.IsAttack()) { this.m_ClickBuffer = 2; } else { this.Attack(FistFightController.Mode.Hard); } } }
public void OnInputAction(InputsManager.InputAction action) { if (base.gameObject.activeSelf && action == InputsManager.InputAction.Quit) { this.m_MenuInGameManager.HideMenu(); } }
public void OnInputAction(InputsManager.InputAction action) { if (action == InputsManager.InputAction.ShowSelectDialogNode) { this.ShowNodes(true); } }
public override void OnInputAction(InputsManager.InputAction action) { base.OnInputAction(action); if (LoadingScreen.Get().m_Active) { return; } if (InventoryBackpack.Get().IsCriticalOverload()) { return; } if (action == InputsManager.InputAction.Jump && HUDMovie.Get().GetMovieType() == MovieType.None && (this.m_CollisionFlags & CollisionFlags.Below) != CollisionFlags.None) { if (InputsManager.Get().IsActionActive(InputsManager.InputAction.DodgeLeft) && !InputsManager.Get().IsActionActive(InputsManager.InputAction.DodgeForward)) { this.Dodge(Direction.Left); } else if (InputsManager.Get().IsActionActive(InputsManager.InputAction.DodgeRight) && !InputsManager.Get().IsActionActive(InputsManager.InputAction.DodgeForward)) { this.Dodge(Direction.Right); } else if (InputsManager.Get().IsActionActive(InputsManager.InputAction.DodgeBackward)) { this.Dodge(Direction.Backward); } else { this.Jump(); } } }
public InputActionData GetInputActionData(InputsManager.InputAction action) { InputActionData result = null; this.m_ActionsByInputAction.TryGetValue((int)action, out result); return(result); }
public void LoadSettings(BinaryFormatter bf, FileStream file) { Dictionary <int, int> dictionary = new Dictionary <int, int>(); Dictionary <int, int> dictionary2 = new Dictionary <int, int>(); int num = (int)bf.Deserialize(file); for (int i = 0; i < num; i++) { string value = (string)bf.Deserialize(file); InputsManager.InputAction key = (InputsManager.InputAction)Enum.Parse(typeof(InputsManager.InputAction), value); string value2 = (string)bf.Deserialize(file); KeyCode value3 = (KeyCode)Enum.Parse(typeof(KeyCode), value2); InputActionData inputActionData = null; if (this.m_ActionsByInputAction.TryGetValue((int)key, out inputActionData)) { dictionary.Add((int)key, (int)value3); } } int num2 = (int)bf.Deserialize(file); for (int j = 0; j < num2; j++) { string value4 = (string)bf.Deserialize(file); TriggerAction.TYPE key2 = (TriggerAction.TYPE)Enum.Parse(typeof(TriggerAction.TYPE), value4); string value5 = (string)bf.Deserialize(file); KeyCode value6 = (KeyCode)Enum.Parse(typeof(KeyCode), value5); InputActionData inputActionData2 = null; if (this.m_ActionsByTriggerAction.TryGetValue((int)key2, out inputActionData2)) { dictionary2.Add((int)key2, (int)value6); } } this.ApplyOptions(dictionary, dictionary2); }
public void SaveSettings(BinaryFormatter bf, FileStream file) { bf.Serialize(file, this.m_ActionsByInputAction.Keys.Count); for (int i = 0; i < this.m_ActionsByInputAction.Keys.Count; i++) { int num = this.m_ActionsByInputAction.Keys.ElementAt(i); InputsManager.InputAction inputAction = (InputsManager.InputAction)num; string graph = inputAction.ToString(); bf.Serialize(file, graph); KeyCode keyCode = this.m_ActionsByInputAction.Values.ElementAt(i).m_KeyCode; string graph2 = keyCode.ToString(); bf.Serialize(file, graph2); } bf.Serialize(file, this.m_ActionsByTriggerAction.Keys.Count); for (int j = 0; j < this.m_ActionsByTriggerAction.Keys.Count; j++) { int num2 = this.m_ActionsByTriggerAction.Keys.ElementAt(j); TriggerAction.TYPE type = (TriggerAction.TYPE)num2; string graph3 = type.ToString(); bf.Serialize(file, graph3); KeyCode keyCode2 = this.m_ActionsByTriggerAction.Values.ElementAt(j).m_KeyCode; string graph4 = keyCode2.ToString(); bf.Serialize(file, graph4); } }
public override void OnInputAction(InputsManager.InputAction action) { if (action == InputsManager.InputAction.MeleeAttack) { this.Attack(); } }
private void UpdatActiveActions() { if (this.m_ActiveActionsByInputAction.Count > 0) { this.m_InputActionsToRemove.Clear(); foreach (KeyValuePair <int, KeyCode> keyValuePair in this.m_ActiveActionsByInputAction) { InputsManager.InputAction key = (InputsManager.InputAction)keyValuePair.Key; if (!Input.GetKey(this.m_ActiveActionsByInputAction[(int)key])) { this.m_InputActionsToRemove.Add(key); } } foreach (InputsManager.InputAction key2 in this.m_InputActionsToRemove) { this.m_ActiveActionsByInputAction.Remove((int)key2); } } if (this.m_ActiveActionsByTriggerAction.Count > 0) { this.m_TriggerActionsToRemove.Clear(); foreach (KeyValuePair <int, KeyCode> keyValuePair2 in this.m_ActiveActionsByTriggerAction) { int key3 = keyValuePair2.Key; if (!Input.GetKey(this.m_ActiveActionsByTriggerAction[key3])) { this.m_TriggerActionsToRemove.Add((TriggerAction.TYPE)key3); } } foreach (TriggerAction.TYPE key4 in this.m_TriggerActionsToRemove) { this.m_ActiveActionsByTriggerAction.Remove((int)key4); } } }
public override void OnInputAction(InputsManager.InputAction action) { if (Inventory3DManager.Get().gameObject.activeSelf) { return; } base.OnInputAction(action); }
public static string GetString(InputsManager.InputAction input_action) { if (!InputActionToString.s_Initialized) { InputActionToString.Initialize(); } return(InputActionToString.s_Dict[(int)input_action]); }
public static int GetActionId(this InputsManager.InputAction action, TriggerAction.TYPE trigger = TriggerAction.TYPE.None) { if (trigger != TriggerAction.TYPE.None) { return((int)(117 + trigger)); } return((int)action); }
public override void OnInputAction(InputsManager.InputAction action) { if ((action == InputsManager.InputAction.Quit || action == InputsManager.InputAction.AdditionalQuit) && GreenHellGame.GetFadeSystem().CanStartFade()) { FadeSystem fadeSystem = GreenHellGame.GetFadeSystem(); fadeSystem.FadeOut(FadeType.All, new VDelegate(this.StopMinigame), 1.5f, null); } }
public InputActionData GetActionDataByInputAction(InputsManager.InputAction input_action, ControllerType controller_type = ControllerType._Count) { InputActionData[] array; if (this.m_ActionsByInputAction.TryGetValue(input_action.GetActionId(TriggerAction.TYPE.None), out array)) { return(array[(int)((controller_type == ControllerType._Count) ? GreenHellGame.Instance.m_Settings.m_ControllerType : controller_type)]); } return(null); }
public override void OnInputAction(InputActionData action_data) { InputsManager.InputAction action = action_data.m_Action; switch (action) { case InputsManager.InputAction.FishingAim: if (this.CanStartFishing()) { this.SetState(FishingController.State.Aim); return; } return; case InputsManager.InputAction.FishingCancelAim: if (this.m_Animator.GetInteger(this.m_StateHash) == 5) { this.SetState(FishingController.State.Idle); return; } return; case InputsManager.InputAction.FishingCast: if (this.CanCast()) { this.SetState(FishingController.State.Cast); return; } return; case InputsManager.InputAction.FishingStrike: if (this.m_Animator.GetInteger(this.m_StateHash) == 7) { this.Strike(); return; } return; case InputsManager.InputAction.FishingReel: break; case InputsManager.InputAction.FishingTakeFish: this.TakeFish(); return; default: if (action != InputsManager.InputAction.AdditionalQuit) { return; } break; } if (this.m_Animator.GetInteger(this.m_StateHash) == 7) { this.Cancel(); return; } }
private KeyCode GetKeyCodeByInputAction(InputsManager.InputAction action) { InputActionData actionDataByInputAction = InputsManager.Get().GetActionDataByInputAction(action, ControllerType._Count); if (actionDataByInputAction != null) { return(actionDataByInputAction.m_KeyCode); } return(KeyCode.Space); }
public override void OnInputAction(InputsManager.InputAction action) { if (action == InputsManager.InputAction.Quit || action == InputsManager.InputAction.AdditionalQuit) { this.Spill(-1f); } else if (action == InputsManager.InputAction.WaterDrink) { this.Drink(); } }
public void OnInputAction(InputsManager.InputAction action) { if (action == InputsManager.InputAction.ShowWheel && !this.m_Active && Player.Get().CanInvokeWheelHUD()) { this.Activate(); } if (action == InputsManager.InputAction.HideWheel && this.m_Active) { this.Deactivate(true); } }
public bool IsActionActive(InputsManager.InputAction action) { foreach (KeyValuePair <int, KeyCode> keyValuePair in this.m_ActiveActionsByInputAction) { InputsManager.InputAction key = (InputsManager.InputAction)keyValuePair.Key; if (key == action) { return(true); } } return(false); }
public override void OnInputAction(InputsManager.InputAction action) { base.OnInputAction(action); if (!this.CanAttack()) { return; } if (action == InputsManager.InputAction.SpearAttack) { if (this.m_SpearState == WeaponSpearController.State.Idle) { this.SetState(WeaponSpearController.State.AttackDown); } else if (this.m_SpearState == WeaponSpearController.State.AttackDown) { this.m_AttackDownCombo = true; } } else if (action == InputsManager.InputAction.SpearUpAim) { if (this.m_SpearState == WeaponSpearController.State.Idle) { this.SetState(WeaponSpearController.State.Aim); } } else if (action == InputsManager.InputAction.SpearAttackUp) { if (this.IsAim()) { this.SetState(WeaponSpearController.State.Attack); } } else if (action == InputsManager.InputAction.SpearThrowAim) { if (this.m_SpearState == WeaponSpearController.State.Idle) { this.SetState(WeaponSpearController.State.ThrowAim); } } else if (action == InputsManager.InputAction.SpearThrowReleaseAim) { if (this.IsThrowAim()) { this.SetState(WeaponSpearController.State.ThrowUnAim); } } else if (action == InputsManager.InputAction.SpearThrow && this.IsThrowAim()) { this.SetState(WeaponSpearController.State.Throw); } }
private string GetText(InputActionData data) { if (data == null) { return(string.Empty); } string str = string.Empty; InputsManager.InputAction action = data.m_Action; if (data.m_Hold > 0f) { str = str + GreenHellGame.Instance.GetLocalization().Get("HUD_Trigger_Hold") + " "; } return(str + GreenHellGame.Instance.GetLocalization().Get("HUDItemInHand_" + InputActionToString.GetString(action))); }
private string GetText(InputActionData data) { if (data == null) { return(string.Empty); } string str = string.Empty; InputsManager.InputAction action = data.m_Action; if (data.m_Hold > 0f) { str = str + GreenHellGame.Instance.GetLocalization().Get("HUD_Trigger_Hold", true) + " "; } return(str + GreenHellGame.Instance.GetLocalization().Get("HUDItemInHand_" + EnumUtils <InputsManager.InputAction> .GetName((int)action), true)); }
private KeyCode GetKeyCodeByInputAction(InputsManager.InputAction action) { Dictionary <int, InputActionData> actionsByInputAction = InputsManager.Get().GetActionsByInputAction(); foreach (KeyValuePair <int, InputActionData> keyValuePair in actionsByInputAction) { if (keyValuePair.Key == (int)action) { Dictionary <int, InputActionData> .Enumerator enumerator; KeyValuePair <int, InputActionData> keyValuePair2 = enumerator.Current; return(keyValuePair2.Value.m_KeyCode); } } DebugUtils.Assert(DebugUtils.AssertType.Info); return(KeyCode.Space); }
public override void OnInputAction(InputActionData action_data) { InputsManager.InputAction action = action_data.m_Action; if (action == InputsManager.InputAction.Drop) { this.m_Player.DropItem(this.m_Bowl); return; } if (action == InputsManager.InputAction.BowlSpil) { this.Spill(-1f); return; } if (action != InputsManager.InputAction.BowlDrink) { return; } this.Drink(); }