public void ReadWaves(WaveSet waves) { ClearWaves(); foreach (var wave in waves.waves) { var waveHandler = AddWaveAndReturnHandler(); waveHandler.Initialize(wave.entities); } }
public void ParseWaves(string path) { WaveSet set = new WaveSet(); set.waves = new SiegeWave[waveHandlers.Count]; for (int i = 0; i < set.waves.Length; i++) { set.waves[i] = waveHandlers[i].Parse(); } CopyToClipboard(JsonUtility.ToJson(set)); System.IO.File.WriteAllText(path, JsonUtility.ToJson(set)); }