/// <summary> /// コンストラクタ /// </summary> public NoteData(int eventTime, GameInputType inputType, int laneIndex, int pressRate) { EventTime = eventTime; InputType = inputType; LaneIndex = laneIndex; PressRate = pressRate; }
public void SaveAndExit(GameStateType state, GameInputType input) { LoadingScreen.SetActive(true); PlayerCamera.SetActive(false); PlayerPersistenceManager.SavePlayer(World.PlayerManager); WorldPersistenceManager.SaveWorld(World); World.Sleep(); TakeInput(GameInputType.WorldUnloaded); }
public bool GetStay(GameInputType type) { bool isStay = false; for (int i = 0; i < _inputDevices.Count; i++) { isStay = _inputDevices[i].GetUp((inputTypes[(int)type])); } return(isStay); }
public bool GetDown(GameInputType type) { bool isDown = false; for (int i = 0; i < _inputDevices.Count; i++) { isDown = _inputDevices[i].GetDown((inputTypes[(int)type])); } return(isDown); }
/// <summary> /// 根据类型获取一个输入状态 /// </summary> /// <param name="type"></param> /// <returns></returns> public InputStateBase GetKeycodeState(GameInputType type) { for (int i = 0; i < _mInputStatesBase.Length; i++) { if (_mInputStatesBase[i].InputType == type) { return(_mInputStatesBase[i]); } } return(null); }
public void LoadWorld(GameStateType previousState, GameInputType input) { HUD.SetActive(true); LoadingScreen.SetActive(true); PlayerManager playerManager = PlayerMenu.GetComponent <PlayerMenuController>().SelectedPlayer; World = WorldMenu.GetComponent <WorldMenuController>().SelectedWorld; World.Setup(playerManager); World.SpawnPlayer(); PlayerCamera.SetActive(true); Time.timeScale = 1; }
/// <summary> /// 根据类型创建KeyState实例 /// </summary> /// <param name="type"></param> /// <param name="code"></param> /// <returns></returns> public static InputStateBase CreateStateByType(GameInputType type, KeyCode code) { switch (type) { case GameInputType.Jump: case GameInputType.Attack: case GameInputType.SkillAttack: return new InputKeyState(code) { InputType = type }; case GameInputType.Move: return new InputMoveState() { InputType = GameInputType.Move }; } throw new System.Exception(string.Format("Can't Find Type [{0}]", type.ToString())); }
/// <summary> /// 根据类型创建KeyState实例 /// </summary> /// <param name="type"></param> /// <param name="code"></param> /// <returns></returns> public static InputStateBase CreateStateByType(GameInputType type, KeyCode code) { switch (type) { case GameInputType.Jump: case GameInputType.Attack: case GameInputType.SkillAttack: return(new InputKeyState(code) { InputType = type }); case GameInputType.Move: return(new InputMoveState() { InputType = GameInputType.Move }); } throw new System.Exception(string.Format("Can't Find Type [{0}]", type.ToString())); }
public InputCondition(InputState state, GameInputType code) { _inputState = state; _inputCode = code; }
/// <summary> /// 获取一个InputKeyState实例 /// </summary> /// <param name="type">类型</param> /// <param name="stateBase">返回</param> /// <returns></returns> public bool TryGetKeycodeState(GameInputType type, out InputStateBase stateBase) { stateBase = GetKeycodeState(type); return(stateBase != null); }
// Function to change the Gametype. This must be called by the new gamemode to deactivate old input-behaviour and activate current input-behaviour. public void ChangeGIT(GameInputType targetType) { ResetFunctions(); this._currentGIT = targetType; SetFunctions(); }
public void OnPlayerDeath(GameStateType previousState, GameInputType inputType) { Time.timeScale = 1f; DeathScreen.SetActive(true); StartCoroutine("FadeToBlack"); }
public void TakeInput(GameInputType inputType) { StateMachine.TakeInput(inputType); }
public InputSubscribeAttribute(GameInputType type) { InputType = type; }
/// <summary> /// Subscribes a delegate to a specific input event type! /// This can only be called if BeginSubscriptionStack has been called /// prior and if the delegate belongs to the registered object. /// </summary> /// <param name="inputType">The input type</param> /// <param name="value">The delegate method to call</param> public void Subscribe(GameInputType inputType, Delegate value) { Assert.IsNotNull(this._currentInputStack, "Calling Subscribe without ever calling Begin!"); this._currentInputStack.Delegates.Add(inputType, value); }