Exemple #1
0
 // Constructor van deze toestands class krijgt altijd het object mee
 // van de hoofdclass Beetle als argument
 public WalkDown(Beetle beetle)
     : base(beetle)
 {
     this.beetle = beetle;
     this.effect = SpriteEffects.FlipVertically;
     this.velocity = new Vector2(0f, this.beetle.Speed);
 }
Exemple #2
0
 // LoadContent methode. Deze methode maakt nieuwe objecten aan van de verschillende
 // classes.
 public void LoadContent()
 {
     this.beetle = new Beetle(this.game, new Vector2(100f, 300f));
     this.beetle1 = new Beetle(this.game, new Vector2(400f, 100f));
     this.scorpion = new Scorpion(this.game, new Vector2(300f, 188f));
     this.scorpion1 = new Scorpion(this.game, new Vector2(188f, 300f));
     this.explorer = new Explorer(this.game, new Vector2(0f, 240f));
 }
 //LoadContent
 public void LoadContent()
 {
     this.beetle = new Beetle(this.game, new Vector2(200f, 300f), 2);
     this.beetle1 = new Beetle(this.game, new Vector2(50f, 200f), 3);
     this.scorpion = new Scorpion(this.game, new Vector2(100f, 300f), 2);
     this.scorpion1 = new Scorpion(this.game, new Vector2(10f, 150f), 3);
     this.explorer = new Explorer(this.game, new Vector2(304f, 224f), 2);
 }
Exemple #4
0
 //Constructor
 public WalkUp(Beetle beetle)
     : base(beetle)
 {
     this.beetle = beetle;
     this.destinationRect = new Rectangle((int)this.beetle.Position.X,
                                         (int)this.beetle.Position.Y,
                                         32,
                                         32);
     this.velocity = new Vector2(0f,this.beetle.Speed);
 }
Exemple #5
0
 //Constructor
 public WalkUp(Beetle beetle)
     : base(beetle)
 {
     // beetle
        this.beetle = beetle;
        // nieuwe rectangle
        this.destinationRectangle = new Rectangle((int)this.beetle.Position.X,(int)this.beetle.Position.Y, 32, 32);
        // de positie veranderd
        this.velocity = new Vector2(0f, this.beetle.Speed);
 }
Exemple #6
0
 //Contstructor
 public WalkDown(Beetle beetle)
     : base(beetle)
 {
     this.beetle = beetle;
     this.effect = SpriteEffects.FlipVertically;
     this.destinationRectangle = new Rectangle((int)this.beetle.Position.X,
                                               (int)this.beetle.Position.Y,
                                               32,
                                               32);
     this.velocity = new Vector2(0f, this.beetle.Speed);
 }
 // LoadContent methode. Deze methode maakt nieuwe objecten aan van de verschillende
 // classes.
 public void LoadContent()
 {
     this.beetle = new Beetle(this.game, new Vector2(100f, 300f));
     this.beetle1 = new Beetle(this.game, new Vector2(400f, 100f));
     this.scorpion = new Scorpion(this.game, new Vector2(300f, 188f));
     this.scorpion1 = new Scorpion(this.game, new Vector2(188f, 300f));
     this.explorer = new Explorer(this.game, new Vector2(304f, 240f));
     this.block1 = new Block(this.game,@"Block\Block", new Vector2(0f, 0f));
     this.block2 = new Block(this.game, @"Block\Wall1", new Vector2(32f, 32f));
     this.block3 = new Block(this.game, @"Block\Wall2", new Vector2(0f, 32f));
     this.block4 = new Block(this.game, @"Block\Door", new Vector2(32f, 0f));
 }
Exemple #8
0
 //Constructor
 public WalkDown(Beetle beetle)
     : base(beetle)
 {
     // beetle
     this.beetle = beetle;
     //effect
     this.effect = SpriteEffects.FlipVertically;
     // de positie van de beetle
     this.destinationRectangle = new Rectangle((int)this.beetle.Position.X, (int)this.beetle.Position.Y, 32, 32);
     // nieuwe vector wordt gemaakt
     this.velocity = new Vector2(0f, this.beetle.Speed);
 }
 //Constructor
 public WalkDown(Beetle beetle)
     : base(beetle)
 {
     this.beetle = beetle;
     this.angle = (float)Math.PI;
 }
Exemple #10
0
 //Constructor.
 public WalkUp(Beetle beetle)
     : base(beetle)
 {
     this.beetle = beetle;
     this.angle  = 0f;
 }
Exemple #11
0
 //Constructor
 public WalkUp(Beetle beetle)
     : base(beetle)
 {
     this.beetle = beetle;
     this.angle = 0f;
 }
Exemple #12
0
 // Constructor van deze toestands class krijgt altijd het object mee
 // van de hoofdclass Beetle als argument
 public WalkUp(Beetle beetle)
     : base(beetle)
 {
     this.beetle = beetle;
     this.velocity = new Vector2(0f, this.beetle.Speed);
 }
Exemple #13
0
 //Constructor
 public WalkDown(Beetle beetle)
     : base(beetle)
 {
     this.beetle = beetle;
 }
Exemple #14
0
 //Constructor.
 public WalkDown(Beetle beetle)
     : base(beetle)
 {
     this.beetle = beetle;
     this.angle  = (float)Math.PI;
 }
Exemple #15
0
 //constructor
 public WalkDown(Beetle beetle)
     : base(beetle)
 {
     this.beetle = beetle;
     this.rotation = 0f;
 }