private void DodgeInput(KeyInputType inputType) { if (inputType != KeyInputType.Down) { return; } dodged = true; this.Invoke(ResetDodge, 0.05f); }
public void setKeyInputType(KeyInputType inputType) { this.inputType = inputType; }
public KeyModifierEntry(string name, KeyConfigPanel owner, KeyInputType inputType) : base(name, 0, 0) { this.owner = owner; this.inputType = inputType; }
/// <summary> /// 如果await的时候条件满足,会立即返回并同步执行后面的代码 /// </summary> public KeyInput(KeyCode code, KeyInputType type) { _keycode = code; _type = type; }
public KeyInputAwait(KeyCode keyCode, KeyInputType type) { _keycode = keyCode; _type = type; }
/// <summary> /// Create new instance /// </summary> /// <param name="KeyInfo">Key info from input</param> /// <param name="InputType">Input action</param> public OperatorInputEventArg(ConsoleKeyInfo KeyInfo, KeyInputType InputType) { this.KeyInfo = KeyInfo; this.InputType = InputType; }
/// <summary> /// Returns the current Key mapped to this KeyInputType /// </summary> public static Keys getKeyControl(KeyInputType inputType) { nullCheck(); return keyTypes[(int)inputType]; }
/// <summary> /// Change the key input needed to trigger a given game function; used for /// customizing key controls /// </summary> /// <param name="inputType">The game function</param> /// <param name="key">The new key to press</param> public static void changeKeyControl(KeyInputType inputType, Keys key) { nullCheck(); keyTypes[(int)inputType] = key; }
/// <summary> /// A check for whether the given key is already registered with a certain /// type of input. Called when customizing key controls /// </summary> /// <param name="key">The possible key to shift the input type to</param> /// <param name="exclude">Input type to exclude (i.e. the input being considered)</param> /// <returns>True if another input type uses the key, false otherwise</returns> public static bool keyControlExists(Keys key, KeyInputType exclude) { for (int i = 0; i < keyTypes.Length; i++) { if ((int)exclude == i) continue; if (keyTypes[i] == key) return true; } return false; }
private void ReloadInput(KeyInputType inputType) { currentFireMode.Reload(); }
private void ShootInput(KeyInputType inputType) { currentFireMode.Shoot(currentWeapon, weaponBarrel, damageLayer, gameObject.layer, inputType, ammoUI); }
public void Shoot(WeaponSettings weaponSettings, Transform weaponBarrel, LayerMask damageLayer, LayerMask firedByLayer, KeyInputType inputType, AmmoUI ammoUI) { switch (inputType) { case KeyInputType.Down: OnInputDown(weaponSettings, weaponBarrel, damageLayer, firedByLayer, ammoUI); break; case KeyInputType.Held: OnInputHeld(weaponSettings, weaponBarrel, damageLayer, firedByLayer, ammoUI); break; case KeyInputType.Up: OnInputUp(weaponSettings); break; default: break; } }