Esempio n. 1
0
 public Joueur(int id, Map map)
 {
     Argent = 500;
     this._ID = id;
     this.Map = map;
     list_unite = new List<Unite>();
     if (id == 1)
         list_ville = new List<Ville>() { new Ville(this, new Vector2(0, 0), map) };
     else
         list_ville = new List<Ville>() { new Ville(this, new Vector2(15, 15), map) };
 }
Esempio n. 2
0
 public Ville(Joueur joueur, Vector2 position, Map map)
 {
     type_unite = new List<string>() { "unite legere", "unite rapide", "unite lourde" };
     this.Position.X = position.X * 32 + map.Origine.X;
     this.Position.Y = position.Y * 32 + map.Origine.Y;
     IsSelected = false;
     Isplayable = true;
     creation = false;
     this.Map = map;
     this.Joueur = joueur;
     y = 250;
 }
Esempio n. 3
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;
 }
Esempio n. 4
0
 protected override void LoadContent()
 {
     TexturePack.Load(Content);
     spriteBatch = new SpriteBatch(GraphicsDevice);
     map = new Map();
     J1 = new Joueur(1, map);
     J2 = new Joueur(2, map);
     joueur = 0;
     nouvelle_phase = Phase_de_jeu.ravitaillement;
     old_phase = Phase_de_jeu.ravitaillement;
 }