コード例 #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
ファイル: Projectile.cs プロジェクト: Cur10s1ty/project2
 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;
 }