コード例 #1
0
 void OnObserveVariableEvent(StratusStory.ObserveVariableEvent e)
 {
     if (debug)
     {
         this.Log("Observing " + e.variableName);
     }
     story.runtime.ObserveVariable(e.variableName, e.variableObserver);
 }
コード例 #2
0
        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;
        }