private PlayerShot m_shot; //only allow one shot at a time! #endregion Fields #region Constructors public Player() { this.Color = GameMain.Instance.m_clrOffwhite; this.m_keys = new KeysSteering(KeysSteering.KeyPresets.ArrowsSpace); this.m_keys.AddKeyPreset(KeysSteering.KeyPresets.awsdCtrlShift); this.m_keys.KeyEvent+=new KeyEventHandler(m_keys_KeyEvent); this.SetGraphics("Player"); this.CenterRegPoint(); ERectangleF rct = ERectangleF.FromLTRB(145,418,495,419); Endogine.GameHelpers.BhConstrain bh = new Endogine.GameHelpers.BhConstrain(); bh.AddArea(rct, null, false, null); this.AddBehavior(bh); }
public Player() { this.Color = GameMain.Instance.m_clrOffwhite; this.m_keys = new KeysSteering(KeysSteering.KeyPresets.ArrowsSpace); this.m_keys.AddKeyPreset(KeysSteering.KeyPresets.awsdCtrlShift); this.m_keys.KeyEvent += new KeyEventHandler(m_keys_KeyEvent); this.SetGraphics("Player"); this.CenterRegPoint(); ERectangleF rct = ERectangleF.FromLTRB(145, 418, 495, 419); Endogine.GameHelpers.BhConstrain bh = new Endogine.GameHelpers.BhConstrain(); bh.AddArea(rct, null, false, null); this.AddBehavior(bh); }