/// <summary>
        /// The function loads the assets
        /// </summary>
        /// <param name="source"></param>
        public void init(String source)
        {
            Log.getInstance().log("@Folder:AssetKeeper, Class:AssetsKeeper, Log Type: Program Run Log, Line No: 29, " + "AssetsKeeper " + this.ToString() + " loading the assets from : " + source);

            try
            {
                XMLReader reader = new XMLReader(source);
                reader.process("assets");
                reader.getObjectSpace().convert(this.convert);

                //Add to the asset systems
                for (int i = 0; i < assets.Count; i++)
                {
                    Assets.getInstance().add(assets.ElementAt(i));
                }
            }
            catch (Exception e)
            {
                Log.getInstance().log("@Folder:AssetKeeper, Class:AssetKeeper, Log Type: Error, Line No: 45, " + "AssetsKeeper could not load the assets " + e.ToString());
                System.Environment.Exit(-1);
                System.Console.WriteLine(e);
            }

            Log.getInstance().log("@Folder:AssetKeeper, Class:AssetKeeper, Log Type: Program Run Log, Line No: 50, " + "AssetsKeeper finished loading the assets from " + source);
        }
示例#2
0
 public void init(String file)
 {
     Log.getInstance().log("@Folder:SWRenderer, Class:Style, Log Type: Program Run Log, Line No: 41, " + "Style starting to load the file style " + file);
     XMLReader reader = new XMLReader(file);
     reader.process("style");
     reader.getObjectSpace().convert(this.convert);
     Log.getInstance().log("@Folder:SWRenderer, Class:Style, Log Type: Program Run Log, Line No: 45, " + "Style finished loading file style " + file);
 }
        /// <summary>
        /// The function loads the events
        /// </summary>
        /// <param name="source"></param>
        public void init(String source)
        {
            Log.getInstance().log("@Folder:Events, Class:EventMap, Log Type: Program Run Log, Line No: 130, " + "EventMap " + this.ToString() + " from " + source + " starting to load the events ");

            XMLReader reader = new XMLReader(source);
            reader.process("events");
            reader.getObjectSpace().convert(this.convert);

            Log.getInstance().log("@Folder:Events, Class:EventMap, Log Type: Program Run Log, Line No: 137 " + "EventMap " + this.ToString() + " finished loading events " + source);
        }
        /// <summary>
        /// The function loads the map information from an xml file
        /// </summary>
        /// <param name="source"></param>
        public void init(String source)
        {
            Log.getInstance().log("@Folder:WorldData, Class:MapInformation, Log Type: Program Run Log, Line No: 70, " + "MapInformation " + this.ToString() + " starting to load the map " + source);

            XMLReader reader = new XMLReader(source);
            reader.process("mapObject");
            reader.getObjectSpace().convert(this.getMapObjects);

            reader = new XMLReader(source);
            reader.process("mapQuads");
            reader.getObjectSpace().convert(this.getMapQuads);

            Log.getInstance().log("@Folder:WorldData, Class:MapInformation, Log Type: Program Run Log, Line No: 80, " + "MapInformation " + this.ToString() + " finished loading the map information from " + source);
        }
 /// <summary>
 /// Load all the worlds from the xml file
 /// </summary>
 public void init(String file)
 {
     Log.getInstance().log("@Folder:WorldKeeper, Class:WorldsKeeper, Log Type: Program Run Log, Line No: 78, " + "WorldsKeeper loading the worlds");
     XMLReader reader = new XMLReader(file);
     reader.process("worlds");
     reader.getObjectSpace().convert(this.convert);
     Log.getInstance().log("@Folder:WorldKeeper, Class:WorldsKeeper, Log Type: Program Run Log, Line No: 82, " + "WorldsKeeper finished loading the worlds");
 }
 /// <summary>
 /// Loads the scripts from a file
 /// </summary>
 /// <param name="source"></param>
 public void init(String source)
 {
     Log.getInstance().log("@Folder:Scripts, Class:ScriptKeeper, Log Type: Program Run Log, Line No: 82, " + "Scriptkeeper : Starting to load scripts ");
     XMLReader reader = new XMLReader(source);
     reader.process("script");
     reader.getObjectSpace().convert(this.convert);
     Log.getInstance().log("@Folder:Scripts, Class:ScriptKeeper, Log Type: program Run Log, Line No: 86, " + "Scriptkeeper : Finished loading scripts ");
 }