Exemplo n.º 1
0
 public void Update()
 {
     if (UnityEngine.Input.anyKey)
     {
         AnyInput?.Invoke(Event.AnyInput.Instance);
     }
 }
Exemplo n.º 2
0
        protected void SetUp()
        {
            leftTrigger  = new Trigger("LeftTrigger", this, 6, !Settings.disableLeftTrigger);
            rightTrigger = new Trigger("RightTrigger", this, 7, !Settings.disableRightTrigger);

            anyInput = new AnyInput("AnyInput", this, !Settings.disableAnyInput);

            sticks = new List <Stick> {
                leftStick, rightStick, dPad
            };
            buttons = new List <Pressable> {
                A, B, X, Y,
                leftBumper, rightBumper, leftTrigger, rightTrigger,
                back, start, leftStickClick, rightStickClick
            };
        }
Exemplo n.º 3
0
    protected virtual void Update()
    {
        bool anyInput = true;

        if (CancelPressed())
        {
            Cancel();
        }
        else if (ResetPressed())
        {
            Reset();
        }
        else if (ChangePerspectivePressed())
        {
            if (ChangePerspectiveEvent != null)
            {
                ChangePerspectiveEvent.Invoke();
            }
        }
        else
        {
            Direction direction = GetBoardDirection();
            if (direction != Direction.NONE && MoveBoardEvent != null)
            {
                MoveBoardEvent.Invoke(direction);
            }
            direction = ChangeDirectionForCube(direction);
            if (direction != Direction.NONE && MoveCubeEvent != null)
            {
                MoveCubeEvent.Invoke(direction);
            }
            else
            {
                anyInput = false;
            }
        }
        if (anyInput && AnyInput != null)
        {
            AnyInput.Invoke();
        }
    }
Exemplo n.º 4
0
 /// <summary>
 ///     Anies the method 3.
 /// </summary>
 public string AnyMethod_3(string a, int b, AnyInput anyInput, string c)
 {
     return(a + "-" + b + "-" + anyInput.StringProperty + "-" + anyInput.IntegerProperty + "-" + c);
 }