Пример #1
0
        public void SetConfig(GeneratorParameter config)
        {
            if (UseLocalGenerator)
            {
                _generator.Config = config;
                return;
            }
            WriteMessage(ConfigMessage(config));

            /*JSONObject obj2 = new JSONObject();
             * obj2["action"] = "RESULT";
             * obj2["data"]["index"]["x"] = 0;
             * obj2["data"]["index"]["y"] = 0;
             * obj2["dimension"] = config.ChunkSize;
             * JSONArray a = new JSONArray();
             * for (int i = 0; i < config.ChunkSize * config.ChunkSize; i++) a.Add(0);
             * obj2["data"] = a;
             * WriteMessage(obj2.ToString());*/
        }
Пример #2
0
 // Start is called before the first frame update
 void Start()
 {
     config           = GetComponent <Assets.GeneratorParameter>();
     generator        = new Assets.TerrainGenerator();
     generator.Config = config;
 }