Esempio n. 1
0
        /// <summary>
        ///jeu level perso chargement
        /// </summary>
        /// <param name="level">nom du niveau</param>
        /// <param name="iamanage_K">manager de ia</param>
        /// <param name="iamanage_T"></param>
        /// <param name="iamanage_V"></param>
        public void load_leveleditor_SEU(ContentManager Content, string level, ref IA_manager_K iamanage_K,
            ref IA_manager_T iamanage_T, ref IA_manager_V iamanage_V, ref Scrolling_ManagerV scrollM, ref GraphicsDevice grap, ref sripte_V sprite, ref Ovni ovni)
        {
            savefile savefile = new savefile();
            load_SEU(ref level, ref savefile);
            for (int j = 0; j < savefile.ia_tireur.Count; ++j)
                iamanage_T.Add(savefile.ia_tireur[j]);
            for (int j = 0; j < savefile.ia_viseur.Count; ++j)
                iamanage_V.Add(savefile.ia_viseur[j]);
            for (int j = 0; j < savefile.ia_Kamikaze.Count; ++j)
                iamanage_K.Add(savefile.ia_Kamikaze[j]);
            for (int j = 0; j < savefile.bonus.Count; ++j)
                ovni.Add(savefile.bonus[j]);

            scrollM.Load(Content, savefile.levelProfile, grap);
            sprite.parametrage(ref savefile.levelProfile);
            ovni.param(savefile.levelProfile.fc_speed);
        }
Esempio n. 2
0
        /// <summary>
        ///  jeu normal chargement
        /// </summary>
        /// <param name="Content"></param>
        /// <param name="level">nom du nivau</param>
        /// <param name="iamanage_K"></param>
        /// <param name="iamanage_T"></param>
        /// <param name="iamanage_V"></param>
        public void load_level_SEU(ContentManager Content, ref string level, ref string next, ref IA_manager_K iamanage_K,
            ref IA_manager_T iamanage_T, ref IA_manager_V iamanage_V, ref Scrolling_ManagerV scrollM, ref GraphicsDevice grash, ref sripte_V sprite, ref Ovni ovni)
        {
            savefile savefil = new savefile();
            FileStream file1 = null;
            XmlSerializer f = null;

            DirectoryInfo dir = null;
            dir = new DirectoryInfo(Content.RootDirectory + "\\" + level);
            if (dir.Exists)
            {
                file1 = new FileStream(dir.FullName + "\\level.lvl", FileMode.Open, FileAccess.Read);
                f = new XmlSerializer(typeof(savefile));
                savefil = (savefile)f.Deserialize(file1);
                file1.Close();
            }
            for (int j = 0; j < savefil.ia_tireur.Count; ++j)
                iamanage_T.Add(savefil.ia_tireur[j]);
            for (int j = 0; j < savefil.ia_viseur.Count; ++j)
                iamanage_V.Add(savefil.ia_viseur[j]);
            for (int j = 0; j < savefil.ia_Kamikaze.Count; ++j)
                iamanage_K.Add(savefil.ia_Kamikaze[j]);
            for (int j = 0; j < savefil.bonus.Count; ++j)
                ovni.Add(savefil.bonus[j]);
            scrollM.Load(Content, savefil.levelProfile, grash);
            sprite.parametrage(ref savefil.levelProfile);
            ovni.param(savefil.levelProfile.fc_speed);
            next = savefil.levelProfile.next_level;
        }