/// <summary> /// The main entry point for the application. /// </summary> static void Main(string[] args) { using (Game1 game = new Game1()) { game.Run(); } }
public Game1() { graphics = new GraphicsDeviceManager(this); Content.RootDirectory = "Content"; // Frame rate is 30 fps by default for Windows Phone. TargetElapsedTime = TimeSpan.FromTicks(333333); // Extend battery life under lock. InactiveSleepTime = TimeSpan.FromSeconds(1); // Set default orientation to landscape graphics.PreferredBackBufferWidth = screenWidth; graphics.PreferredBackBufferHeight = screenHeight; instance = this; TouchPanel.EnabledGestures = GestureType.HorizontalDrag; }
public Projectile(float x, float y) { this.location = new Vector2(x, y); this.game = Game1.GetInstance(); }
public static Game1 GetInstance() { if (instance == null) { instance = new Game1(); } return instance; }