Beispiel #1
0
        protected override ControlInfo GetMoveControl()
        {
            var ctrl = ControlSys.RequireKey(CtrlKeys.GetKey(MoveKey));

            ctrl.HandleRawAxis();
            ctrl.Axis = Trans.localToWorldMatrix * ctrl.Axis;

            return(ctrl);
        }
Beispiel #2
0
        public void ReadCtrl()
        {
            if (ControlSys.RequireKey(CtrlKeys.GetKey(BuildingModeStartKey)).Down)
            {
                StartingBuildingMode();
                return;
            }

            if (ControlSys.RequireKey(CtrlKeys.GetKey(BuildingModeEndKey)).Down)
            {
                EndingBuildingMode();
            }
        }
Beispiel #3
0
        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);
        }
Beispiel #4
0
        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));
        }
Beispiel #5
0
        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();
            }
        }
Beispiel #6
0
        /// <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();
            }
        }
Beispiel #7
0
 protected override ControlInfo GetSquatControl()
 {
     return(ControlSys.RequireKey(CtrlKeys.GetKey(SquatKey)));
 }
Beispiel #8
0
 protected override ControlInfo GetJumpControl()
 {
     return(ControlSys.RequireKey(CtrlKeys.GetKey(JumpKey)));
 }