public XGamePad(ref XMain X, int GamepadNumber) : base(ref X) { DrawOrder = 0; this.GamepadNumber = GamepadNumber; if (GamepadNumber == 1) { index = PlayerIndex.One; } else if (GamepadNumber == 2) { index = PlayerIndex.Two; } else if (GamepadNumber == 3) { index = PlayerIndex.Three; } else if (GamepadNumber == 4) { index = PlayerIndex.Four; } GetState(); idleTime = new XTimer(ref X); vibrationTimer = new XTimer(ref X); }
public XTimer CreateTimer(float second, Action <object> callback, object param) { XTimer timer = new XTimer(); m_dicTimer.Add(timer, timer); timer.Reset(m_runSecond, second, callback, param); return(timer); }
public XMouse(ref XMain X) : base(ref X) { DrawOrder = 0; Delta = Vector2.Zero; ScrollPosition = 0; ScrollDelta = 0; if (Reset) { Mouse.SetPosition(X.GraphicsDevice.Viewport.Width / 2, X.GraphicsDevice.Viewport.Height / 2); } CurrentState = Mouse.GetState(); LastState = CurrentState; InitialPosition = new Vector2(CurrentState.X, CurrentState.Y); CurrentPosition = InitialPosition; idleTime = new XTimer(ref X); }
public XTexture(ref XMain X, string Filename) : base(ref X) { filename = Filename; timer = new XTimer(ref X); }
public XKeyboard(ref XMain X) : base(ref X) { DrawOrder = 0; UpdateStates(); idleTime = new XTimer(ref X); }
public XGifTexture(ref XMain X, string Filename) : base(ref X) { this.Filename = Filename; this.Timer = new XTimer(ref X); }