BBGamelib.CCNode.onExit C# (CSharp) Method

onExit() public method

public onExit ( ) : void
return void
		public virtual void onExit(){
			pauseSchedulerAndActions ();
			_isRunning = false;
			
			if (_children != null) {
				for(int i=_children.Count -1; i>=0; i--){
					CCNode child = _children[i];
					child.onExit ();
				}
			}
		}
		#endregion

Usage Example

        void detachChild(CCNode child, bool cleanup)
        {
            // IMPORTANT:
            //  -1st do onExit
            //  -2nd cleanup
            if (_isRunning)
            {
                child.onExitTransitionDidStart();
                child.onExit();
            }

            child.parent = null;
            _children.Remove(child);


            // If you don't do cleanup, the child's actions will not get removed and the
            // its scheduledSelectors_ dict will not get released!
            if (cleanup)
            {
                child.cleanup();
            }
            else
            {
                child.gameObject.SetActive(false);
            }
        }
All Usage Examples Of BBGamelib.CCNode::onExit