Focused behavior
Inheritance: Behavior, IDisposable
コード例 #1
0
ファイル: FocusBehavior.cs プロジェクト: sizzles/Components
 /// <summary>
 /// Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
 /// </summary>
 public void Dispose()
 {
     // If this component was disposed. Remove the static reference to avoid unnecessary memory withholding
     if (CurrentFocus == this)
     {
         CurrentFocus = null;
     }
 }
コード例 #2
0
        /// <summary>
        /// Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
        /// </summary>
        public override void Dispose()
        {
            FocusBehavior focusBehavior = this.entity.FindComponent <FocusBehavior>();

            if (focusBehavior != null)
            {
                if (FocusBehavior.CurrentFocus == focusBehavior)
                {
                    FocusBehavior.CurrentFocus = null;
                }
            }

            base.Dispose();
        }
コード例 #3
0
 /// <summary>
 /// Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
 /// </summary>
 public void Dispose()
 {
     // If this component was disposed. Remove the static reference to avoid unnecessary memory withholding 
     if (CurrentFocus == this)
     {
         CurrentFocus = null;
     }
 }