Esempio n. 1
0
                void RetrieveValue()
                {
                    var findValueEvent = new Story.RetrieveVariableValueEvent();

                    findValueEvent.variable = this.variable;
                    this.gameObject.Dispatch <Story.RetrieveVariableValueEvent>(findValueEvent);

                    PrintValue();
                }
Esempio n. 2
0
                void OnRetrieveVariableValueEvent(Story.RetrieveVariableValueEvent e)
                {
                    switch (e.variable.type)
                    {
                    case Story.Types.Integer:
                        e.variable.intValue = Story.GetVariableValue <int>(story.runtime, e.variable.name);
                        break;

                    case Story.Types.Boolean:
                        e.variable.boolValue = Story.GetVariableValue <bool>(story.runtime, e.variable.name);
                        break;

                    case Story.Types.Float:
                        e.variable.floatValue = Story.GetVariableValue <float>(story.runtime, e.variable.name);
                        break;

                    case Story.Types.String:
                        e.variable.stringValue = Story.GetVariableValue <string>(story.runtime, e.variable.name);
                        break;
                    }
                }