Пример #1
0
        protected override void Initialize()
        {
            // Register map handler for saving and loading maps
            Content.RegisterAssetHandler<Map> (typeof(MapHandler));

            // Create texture lookup
            Textures = new TextureLookup ();
            LoadTextures ();
            SerializeTestMap ();

            // Initialize python vm
            Python = new PythonVM (this);
            var original = Python.Reloader.LoadScript;
            Python.Reloader.LoadScript = new Action<nginz.Common.Script> (script => {
                original (script);
                Python.Call ("loadcontent", this, Content);
            });
            LoadScripts ();
            Python.Call ("initialize", this);

            base.Initialize ();
        }
Пример #2
0
        protected override void Initialize()
        {
            // Register map handler for saving and loading maps
            Content.RegisterAssetHandler <Map> (typeof(MapHandler));

            // Create texture lookup
            Textures = new TextureLookup();
            LoadTextures();
            SerializeTestMap();

            // Initialize python vm
            Python = new PythonVM(this);
            var original = Python.Reloader.LoadScript;

            Python.Reloader.LoadScript = new Action <nginz.Common.Script> (script => {
                original(script);
                Python.Call("loadcontent", this, Content);
            });
            LoadScripts();
            Python.Call("initialize", this);

            base.Initialize();
        }
Пример #3
0
 public Map(string name, TextureLookup lookup)
 {
     Name = name;
     Lookup = lookup;
     Fragments = new List<MapFragment> ();
 }
Пример #4
0
 public Map(string name, TextureLookup lookup)
 {
     Name      = name;
     Lookup    = lookup;
     Fragments = new List <MapFragment> ();
 }