Ejemplo n.º 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 ();
        }
Ejemplo n.º 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();
        }
Ejemplo n.º 3
0
 public Map(string name, TextureLookup lookup)
 {
     Name = name;
     Lookup = lookup;
     Fragments = new List<MapFragment> ();
 }
Ejemplo n.º 4
0
 public Map(string name, TextureLookup lookup)
 {
     Name      = name;
     Lookup    = lookup;
     Fragments = new List <MapFragment> ();
 }