Example #1
0
 // Constructor van deze toestands class krijgt altijd het object mee
 // van de hoofdclass Beetle als argument
 public WalkRight(Scorpion scorpion)
     : base(scorpion)
 {
     this.scorpion = scorpion;
     this.velocity = new Vector2(this.scorpion.Speed, 0f);
     this.effect = SpriteEffects.FlipVertically;
 }
Example #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);
 }
Example #4
0
 //Contstructor
 public WalkRight(Scorpion scorpion)
     : base(scorpion)
 {
     this.scorpion = scorpion;
     this.destinationRectangle = new Rectangle((int)this.scorpion.Position.X,
                                               (int)this.scorpion.Position.Y,
                                               32,
                                               32);
     this.velocity = new Vector2(this.scorpion.Speed, 0f);
 }
Example #5
0
 //Contstructor
 public WalkLeft(Scorpion scorpion)
     : base(scorpion)
 {
     this.scorpion = scorpion;
     this.effect = SpriteEffects.FlipHorizontally;
     this.destinationRectangle = new Rectangle((int)this.scorpion.Position.X,
                                               (int)this.scorpion.Position.Y,
                                               32,
                                               32);
     this.velocity = new Vector2(this.scorpion.Speed, 0f);
 }
 // 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));
 }
Example #7
0
 //Constructor
 public WalkLeft(Scorpion scorpion)
     : base(scorpion)
 {
     // scorpion
     this.scorpion = scorpion;
     // effect veranderd flipt
     this.effect = SpriteEffects.FlipHorizontally;
     // nieuwe rectangle
     this.destinationRectangle = new Rectangle((int)this.scorpion.Position.X, (int)this.scorpion.Position.Y, 32, 32);
     //nieuwew postion vector 2
     this.velocity = new Vector2(this.scorpion.Speed, 0f);
 }
Example #8
0
        private Block LoadBlock(char blockElement, int x, int y)
        {
            switch (blockElement)
            {
            case 'a':
                this.treasures.Add(new Image(this.game, @"PlaySceneAssets\Treasures\Treasure1", new Vector2(x, y)));
                return(new Block(this.game, @"Transparant", new Vector2(x, y), BlockCollision.Passable, 'a'));

            case 'b':
                this.treasures.Add(new Image(this.game, @"PlaySceneAssets\Treasures\Treasure2", new Vector2(x, y)));
                return(new Block(this.game, @"Transparant", new Vector2(x, y), BlockCollision.Passable, 'b'));

            case 'c':
                this.treasures.Add(new Image(this.game, @"PlaySceneAssets\Treasures\Potion", new Vector2(x, y)));
                return(new Block(this.game, @"Transparant", new Vector2(x, y), BlockCollision.Passable, 'c'));

            case 'd':
                this.treasures.Add(new Image(this.game, @"PlaySceneAssets\Treasures\Scarab", new Vector2(x, y)));
                return(new Block(this.game, @"Transparant", new Vector2(x, y), BlockCollision.Passable, 'd'));

            case 's':
                this.scorpion = new Scorpion(this.game, new Vector2(x, y), 2.0f);
                return(new Block(this.game, @"Transparant", new Vector2(x, y), BlockCollision.Passable, 's'));

            case 'w':
                return(new Block(this.game, @"Block", new Vector2(x, y), BlockCollision.NotPassable, 'w'));

            case 'x':
                return(new Block(this.game, @"Wall1", new Vector2(x, y), BlockCollision.NotPassable, 'x'));

            case 'y':
                return(new Block(this.game, @"Wall2", new Vector2(x, y), BlockCollision.NotPassable, 'y'));

            case 'z':
                return(new Block(this.game, @"Door", new Vector2(x, y), BlockCollision.NotPassable, 'z'));

            case '@':
                this.background = new Image(this.game, @"PlaySceneAssets\Background\Background2", new Vector2(x, y));
                return(new Block(this.game, @"Block", new Vector2(x, y), BlockCollision.NotPassable, '@'));

            case '.':
                return(new Block(this.game, @"Transparant", new Vector2(x, y), BlockCollision.Passable, '.'));

            default:
                return(new Block(this.game, @"Transparant", new Vector2(x, y), BlockCollision.Passable, '.'));
            }
        }
