public void SaveToSaveFile(PropertyWriter p) { p.Set("mapname", this.Name); foreach (var o in this.objects) { PropertyWriter op = p.Create("object"); op.Set("player", o is PlayerSprite); o.SaveToSaveFile(op); } }
public void SaveToSaveFile(PropertyWriter p) { p.Set("x", x); p.Set("y", y); p.Set("layer", layer); p.Set("corrX", corrX); p.Set("corrY", corrY); p.Set("sprite", name); p.Set("action", action == null ? "" : action.Raw); p.Set("movement", movementAI is ScriptedMovementAI ? ((ScriptedMovementAI)MovementAI).Script.Raw : ""); p.Set("collide", Collide == null ? "" : Collide.Raw); p.Set("facing", this.facing.ToString()); p.Set("moving", this.moving.ToString()); }