Beispiel #1
0
 public static void OnPropChanged(ModelPropChangedData changedData)
 {
     if (ModelBinder.Instance != null)
     {
         ModelBinder.Instance._OnPropChanged(changedData);
     }
 }
Beispiel #2
0
        void _OnPropChanged(ModelPropChangedData changedData)
        {
            if (changedData.delay > 0)
            {
                _delayedEvents.Add(changedData);
                return;
            }

            InvokeListeners(changedData.propKey, changedData.changeValue);
        }
Beispiel #3
0
 void Update()
 {
     if (_delayedEvents.Count > 0)
     {
         for (int i = _delayedEvents.Count - 1; i >= 0; i--)
         {
             ModelPropChangedData data = _delayedEvents [i];
             data.delay -= Time.deltaTime;
             if (data.delay <= 0)
             {
                 _delayedEvents.RemoveAt(i);
                 InvokeListeners(data.propKey, data.changeValue);
             }
         }
     }
 }