void RetrieveValue() { var findValueEvent = new StratusStory.RetrieveVariableValueEvent(); findValueEvent.variable = this.variable; this.gameObject.Dispatch <StratusStory.RetrieveVariableValueEvent>(findValueEvent); PrintValue(); }
void OnRetrieveVariableValueEvent(StratusStory.RetrieveVariableValueEvent e) { switch (e.variable.type) { case StratusStory.Types.Integer: e.variable.intValue = StratusStory.GetVariableValue <int>(story.runtime, e.variable.name); break; case StratusStory.Types.Boolean: e.variable.boolValue = StratusStory.GetVariableValue <bool>(story.runtime, e.variable.name); break; case StratusStory.Types.Float: e.variable.floatValue = StratusStory.GetVariableValue <float>(story.runtime, e.variable.name); break; case StratusStory.Types.String: e.variable.stringValue = StratusStory.GetVariableValue <string>(story.runtime, e.variable.name); break; } }