public static void Main(string[] args) { Console.WriteLine("Hello World!"); ArbrePossibilité arbre = new ArbrePossibilité(); string auxchemin = @"C:\Users\Kevin\Desktop\fichierTestArbrePossibilite.txt"; arbre.lireFichier(auxchemin); arbre.afficheArbrePossibilite(); Inventaire inv = new Inventaire(); inv.AddObjets("guitare", "instrument de musique", 1, 10); inv.AddObjets("guitare", 4); inv.AddObjets("bâton", "morceau de bois", 5, 50); inv.AfficheInventaire(); Console.ReadKey(true); }
/// <summary> /// Allows the game to perform any initialization it needs to before starting to run. /// This is where it can query for any required services and load any non-graphic /// related content. Calling base.Initialize will enumerate through any components /// and initialize them as well. /// </summary> protected override void Initialize() { // TODO: Add your initialization logic here graphics.IsFullScreen = true; graphics.PreferredBackBufferWidth = 1200; graphics.PreferredBackBufferHeight = 900; graphics.ApplyChanges(); player = new Player(); speedG = 200f; ennemis = new List <Ennemi>(); prevEnnemiSpawn = TimeSpan.Zero; ennemiSpawn = TimeSpan.FromSeconds(1.0f); random = new Random(); inventaire = new Inventaire <Objet.Types, int>(); projectiles = new List <Projectile>(); const float secondes = 60f; const float cadence_de_tir = 200f; prevProjectileSpawn = TimeSpan.Zero; projectileSpawn = TimeSpan.FromSeconds(secondes / cadence_de_tir); mapLevel1 = new List <TuileBase>(); // on va instancier la map ci-dessus, pour la dessiner spawnable = new List <Grass_Tile>(); dropLoot = new List <Forest_Tile>(); objets = new List <Objet>(); objetsInventaire = new List <Objet>(); rockTiles = new List <Rock_Tile>(); waterTiles = new List <Water_Tile>(); //waterRectangle = new List<Rectangle>(); //objets.Enqueue(Objet.Spawn(Objet.Types.Fromage)); //objets.Enqueue(Objet.Spawn(Objet.Types.Graines)); //objets.Enqueue(Objet.Spawn(Objet.Types.Lait)); //objets.Enqueue(Objet.Spawn(Objet.Types.Soupe)); base.Initialize(); }