private void loadStateData() { XmlSerializer deserializer = new XmlSerializer(typeof(SaveStateInfo)); TextReader textReader = new StreamReader(@".\savedState.xml"); SaveStateInfo loadedState; loadedState = (SaveStateInfo)deserializer.Deserialize(textReader); textReader.Close(); currentState = loadedState; Messenger<string>.Broadcast("ScrubberFrameAdvance0", currentState.pathToFrontFrame); Messenger<string>.Broadcast("ScrubberFrameAdvance1", currentState.pathToTopFrame); Messenger<string>.Broadcast("MocapLoadedState", currentState.pathToMocapData); }
private void loadStateData() { XmlSerializer deserializer = new XmlSerializer(typeof(SaveStateInfo)); TextReader textReader = new StreamReader(@".\savedState.xml"); SaveStateInfo loadedState; loadedState = (SaveStateInfo)deserializer.Deserialize(textReader); textReader.Close(); currentState = loadedState; Messenger <string> .Broadcast("ScrubberFrameAdvance0", currentState.pathToFrontFrame); Messenger <string> .Broadcast("ScrubberFrameAdvance1", currentState.pathToTopFrame); Messenger <string> .Broadcast("MocapLoadedState", currentState.pathToMocapData); }
// Use this for initialization void Start() { Messenger.AddListener("TurnOffGui", onTurnOffGui); Messenger.AddListener("TurnOnGui", onTurnOnGui); currentState = new SaveStateInfo(); }