protected override ControlInfo GetMoveControl() { var ctrl = ControlSys.RequireKey(CtrlKeys.GetKey(MoveKey)); ctrl.HandleRawAxis(); ctrl.Axis = Trans.localToWorldMatrix * ctrl.Axis; return(ctrl); }
public void ReadCtrl() { if (ControlSys.RequireKey(CtrlKeys.GetKey(BuildingModeStartKey)).Down) { StartingBuildingMode(); return; } if (ControlSys.RequireKey(CtrlKeys.GetKey(BuildingModeEndKey)).Down) { EndingBuildingMode(); } }
private void MoveCtrl() { var ctrlInfo = ControlSys.RequireKey(CtrlKeys.GetKey(MoveKey)); ctrlInfo.HandleRawAxis(); _MoveSyner.Set(ctrlInfo); ctrlInfo = ControlSys.RequireKey(CtrlKeys.GetKey(FastMoveKey)); _FastMoveSyner.Set(ctrlInfo); ctrlInfo = ControlSys.RequireKey(CtrlKeys.GetKey(ScrollHeightKey)); _ScrollHeightSyner.Set(ctrlInfo); }
private void Update() { var autoReload = Fire(ControlSys.RequireKey(CtrlKeys.GetKey(FireKey))); Reload(ControlSys.RequireKey(CtrlKeys.GetKey(ReloadKey)), autoReload); if (ControlSys.RequireKey(CtrlKeys.GetKey(AimKey)).Down) { _AimScope.Switch(); } if (ControlSys.RequireKey(CtrlKeys.GetKey(SwitchFireKey)).Down) { } //MachineGunFireControl.LoopBurstMode(); _Animator.SetBool(RELOAD, _StickyInputDic.GetBool(RELOAD)); }
private void PlayerCtrl() { if (ControlSys.RequireKey(CtrlKeys.GetKey(PutKey)).Down) { if (Put()) { Debug.Log("Success"); } } if (ControlSys.RequireKey(CtrlKeys.GetKey(RotateKey)).Down) { Rotate(true); } if (ControlSys.RequireKey(CtrlKeys.GetKey(CancelKey)).Down) { Cancel(); } }
/// <summary> /// 检测玩家输入,做出相应操作 /// </summary> public void InputCheck() { if (ControlSys.RequireKey(CtrlKeys.GetKey(PreWeaponKey)).Down) { SwitchWeaponToPre(); } else { foreach (var pairs in _Keys.Where(pairs => ControlSys.RequireKey(pairs.Key, SHIELD_VALUE).Down)) { SwitchWeapon(pairs.Value); break; } } if (ControlSys.RequireKey(CtrlKeys.GetKey(DropWeaponKey)).Down) { DropCurrentWeapon(); } }
protected override ControlInfo GetSquatControl() { return(ControlSys.RequireKey(CtrlKeys.GetKey(SquatKey))); }
protected override ControlInfo GetJumpControl() { return(ControlSys.RequireKey(CtrlKeys.GetKey(JumpKey))); }