This is used for rumbling the physical controller.
Exemplo n.º 1
0
        /// <summary>
        /// Initializes a new instance of the <see cref="Controller"/> class.
        /// </summary>
        /// <param name="playerIndex">Index of the player.</param>
        public Controller(PlayerIndex playerIndex)
        {
            this.packet      = new ControllerPacket();
            this.playerIndex = playerIndex;
            this.rumblePack  = new RumblePack(this.playerIndex);

            #region TimerInitiallization
            this.updateCycle           = 0;
            this.previousUpdate        = 0;
            this.lastSelectionMovement = 0;
            this.lastSelect            = 0;
            #endregion

            #region PreviousRecorderInitiallization
            this.previousPause       = false;
            this.previousSelect      = false;
            this.previousSelectDown  = false;
            this.previousSelectLeft  = false;
            this.previousSelectRight = false;
            this.previousSelectUp    = false;
            this.previousGoBack      = false;
            this.previousA           = false;
            this.previousB           = false;
            this.previousX           = false;
            this.previousY           = false;
            this.previousRB          = false;
            this.previousLB          = false;
            #endregion
        }
Exemplo n.º 2
0
        /// <summary>
        /// Initializes a new instance of the <see cref="Controller"/> class.
        /// </summary>
        /// <param name="playerIndex">Index of the player.</param>
        public Controller(PlayerIndex playerIndex)
        {
            this.packet = new ControllerPacket();
            this.playerIndex = playerIndex;
            this.rumblePack = new RumblePack(this.playerIndex);

            #region TimerInitiallization
            this.updateCycle = 0;
            this.previousUpdate = 0;
            this.lastSelectionMovement = 0;
            this.lastSelect = 0;
            #endregion

            #region PreviousRecorderInitiallization
            this.previousPause = false;
            this.previousSelect = false;
            this.previousSelectDown = false;
            this.previousSelectLeft = false;
            this.previousSelectRight = false;
            this.previousSelectUp = false;
            this.previousGoBack = false;
            this.previousA = false;
            this.previousB = false;
            this.previousX = false;
            this.previousY = false;
            this.previousRB = false;
            this.previousLB = false;
            #endregion
        }