Exemplo n.º 1
0
 /// <summary>
 /// The main entry point for the application.
 /// </summary>
 static void Main(string[] args)
 {
     using (Game1 game = new Game1())
     {
         game.Run();
     }
 }
Exemplo n.º 2
0
		internal static void RunGame ()
		{
			game = new Game1 ();
			game.Run ();
			#if !__IOS__  && !__TVOS__
			game.Dispose ();
			#endif
		}
Exemplo n.º 3
0
 public Enemy(float StartX, float StartY, int Phase, Texture2D Texture, Game1 Game)
 {
     X = StartX;
     Y = StartY;
     this.Phase = Phase;
     this.Texture = Texture;
     this.Game = Game;
 }
Exemplo n.º 4
0
 /// <summary>
 /// The main entry point for the application.
 /// </summary>
 static void Main(string[] args)
 {
     Console.Title = "TestGame";
     using (Game1 game = new Game1())
     {
         game.Run();
     }
 }
Exemplo n.º 5
0
 public Shot(float StartX, float StartY, float VelX, float VelY, Game1 Game, Texture2D Texture)
 {
     X = StartX;
     Y = StartY;
     this.VelX = VelX;
     this.VelY = VelY;
     this.Texture = Texture;
     this.Game = Game;
 }
Exemplo n.º 6
0
 public EnemyPlane(Game1 game, Texture2D texture, Rectangle picArea, float x, float y, float dx = 0, float dy = 3)
 {
     Texture = texture;
     PicArea = picArea;
     X = x;
     Y = y;
     DX = dx;
     DY = dy;
     Game = game;
 }
Exemplo n.º 7
0
 public Player(float X, float Y, Game1 Game, Texture2D Texture)
 {
     this.Game = Game;
     this.Width = 32;
     this.Height = 32;
     this.X = X;
     this.Y = Y;
     this.Rotation = 0;
     this.Texture = Texture;
 }
Exemplo n.º 8
0
 public Shot(Game1 game, Texture2D texture, Rectangle picArea, float x, float y, float dx, float dy)
 {
     Texture = texture;
     PicArea = picArea;
     X = x;
     Y = y;
     DX = dx;
     DY = dy;
     Game = game;
 }
Exemplo n.º 9
0
        public void Draw(Game1 Game)
        {
            if (FrameIndex >= TotalFrames) FrameIndex = 1;

            Rectangle Source = new Rectangle(FrameIndex * FrameSize, 0, FrameSize, FrameSize);
            Vector2 Position = new Vector2 (X, Y);
            Vector2 Origin = new Vector2 (FrameSize / 2, FrameSize / 2);

            Game.spriteBatch.Draw(Texture, Position, Source, Color.White, 0.0f, Origin, 3.0f, SpriteEffects.None, 0.0f);
        }
Exemplo n.º 10
0
 public override void FinishedLaunching(MonoMac.Foundation.NSObject notification)
 {
     // Handle a Xamarin.Mac Upgrade
     AppDomain.CurrentDomain.AssemblyResolve += (object sender, ResolveEventArgs a) => {
         if (a.Name.StartsWith ("MonoMac")) {
             return typeof(MonoMac.AppKit.AppKitFramework).Assembly;
         }
         return null;
     };
     game = new Game1 ();
     game.Run ();
 }
Exemplo n.º 11
0
        public void Draw(Game1 Game)
        {
            Vector2 PlayerLocation = new Vector2 (X, Y);
            Rectangle PlayerSource = new Rectangle (0, 0, Width, Height);
            Vector2 PlayerOrigin = new Vector2 (Width / 2, Height / 2);

            Game.spriteBatch.Draw(Texture, PlayerLocation, PlayerSource, Color.White, Rotation, PlayerOrigin, 1.0f, SpriteEffects.None, 1);
            Game.spriteBatch.Draw (Texture, BoundingBox (), PlayerSource, Color.Aqua);

            foreach (Shot aShot in Shots) {
                aShot.Draw (Game);
            }
        }
Exemplo n.º 12
0
 public override void FinishedLaunching(UIApplication app)
 {
     // Fun begins..
     game = new Game1();
     game.Run();
 }
Exemplo n.º 13
0
 static void Main()
 {
     using (var game = new Game1())
         game.Run();
 }
Exemplo n.º 14
0
 public Plane(Game1 game)
 {
     Game = game;
 }
Exemplo n.º 15
0
 static void Main()
 {
     game = new Game1 ();
     game.Run ();
 }