public override void LoadData(Dictionary <string, string> data, bool fromSaveGame) { if (data.ContainsKey("point0")) { point0 = VertexUtils.ParseVector3(data["point0"]); } if (data.ContainsKey("repeat")) { repeat = bool.Parse(data["repeat"]); } if (data.ContainsKey("state")) { state = bool.Parse(data["state"]); } if (data.ContainsKey("timeSpeed")) { timeSpeed = float.Parse(data["timeSpeed"]); } if (data.ContainsKey("gravity")) { gravity = float.Parse(data["gravity"]); } if (data.ContainsKey("initialSpeed")) { initialSpeed = VertexUtils.ParseVector3(data["initialSpeed"]); } if (data.ContainsKey("bounceTimes")) { bounceTimes = int.Parse(data["bounceTimes"]); } if (data.ContainsKey("bounceFactor")) { bounceFactor = float.Parse(data["bounceFactor"]); } if (data.ContainsKey("groupFollows")) { groupFollows = bool.Parse(data["groupFollows"]); } if (data.ContainsKey("t")) { t = int.Parse(data["t"]); } if (data.ContainsKey("vy")) { vy = float.Parse(data["vy"]); } if (data.ContainsKey("points")) { points = data["points"].Split(new string[] { "|" }, StringSplitOptions.RemoveEmptyEntries).ToList().ConvertAll <Vector3>(x => VertexUtils.ParseVector3(x)); } if (data.ContainsKey("vys")) { vys = data["vys"].Split(new string[] { "|" }, StringSplitOptions.RemoveEmptyEntries).ToList().ConvertAll <float>(x => float.Parse(x)); } }
public override void LoadData(Dictionary <string, string> data, bool fromSaveGame) { if (data.ContainsKey("rotateAround_speedRPM")) { this.speedRPM = float.Parse(data["rotateAround_speedRPM"]); } if (data.ContainsKey("rotateAround_reverseDirection")) { this.reverseDirection = bool.Parse(data["rotateAround_reverseDirection"]); } if (data.ContainsKey("rotateAround_center")) { this.center = VertexUtils.ParseVector3(data["rotateAround_center"]); } }