예제 #1
0
        //=======================================================================================================

        private void HandleVkey(GameVkey vkey, float arg)
        {
            if (OnVkey == null)
            {
                return;
            }

            OnVkey(vkey, arg);
        }
예제 #2
0
        private bool HandleReleasePlayerVkey(GameVkey vkey, float arg, uint playerId)
        {
            if (vkey == GameVkey.ReleasePlayer)
            {
                ReleasePlayer(playerId);
                return(true);
            }

            return(false);
        }
예제 #3
0
        //==============================================================================================================
        private bool HandleCreatePlayerVkey(GameVkey vkey, float arg, uint playerId)
        {
            /*
             * if (vkey == GameVkey.CreatePlayer)
             * {
             *  CreatePlayer(playerId);
             *  return true;
             * }
             */

            return(false);
        }
예제 #4
0
        //==============================================================================================================

        public void InputVkey(GameVkey vkey, float arg, uint playerId)
        {
            if (playerId == 0)
            {
                HandleOtherVkey(vkey, arg, playerId);
                return;
            }

            FlyingPlayer player = GetPlayer(playerId);

            if (player != null)
            {
                player.InputVkey(vkey, arg);
            }
            else
            {
                HandleOtherVkey(vkey, arg, playerId);
            }
        }
예제 #5
0
        private bool HandleVkey(GameVkey vkey, float arg)
        {
            switch (vkey)
            {
            case GameVkey.MoveHorizontal:
                m_flyingVehicle.RoteLR(arg);
                break;

            case GameVkey.MoveVertical:
                m_flyingVehicle.RoteUD(arg);
                break;

            case GameVkey.SpeedUp:
                m_flyingVehicle.MoveFB(arg);
                break;

            default:
                return(false);
            }

            return(true);
        }
예제 #6
0
 private void OnVkey(GameVkey vkey, float arg)
 {
     GameLogicManager.Instance.InputVkey(vkey, arg, m_mainPlayerId);
 }
예제 #7
0
 public bool HandleOtherVkey(GameVkey vkey, float arg, uint playerId)
 {
     return(HandleCreatePlayerVkey(vkey, arg, playerId) ||
            HandleReleasePlayerVkey(vkey, arg, playerId));
 }
예제 #8
0
        public void InputVkey(GameVkey vkey, float arg)
        {
            bool isHandled = false;

            isHandled = isHandled || HandleVkey(vkey, arg);
        }