Пример #1
0
 public Controls()
 {
     instance = this;
     addKey(Keys.Z);
     addKey(Keys.X);
     addKey(Keys.Up);
     addKey(Keys.Down);
     addKey(Keys.Left);
     addKey(Keys.Right);
     addKey(Keys.A);
     addKey(Keys.S);
     addKey(Keys.D);
     addKey(Keys.F);
     addKey(Keys.C);
     addKey(Keys.V);
     addKey(Keys.B);
     addKey(Keys.Escape);
     addKey(Keys.W);
     addKey(Keys.Q);
     addKey(Keys.Q);
     addKey(Keys.E);
     addKey(Keys.R);
     addKey(Keys.Space);
     addKey(Keys.Enter);
     addKey(Keys.LeftShift);
     addKey(Keys.Delete);
     addKey(Keys.T);
     addKey(Keys.P);
     addKey(Keys.D1);
     addKey(Keys.D2);
     addKey(Keys.N);
     addKey(Keys.M);
     addKey(Keys.LeftControl);
     addButton(Buttons.A);
     addButton(Buttons.B);
     addButton(Buttons.X);
     addButton(Buttons.Y);
     addButton(Buttons.DPadUp);
     addButton(Buttons.DPadDown);
     addButton(Buttons.DPadLeft);
     addButton(Buttons.DPadRight);
     addButton(Buttons.RightShoulder);
     addButton(Buttons.LeftStick);
     addButton(Buttons.RightStick);
     addButton(Buttons.LeftShoulder);
 }
Пример #2
0
 /// <summary>
 /// Allows the game to perform any initialization it needs to before starting to run.
 /// This is where it can query for any required services and load any non-graphic
 /// related content.  Calling base.Initialize will enumerate through any components
 /// and initialize them as well.
 /// </summary>
 protected override void Initialize()
 {
     // TODO: Add your initialization logic here
     controls = new Controls();
     objList = new List<Obj>();
     //graphics.IsFullScreen = true;
     graphics.PreferredBackBufferHeight = Global.Height;
     graphics.PreferredBackBufferWidth = Global.Width;
     graphics.ApplyChanges();
     base.Initialize();
 }