private void ApplyLogic(GameState s, float dt, DevCommandKillUnits c) { RTSTeam team; for (int ti = 0; ti < s.activeTeams.Length; ti++) { team = s.activeTeams[ti].Team; foreach (var unit in team.Units) { unit.Damage(9001); // OVER 9000 } } }
// Dev Callback public void OnDevCommand(string s) { DevCommand c; if (DevCommandSpawn.TryParse(s, out c)) { commands.Enqueue(c); return; } else if (DevCommandStopMotion.TryParse(s, out c)) { commands.Enqueue(c); return; } else if (DevCommandKillUnits.TryParse(s, out c)) { commands.Enqueue(c); return; } else if (DevCommandKillBuildings.TryParse(s, out c)) { commands.Enqueue(c); return; } else if (DevCommandFOW.TryParse(s, out c)) { commands.Enqueue(c); return; } else if (DevCommandSave.TryParse(s, out c)) { commands.Enqueue(c); return; } else if (DevCommandCapital.TryParse(s, out c)) { commands.Enqueue(c); return; } }