public override void LoadContent(ContentManager Content, GraphicsDevice graph, ref string level, ref string next, GraphicsDeviceManager graphics) { width = graphics.PreferredBackBufferWidth; height = graphics.PreferredBackBufferHeight; ovini = new Ovni(width, height); taille_sprt = (int)(Math.Min(width, height) * 0.05); taille_sprt2 = (int)(Math.Min(width, height) * 0.08); //charge le fond // background1 = Content.Load<Texture2D>("level2//fond"); // background2 = Content.Load<Texture2D>("back//fond2"); //charge le sprite _pause.initbutton(ref level); T_sprite = Content.Load<Texture2D>("hero//spriteSheet"); fond =new Rectangle(width/4 , 0, width / 2, height); scroll = new Scrolling_ManagerV(fond ); //charge l IA aster_t = Content.Load<Texture2D>("IA/asteroid/asteroide-sprite"); planet1 = Content.Load<Texture2D>("IA/asteroid/planet4"); star = Content.Load<Texture2D>("IA/asteroid/star"); //instancie le scolling // scrolling1 = new Scrolling(bacgkround1, new Rectangle(0, 0, width, height), 2, height,1f); // scrolling2 = new Scrolling(background2, new Rectangle(0, 0, width, height), 3, height,0.5f); //intancie le vaisseau vaisseau = new sripte_V( new Rectangle(height / 2 + taille_sprt / 2, width / 2 + taille_sprt / 2, taille_sprt2, taille_sprt2), height, width); //instancie l ia manage_T = new IA_manager_T(planet1, new Rectangle(0, 0, taille_sprt2, taille_sprt2), Content, fond); manage_V = new IA_manager_V(star, new Rectangle(0, 0, taille_sprt, taille_sprt), Content, fond); manage_k = new IA_manager_K(aster_t, new Rectangle(0, 0, taille_sprt, taille_sprt),fond); //instancie les donnees de la pause _pause.LoadContent(Content); ovini.Load(aster_t); // ajout IA save.load_level_SEU(Content,ref level,ref next , ref manage_k, ref manage_T, ref manage_V, ref scroll, ref graph, ref vaisseau,ref ovini ); vaisseau.Load(Content, T_sprite); }
public override void LoadContent(ContentManager Content, GraphicsDevice graph, ref string level, ref string next, GraphicsDeviceManager graphics) { //charge le fond // bacgkround1 = Content.Load<Texture2D>("level2//fond"); // background2 = Content.Load<Texture2D>("level2//fond2"); //charge le sprite fond = new Rectangle(400, 0, width/2, height); Scroll = new Scrolling_ManagerV(fond); T_sprite = Content.Load<Texture2D>("hero//spriteSheet"); //charge l IA aster_t = Content.Load<Texture2D>("spritesheet"); planet1 = Content.Load<Texture2D>("IA/asteroid/planet4"); star = Content.Load<Texture2D>("IA/asteroid/star"); //instancie le scolling // scrolling1 = new Scrolling(bacgkround1, new Rectangle(0, 0, width, height), 2, height,0.01f); // scrolling2 = new Scrolling(background2, new Rectangle(0, 0, width, height), 3, height,1f); //intancie le vaisseau vaisseau = new sripte_V( new Rectangle(height / 2 + taille_sprt / 2, width / 2 + taille_sprt / 2, sizeX , sizey ), height, width); //instancie l ia // aster = new asteroid(aster_t, new Rectangle(100, 75, taille_sprt, taille_sprt), 0.01f, width, height); manage_T = new IA_manager_T(planet1, new Rectangle(0, 0, taille_sprt, taille_sprt), Content,fond); manage_V = new IA_manager_V(star, new Rectangle(0, 0, taille_sprt, taille_sprt), Content,fond); manage_k = new IA_manager_K(aster_t, new Rectangle(0, 0, taille_sprt, taille_sprt),fond); ovini = new Ovni(width, height); ovini.Load(aster_t); // ajout IA save.load_leveleditor_SEU(Content, level, ref manage_k, ref manage_T, ref manage_V, ref Scroll, ref graph,ref vaisseau , ref ovini ); vaisseau.Load(Content, T_sprite); //instancie les donnees de la pause _pause.LoadContent(Content); }
public override void LoadContent(ContentManager Content, GraphicsDevice graph, ref string level, ref string next, GraphicsDeviceManager graphics) { _pause.initbutton(ref level); Scroll_manager = new Scrolling_ManagerV(new Rectangle(0,0,width,height )); //charge le fond // bacgkround1 = Content.Load<Texture2D>(backGround); //charge le sprite T_sprite = Content.Load<Texture2D>("hero//spriteSheet"); //charge l IA aster_t = Content.Load<Texture2D>("IA/asteroid/asteroide-sprite"); planet1 = Content.Load<Texture2D>("IA/asteroid/planet4"); star = Content.Load<Texture2D>("IA/asteroid/star"); //instancie le scolling manage_T = new IA_manager_T(planet1, new Rectangle(0, 0, taille_sprt, taille_sprt), Content, height, width); manage_V = new IA_manager_V(star, new Rectangle(0, 0, taille_sprt, taille_sprt), Content, height, width); manage_k = new IA_manager_K(aster_t, new Rectangle(0, 0, taille_sprt, taille_sprt), height, width); //intancie le vaisseau vaisseau = new sripte_V( new Rectangle(height / 2 + taille_sprt / 2, width / 2 + taille_sprt / 2, taille_sprt, taille_sprt), height, width); vaisseau.Load(Content, T_sprite); ovni = new Ovni(width, height); ovni.param(3); ovni.Load(aster_t); //instancie les donnees de la pause _pause.LoadContent(Content); user.LoadContent(manage_T, manage_V, manage_k, Scroll_manager, Content, ovni); }