public static Serialize ( |
||
s | ||
squad | ||
Результат | void |
public static void Serialize(BinaryWriter s, RTSTeam team) { s.Write(team.Type); RTSRace.Serialize(s, team.Race); if (team.Input != null) { s.Write(true); s.Write(ReflectedScript.GetKey(team.Input)); team.Input.Serialize(s); } else { s.Write(false); } s.Write(team.ColorScheme.Name); s.Write(team.ColorScheme.Primary); s.Write(team.ColorScheme.Secondary); s.Write(team.ColorScheme.Tertiary); s.Write(team.Buildings.Count); foreach (var building in team.Buildings) { RTSBuilding.Serialize(s, building); } s.Write(team.Units.Count); foreach (var unit in team.Units) { RTSUnit.Serialize(s, unit); } s.Write(team.Squads.Count); foreach (var squad in team.Squads) { RTSSquad.Serialize(s, squad); } }