Example #1
0
        private void OnInputEvent(VldateSck.Input.InputLogical input, bool buttonDown)
        {
            switch (input)
            {
            case Input.InputLogical.SECONDARY_ACTION:
                if (buttonDown)
                {
                    mCurrentGun.ToggleFireMode();
                }
                break;

            case Input.InputLogical.UNIQUE_ACTION:
                if (buttonDown)
                {
                    if (!mIsDashing && mCanDash)
                    {
                        Dash();
                    }
                }
                break;

            default:
                break;
            }
        }
Example #2
0
        private void OnMovementEvent(VldateSck.Input.InputLogical input, bool buttonDown)
        {
            // If we have movement input
            if (input >= Input.InputLogical.MOVEMENT_START && input <= Input.InputLogical.MOVEMENT_END)
            {
                switch (input)
                {
                case Input.InputLogical.DPAD_FORWARD:
                    mInputDirectionStates[(int)MovementDirection.Forward] = buttonDown;
                    break;

                case Input.InputLogical.DPAD_BACK:
                    mInputDirectionStates[(int)MovementDirection.Backward] = buttonDown;
                    break;

                case Input.InputLogical.DPAD_LEFT:
                    mInputDirectionStates[(int)MovementDirection.Left] = buttonDown;
                    break;

                case Input.InputLogical.DPAD_RIGHT:
                    mInputDirectionStates[(int)MovementDirection.Right] = buttonDown;
                    break;

                default:
                    Debug.LogError("Character movement event handler should not get here.");
                    break;
                }
            }
        }
Example #3
0
 private void InvokeDelegate(VldateSck.Input.InputLogical input, bool buttonDown)
 {
     if (InputEventDelegate != null)
     {
         InputEventDelegate(input, buttonDown);
     }
 }
 public override void OnMouseInteraction(VldateSck.Input.InputLogical input, bool buttonDown)
 {
     switch (input)
     {
     case VldateSck.Input.InputLogical.PRIMARY_ACTION:
         Debug.Log("It's me!");
         break;
     }
 }
        static void OnMouseInteraction(VldateSck.Input.InputLogical input, bool buttonDown)
        {
            MouseInteractable interactable = null;

            if (MouseCast(out interactable))
            {
                if (interactable != null)
                {
                    interactable.OnMouseInteraction(input, buttonDown);
                }
            }
        }
Example #6
0
 private void OnInputEvent(VldateSck.Input.InputLogical input, bool buttonDown)
 {
     // Attempt to fire.
     if (input == mFireInput)
     {
         if (buttonDown)
         {
             mFireButtonDown = true;
             AttemptFire();
         }
         else
         {
             mFireButtonDown = false;
         }
     }
 }
 public abstract void OnMouseInteraction(VldateSck.Input.InputLogical input, bool buttonDown);