예제 #1
0
파일: Program.cs 프로젝트: R3coil/project2
 /// <summary>
 /// The main entry point for the application.
 /// </summary>
 static void Main(string[] args)
 {
     using (Game1 game = new Game1())
     {
         game.Run();
     }
 }
예제 #2
0
파일: Game1.cs 프로젝트: Cur10s1ty/project2
        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;
        }
예제 #3
0
 public Projectile(float x, float y)
 {
     this.location = new Vector2(x, y);
     this.game = Game1.GetInstance();
 }
예제 #4
0
파일: Game1.cs 프로젝트: Cur10s1ty/project2
 public static Game1 GetInstance()
 {
     if (instance == null)
     {
         instance = new Game1();
     }
     return instance;
 }