Exemplo n.º 1
0
 public Unite(int joueur, int attaque, int defense, Texture2D sprite, Vector2 position, Type_unite type)
 {
     this.Attaque = attaque;
     this.Defense = defense;
     this.Joueur = joueur;
     this.Position = position;
     this.Sprite = sprite;
     this.Type = type;
 }
Exemplo n.º 2
0
 public Unite(Joueur joueur, Vector2 position, Type_unite type, Map map, Game1 game)
 {
     this.Game = game;
     this.Joueur = joueur;
     this.Type = type;
     IsMoved = false;
     rd = new Random();
     switch (Type)
     {
         case Type_unite.legere:
             Attaque = 8;
             Defense = 5;
             Vitesse = 2;
             Pv = 10;
             Sprite = TexturePack.TilesUnites[0]; // mettre la texure 
             break;
         case Type_unite.rapide:
             Attaque = 3;
             Defense = 2;
             Vitesse = 4;
             pv = 8;
             Sprite = TexturePack.TilesUnites[1]; //mettre texutre
             break;
         case Type_unite.lourde:
             Attaque = 10;
             Defense = 8;
             Vitesse = 1;
             Pv = 15;
             Sprite = TexturePack.TilesUnites[2]; // mettre texture
             break;
     }
     this.Position.X = map.Origine.X + position.X;
     this.Position.Y = map.Origine.Y + position.Y;
     this.Map = map;
     this.IsSelected = false;
 }