示例#1
0
        protected override void OnIntellectCommand(Intellect.Command command)
        {
            base.OnIntellectCommand(command);

            if (EntitySystemWorld.Instance.IsServer() || EntitySystemWorld.Instance.IsSingle())
            {
                if (command.KeyPressed)
                {
                    if (command.Key == GameControlKeys.Jump)
                    {
                        //TPS arcade specific (camera observe)
                        //No jump
                        if (GameMap.Instance.GameType == GameMap.GameTypes.TPSArcade)
                        {
                            if (Intellect != null && PlayerIntellect.Instance == Intellect)
                            {
                                return;
                            }
                        }

                        TryJump();
                    }
                }
            }
        }
示例#2
0
        protected override void OnIntellectCommand(Intellect.Command command)
        {
            base.OnIntellectCommand(command);

            if (EntitySystemWorld.Instance.IsServer() || EntitySystemWorld.Instance.IsSingle())
            {
                if (command.KeyPressed)
                {
                    if (command.Key == GameControlKeys.Fire1)
                    {
                        GunsTryFire(false);
                    }
                    if (command.Key == GameControlKeys.Fire2)
                    {
                        GunsTryFire(true);
                    }
                }
            }
        }
示例#3
0
        protected override void OnIntellectCommand(Intellect.Command command)
        {
            base.OnIntellectCommand(command);

            if (EntitySystemWorld.Instance.IsServer() || EntitySystemWorld.Instance.IsSingle())
            {
                if (command.KeyPressed)
                {
                    if (command.Key >= GameControlKeys.Weapon1 && command.Key <= GameControlKeys.Weapon9)
                    {
                        int index = (int)command.Key - (int)GameControlKeys.Weapon1;
                        SetActiveWeapon(index);
                    }

                    if (command.Key == GameControlKeys.PreviousWeapon)
                    {
                        SetActivePreviousWeapon();
                    }
                    if (command.Key == GameControlKeys.NextWeapon)
                    {
                        SetActiveNextWeapon();
                    }
                    if (command.Key == GameControlKeys.Fire1)
                    {
                        WeaponTryFire(false);
                    }
                    if (command.Key == GameControlKeys.Fire2)
                    {
                        WeaponTryFire(true);
                    }
                    if (command.Key == GameControlKeys.Reload)
                    {
                        WeaponTryReload();
                    }
                }
            }
        }
示例#4
0
 public void DoIntellectCommand(Intellect.Command command)
 {
     OnIntellectCommand(command);
 }
示例#5
0
 protected virtual void OnIntellectCommand(Intellect.Command command)
 {
 }