Пример #1
0
 void OnObserveVariableEvent(StratusStory.ObserveVariableEvent e)
 {
     if (debug)
     {
         this.Log("Observing " + e.variableName);
     }
     story.runtime.ObserveVariable(e.variableName, e.variableObserver);
 }
        void ObserveValue()
        {
            if (setObserver)
            {
                return;
            }

            var observeEvent = new StratusStory.ObserveVariableEvent();

            observeEvent.variableName     = variable.name;
            observeEvent.variableObserver = OnValueChanged;
            reader.gameObject.Dispatch <StratusStory.ObserveVariableEvent>(observeEvent);
            setObserver = true;
        }