Example #9
0
 //Constuctor
 public WalkLeft(Scorpion scorpion)
     : base(scorpion)
 {
     this.scorpion = scorpion;
     this.angle = (float)Math.PI;
 }
Example #10
0
 //Constructor.
 public WalkLeft(Scorpion scorpion) : base(scorpion)
 {
     this.scorpion = scorpion;
     this.angle    = (float)Math.PI;
 }
Example #11
0
 // Constructor van deze toestands class krijgt altijd het object mee
 // van de hoofdclass Beetle als argument
 public WalkLeft(Scorpion scorpion)
     : base(scorpion)
 {
     this.scorpion = scorpion;
 }
Example #12
0
 //constructor
 public WalkRight(Scorpion scorpion)
     : base(scorpion)
 {
     this.scorpion = scorpion;
     this.rotation = 0f;
 }
Example #13
0
 private Block LoadBlock(char blockElement, int x, int y)
 {
     switch (blockElement)
     {
         case 'a':
             this.treasures.Add(new Image(this.game, @"PlaySceneAssets\Treasures\Treasure1", new Vector2(x, y)));
             return new Block(this.game, @"Transparant", new Vector2(x, y), BlockCollision.Passable, 'a');
         case 'b':
             this.treasures.Add(new Image(this.game, @"PlaySceneAssets\Treasures\Treasure2", new Vector2(x, y)));
             return new Block(this.game, @"Transparant", new Vector2(x, y), BlockCollision.Passable, 'b');
         case 'c':
             this.treasures.Add(new Image(this.game, @"PlaySceneAssets\Treasures\Potion", new Vector2(x, y)));
             return new Block(this.game, @"Transparant", new Vector2(x, y), BlockCollision.Passable, 'c');
         case 'd':
             this.treasures.Add(new Image(this.game, @"PlaySceneAssets\Treasures\Scarab", new Vector2(x, y)));
             return new Block(this.game, @"Transparant", new Vector2(x, y), BlockCollision.Passable, 'd');
         case 's':
             this.scorpion = new Scorpion(this.game, new Vector2(x, y), 2.0f);
             return new Block(this.game, @"Transparant", new Vector2(x, y), BlockCollision.Passable, 's');
         case 'w':
             return new Block(this.game, @"Block", new Vector2(x, y), BlockCollision.NotPassable, 'w');
         case 'x':
             return new Block(this.game, @"Wall1", new Vector2(x, y), BlockCollision.NotPassable, 'x');
         case 'y':
             return new Block(this.game, @"Wall2", new Vector2(x, y), BlockCollision.NotPassable, 'y');
         case 'z':
             return new Block(this.game, @"Door", new Vector2(x, y), BlockCollision.NotPassable, 'z');
         case '@':
             this.background = new Image(this.game, @"PlaySceneAssets\Background\Background2", new Vector2(x, y));
             return new Block(this.game, @"Block", new Vector2(x, y), BlockCollision.NotPassable, '@');
         case '.':
             return new Block(this.game, @"Transparant", new Vector2(x, y), BlockCollision.Passable, '.');
         default:
             return new Block(this.game, @"Transparant", new Vector2(x, y), BlockCollision.Passable, '.');
     }
 }
Example #14
0
 //Constructor
 public WalkRight(Scorpion scorpion)
     : base(scorpion)
 {
     this.scorpion = scorpion;
     this.angle = 0f;
 }
Example #15
0
 //Constructor
 public WalkLeft(Scorpion scorpion)
 {
     this.scorpion = scorpion;
 }
Example #16
0
 //Constructor
 public WalkRight(Scorpion scorpion)
 {
     this.scorpion = scorpion;
 }
Example #17
0
 //Constructor
 public WalkRight(Scorpion scorpion)
 {
     this.scorpion = scorpion;
 }
Example #18
0
 //Constructor.
 public WalkRight(Scorpion scorpion)
     : base(scorpion)
 {
     this.scorpion = scorpion;
     this.angle    = 0f;
 }