Пример #1
0
        /// <summary>
        /// Attempt to grab our property from the service so that we can bind it.
        /// </summary>
        private IEnumerator CheckForProperty()
        {
            mSearching = true;

            yield return(new WaitForEndOfFrame());

            yield return(new WaitForEndOfFrame());

            while (mProperty == null)
            {
                mProperty = mUIManagerRef.GetProperty <T>(mPropertyHash);
                yield return(null);
            }

            AttachProperty();
        }
Пример #2
0
        /// <summary>
        /// Attempt to grab our properties from the service so that we can bind them.
        /// </summary>
        private IEnumerator CheckForProperties()
        {
            mSearching = true;

            yield return(null);

            yield return(null);

            while (mCurrentValue == null || mFullValueProperty == null && !string.IsNullOrEmpty(mFullProperty))
            {
                mCurrentValue = mUIManagerRef.GetProperty <T>(mCurrentHash);
                if (!string.IsNullOrEmpty(mFullProperty))
                {
                    mFullValueProperty = mUIManagerRef.GetProperty <T>(mFullHash);
                }

                yield return(null);
            }

            AttachProperties();
        }
Пример #3
0
 /// <summary>
 /// Unity's Awake function.
 /// Sets things up to bind our property assigned in-editor.
 /// </summary>
 protected virtual void Awake()
 {
     mPropertyHash = mBoundProperty.GetHashCode();
     mProperty     = null;
 }
Пример #4
0
 /// <summary>
 /// Handle a property being destroyed and start to look for a new one.
 /// </summary>
 private void CleanupProperty()
 {
     mProperty.ValueChanged   -= HandlePropertyChanged;
     mProperty.BeingDestroyed -= CleanupProperty;
     mProperty = null;
 }
Пример #5
0
 /// <summary>
 /// Cleanup references to the full value property.
 /// </summary>
 private void CleanupFullProperty()
 {
     mFullValueProperty.ValueChanged   -= FullValueChanged;
     mFullValueProperty.BeingDestroyed -= CleanupFullProperty;
     mFullValueProperty = null;
 }
Пример #6
0
 /// <summary>
 /// Cleanup references to the current value property.
 /// </summary>
 private void CleanupCurrentProperty()
 {
     mCurrentValue.ValueChanged   -= CurrentValueChanged;
     mCurrentValue.BeingDestroyed -= CleanupCurrentProperty;
     mCurrentValue = null;
 }