//----------------------
        // Protected Functions

        //----------------------
        // Private Functions

        /// <summary>
        /// Process/Handle the inputs from the user.
        /// </summary>
        private void ProcessInput()
        {
            if (JCS_Input.GetMouseByAction(mShootAction.KeyAct, mShootAction.MouseButton) ||
                JCS_Input.GetKeyByAction(mShootAction.KeyAct, mShootAction.ShootKeyCode))
            {
                // check we are able to shoot.
                // like enough mana to cast? or something like this.
                if (mShootAction.GetCheckAbleToShootFunction().Invoke())
                {
                    // do callback
                    mShootAction.GetShootCallback().Invoke();

                    ShootsInSequence();
                }
            }
        }
コード例 #2
0
        /// <summary>
        /// Process/Handle the inputs from the user.
        /// </summary>
        private void ProcessInput()
        {
            if (JCS_Input.GetMouseByAction(mShootAction.KeyAct, mShootAction.MouseButton) ||
                JCS_Input.GetKeyByAction(mShootAction.KeyAct, mShootAction.ShootKeyCode))
            {
                if (mShootAction.GetCheckAbleToShootFunction().Invoke())
                {
                    // do call back
                    mShootAction.GetShootCallback().Invoke();

                    // shoot a bullet.
                    for (int count = 0;
                         count < mShootAction.ShootCount;
                         ++count)
                    {
                        mShootAction.Shoot();
                    }
                }
            }
        }
コード例 #3
0
 protected virtual void Update()
 {
     if (mListenToAnyKey)
     {
         if (JCS_Input.IsAnyKeyBuffer(mKeyActionType, mIgnorePauseCheck))
         {
             ButtonClick();
             PlayButtonClickSound();
         }
     }
     else
     {
         if (// listen to keyboard.
             JCS_Input.GetKeyByAction(mKeyActionType, mKKeyToListen, mIgnorePauseCheck) ||
             // listen to game pad.
             JCS_Input.GetJoystickKeyByAction(mKeyActionType, mJoystickLitener, mJKeyToListen, mIgnorePauseCheck))
         {
             ButtonClick();
             PlayButtonClickSound();
         }
     }
 }
コード例 #4
0
 /// <summary>
 /// Acitve up selection.
 /// </summary>
 /// <returns></returns>
 private bool ActiveLeft()
 {
     return(JCS_Input.GetKeyByAction(mKeyActionType, mMLeft, mIgnoreGamePause) ||
            JCS_Input.GetJoystickKeyByAction(mKeyActionType, mGamePadId, mJLeft, mIgnoreGamePause));
 }