Пример #1
0
        static public Map Load(Camera camera, GameObject mapP, string filename)
        {
            Rule.Rule r   = Rule.Rule.ReadLevel(filename);
            Map       map = new Map(camera, mapP, r.size, r.maxBudget, filename);

            map._mapVertices                      = r.LoadHeightmap(map._mapVertices);
            map._localDifficulty                  = r.LoadDifficulty(map._localDifficulty);
            map._meshFilter.mesh.vertices         = map._mapVertices;
            map._meshCollider.sharedMesh.vertices = map._mapVertices;
            map._meshFilter.mesh.colors           = map._localDifficulty;

            return(map);
        }
Пример #2
0
 public void Save()
 {
     Rule.Rule r = new Rule.Rule(_mapVertices, _localDifficulty, (byte)_size, _money);
     Rule.Rule.SaveLevel(_filename, r);
 }