Example #1
0
 public PlayerIdle(Player player, float rotation)
     : base(player)
 {
     this.player = player;
     this.rotation = rotation;
     this.i = 1;
 }
Example #2
0
        private Block LoadBlock(char blockElement,int x,int y)
        {
            switch (blockElement)
               {
               case 'a':
                   this.treasures.Add(new Treasure('a',this.game, @"PlayScene\Tressures\Treasure1",new Vector2(x,y)));
                   return new Block(this.game, @"Transparant", new Vector2(x,y), BlockColision.Pas, 'a');

               case 'b':
                   this.treasures.Add(new Treasure('b',this.game, @"PlayScene\Tressures\Treasure2", new Vector2(x, y)));
                   return new Block(this.game, @"Transparant", new Vector2(x, y), BlockColision.Pas, 'b');

               case 'c':
                   this.treasures.Add(new Treasure('c',this.game, @"PlayScene\Tressures\Potion", new Vector2(x, y)));
                   return new Block(this.game, @"Transparant", new Vector2(x, y), BlockColision.Pas, 'c');

               case 'd':
                   this.treasures.Add(new Treasure('d',this.game, @"PlayScene\Tressures\Scarab", new Vector2(x, y)));
                   return new Block(this.game, @"Transparant", new Vector2(x, y), BlockColision.Pas, 'd');

               case 'r':
                   this.beetles.Add(new Beetle(this.game, new Vector2(x, y), 2));
                   return new Block(this.game, @"Transparant", new Vector2(x, y), BlockColision.Pas, 'r');

               case 'M':
                   this.mummys.Add(new Mummy(this.game, new Vector2(x, y), 2.0f));
                   return new Block(this.game, @"Transparant", new Vector2(x, y), BlockColision.Pas, 'M');

               case 's':
                   this.scorpions.Add( new Scorpion(this.game, new Vector2(x,y),2));
                   return new Block(this.game, @"Transparant", new Vector2(x, y), BlockColision.Pas, 's');

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

               case 'y':
                   return new Block(this.game, @"Door", new Vector2(x, y), BlockColision.Npas, 'y');

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

               case 'z':
                   return new Block(this.game, @"Wall2", new Vector2(x, y), BlockColision.Npas, 'z');

               case 'P':
                   this.player = new Player(this.game,new Vector2(x,y),3.0f);
                   return new Block(this.game, @"Transparant", new Vector2(x, y), BlockColision.Pas, 'P');

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

                case '@':
                   this.background = new Picture(this.game, @"PlayScene\Background\Background2",new Vector2(x,y));
                   return new Block(this.game, @"Wall1", new Vector2(x, y), BlockColision.Npas, '@');

               default:
                   return new Block(this.game, @"Transparant", new Vector2(x, y), BlockColision.Pas, '.');

               }
        }
Example #3
0
 //properties
 //constructor
 public PlayerIdle(Player player)
     : base(player)
 {
     this.player = player;
     this.i = 1;
 }
Example #4
0
 //constructor
 public PlayerDown(Player player)
     : base(player)
 {
     this.player = player;
     this.rotation = (float)Math.PI/2;
 }