Exemplo n.º 1
0
 public Player(Game1 game, Point pos, Texture2D tex)
 {
     this.game = game;
     texture = tex;
     rectangle = new Rectangle(pos.X - tex.Width / 2, pos.Y - tex.Height / 2, tex.Width, tex.Height);
     position = pos;
 }
Exemplo n.º 2
0
 /// <summary>
 /// The main entry point for the application.
 /// </summary>
 static void Main(string[] args)
 {
     using (Game1 game = new Game1())
     {
         game.Run();
     }
 }
Exemplo n.º 3
0
        public LevelManager(ContentManager cm, Game1 g)
        {
            content = cm;
            game = g;

            longg = new Level(content.Load<Texture2D>("Sprites/Levels/long"));

            ship_1 = new Level(content.Load<Texture2D>("Sprites/Levels/ship_1"));
            ship_2 = new Level(content.Load<Texture2D>("Sprites/Levels/ship_2"));
            ship_3 = new Level(content.Load<Texture2D>("Sprites/Levels/ship_3"));
            ship_4 = new Level(content.Load<Texture2D>("Sprites/Levels/ship_4"));

            ship_2.AddObject(new Doorway(this, new Point(15, 42), ship_3, new Point(116, 35)));
            ship_2.AddObject(new Doorway(this, new Point(80, 42), ship_4, new Point(27, 50)));
            ship_3.AddObject(new Doorway(this, new Point(131, 55), ship_2, new Point(36, 30)));
            ship_4.AddObject(new Doorway(this, new Point(10, 60), ship_2, new Point(65, 30)));
        }