Exemplo n.º 1
0
 public void InvokeOnUpdateCenterButton(object a_sender, Vector2EventArgs a_1vector2EventArgs)
 {
     if (OnUpdateCenterButton != null)
     {
         OnUpdateCenterButton.Invoke(a_sender, a_1vector2EventArgs);
     }
 }
 private void InputReceiver_MoveInputReceived(object sender, Vector2EventArgs e)
 {
     //if (!IsBlocked)
     {
         //isRunning = !(e.Vector2 == Vector2.zero);
         Move(e.Vector2);
     }
 }
Exemplo n.º 3
0
    private void HandleOnMove(ZMInputVector2EventArgs args)
    {
        if (IsValidInputControl(args.input))
        {
            var notifyArgs = new Vector2EventArgs(args.value);

            _movement = args.value;
            _inputEventNotifier.TriggerEvent(_inputEventNotifier.OnMoveEvent, notifyArgs);
        }
    }
Exemplo n.º 4
0
    protected virtual void HandleOnMoveDown(ZMInputEventArgs args)
    {
        var input = args.input;

        if (IsValidInputControl(input))
        {
            Vector2EventArgs notifyArgs;

            if (input.Pressed || input.Held)
            {
                _movement.y = -1.0f;
                _inputEventNotifier.TriggerEvent(_inputEventNotifier.OnMoveDownEvent);
            }
            else if (input.Released)
            {
                _movement.y = 0.0f;
            }

            notifyArgs = new Vector2EventArgs(_movement);
            _inputEventNotifier.TriggerEvent(_inputEventNotifier.OnMoveEvent, notifyArgs);
        }
    }
Exemplo n.º 5
0
    private void HandleOnMoveRight(ZMInputEventArgs args)
    {
        var input = args.input;

        if (IsValidInputControl(input))
        {
            Vector2EventArgs notifyArgs;

            if (input.Pressed || input.Held)
            {
                _movement.x = 1.0f;
                _inputEventNotifier.TriggerEvent(_inputEventNotifier.OnMoveRightEvent);
            }
            else if (input.Released)
            {
                _movement.x = 0.0f;
            }

            notifyArgs = new Vector2EventArgs(_movement);
            _inputEventNotifier.TriggerEvent(_inputEventNotifier.OnMoveEvent, notifyArgs);
        }
    }
Exemplo n.º 6
0
 private void HandleMove(Vector2EventArgs args)
 {
     _movement = args.value;
 }
Exemplo n.º 7
0
 public void InvokeOnCenterButton(object a_sender, BoolEventArgs a_1boolEventArgs, Vector2EventArgs a_2vector2EventArgs)
 {
     if (OnCenterButton != null)
     {
         OnCenterButton.Invoke(a_sender, a_1boolEventArgs, a_2vector2EventArgs);
     }
 }