예제 #1
0
        // Use this for initialization
        void Start()
        {
            Game.game.Initialize();

            map.Create(256, 256);
            dMap.Initialize(map, 30, 20, 1, 1);

//            map
        }
예제 #2
0
        public void CreateNew()
        {
            SerializedGameLevel gl = new SerializedGameLevel();

            gl.crtSettings_id = "crt";
            gl.mapName        = GameObject.Find("inpMapName").GetComponent <InputField>().text;
            gl.name           = GameObject.Find("inpNewName").GetComponent <InputField>().text;

            Map2D map = new Map2D();
            int   x   = int.Parse(GameObject.Find("inpX").GetComponent <InputField>().text);
            int   y   = int.Parse(GameObject.Find("inpY").GetComponent <InputField>().text);

            map.Create(x, y);
            Map2D.Save(map, gl.mapName);

            SerializedGameLevels.gameLevels.levels.Add(gl);
            SaveAll();

            currentLevel.Destroy();
            currentLevel = SerializedGameLevels.getLevel(gl.name);
        }
예제 #3
0
 private void Test()
 {
     map = new Map2D();
     map.Create(32, 20);
     Map2D.Save(map, "test_map1");
 }