protected override JsonObject Serialize() { JsonObject json = new JsonObject(); json["now"] = Helper.ToUnixTimeMs(DateTime.UtcNow); json["waveHP"] = _currentWaveHP.Serialize(); json["decadeHP"] = _currentDecadeStartHP.Serialize(); json["hpPerZombie"] = _hpPerZombie.Serialize(); json["zombieCount"] = _currentZombieCount; json["decadeCount"] = _currentDecadeZombieCount; json["waveNumber"] = WaveNumber; json["mainType"] = _currentMainZombieType.ToString(); JsonArray mainTypes = new JsonArray(); for (int i = 0; i < _otherMainTypes.Count; i++) { mainTypes.Add(_otherMainTypes[i].ToString()); } json["otherMainTypes"] = mainTypes; JsonArray addTypes = new JsonArray(); for (int i = 0; i < _otherAddTypes.Count; i++) { addTypes.Add(_otherAddTypes[i].ToString()); } json["otherAddTypes"] = addTypes; json["aliveCount"] = _zombies.Count; json["lastBossAlive"] = _lastBossAlive; JsonArray zombies = new JsonArray(); for (int i = 0; i < _zombies.Count; i++) { zombies.Add(_zombies[i].Serialize()); } json["zombies"] = zombies; return(json); }