예제 #1
0
 public void Update()
 {
     prevState         = state;
     state             = GamePad.GetState(playerIndex);
     prevDPadDirection = dPadDirection;
     dPadDirection     = GetDPadDirection();
 }
예제 #2
0
파일: DPadScript.cs 프로젝트: Eldoir/XInput
    #pragma warning restore 0649


    protected override void InputUpdate()
    {
        XInput.Direction direction = XInput.GetDPadDirection(playerIndex);

        foreach (DPadDirection dPadDirection in dPadDirections)
        {
            // That way, we only enable the current direction's image
            dPadDirection.EnableImage(dPadDirection.IsConcerned(direction));
        }
    }
예제 #3
0
파일: DPadScript.cs 프로젝트: Eldoir/XInput
        #pragma warning restore 0649


        public bool IsConcerned(XInput.Direction direction)
        {
            return(this.direction == direction);
        }