Beispiel #1
0
 /// <summary>
 /// LoadContent will be called once per game and is the place to load
 /// all of your content.
 /// </summary>
 protected override void LoadContent()
 {
     // Create a new SpriteBatch, which can be used to draw textures.
     spriteBatch = new SpriteBatch(GraphicsDevice);
     ressources.LoadContent(Content);
     Main = new GameMain();
     // TODO: use this.Content to load your game content here
 }
Beispiel #2
0
 //Constructor
 public Player(GameMain parent)
     : base(new Rectangle(0, 0, HitboxX, HitboxY), parent)
 {
     this.Direction = Direction.down;
     this.anime = true;
     this.time = 0;
     this.animationSpeed = 5;
     localkey = new key(parent);
 }
Beispiel #3
0
 //Constructor
 public Monstre(GameMain parent, int posX, int posY, int direction2)
     : base(new Rectangle(posX, posY, HitboxX, HitboxY), parent)
 {
     this.direction = new Random();
         direction1 = direction2;
         switch(direction1)
         {
             case 1: this.Direction = Direction.left;
                 break;
             case 2: this.Direction = Direction.right;
                 break;
             case 3: this.Direction = Direction.down;
                 break;
             case 4: this.Direction = Direction.up;
                 break;
         }
         this.anime = true;
         this.time = 0;
         this.animationSpeed = 5;
 }
Beispiel #4
0
 public GameElement(Rectangle Hitbox, GameMain parent)
 {
     this.Hitbox = Hitbox;
     this.parent = parent;
 }
Beispiel #5
0
 public Projectile(Player player, Direction direction, GameMain parent)
     : base(new Rectangle(player.Hitbox.X + 10, player.Hitbox.Y + 17, ressources.projectile.Bounds.Width, ressources.projectile.Bounds.Height), parent)
 {
     this.direction = direction;
 }
Beispiel #6
0
 //constructor
 public key(GameMain parent)
     : base(new Rectangle(), parent)
 {
     deplacer();
 }