onEnter() public method

public onEnter ( ) : void
return void
Esempio n. 1
0
 // ------------------------------------------------------------------------------
 //  CCNode SceneManagement
 // ------------------------------------------------------------------------------
 //
 //onEnter & onExit
 //
 public virtual void onEnter()
 {
     if (_children != null)
     {
         int childrenCount = _children.Count;
         for (int i = 0; i < childrenCount; i++)
         {
             CCNode child = _children[i];
             child.onEnter();
         }
     }
     resumeSchedulerAndActions();
     _isRunning = true;
     gameObject.SetActive(_visible);
 }
Esempio n. 2
0
        /* "add" logic MUST only be on this method
         * If a class want's to extend the 'addChild' behaviour it only needs
         * to override this method
         */
        public virtual void addChild(CCNode child, int z, string tag)
        {
            NSUtils.Assert(child != null, "Argument must be non-nil");
            NSUtils.Assert(child.parent == null, "child already added. It can't be added again");

            if (_children == null)
            {
                _children = new List <CCNode> ();
            }
            insertChild(child, z);

            child.userTag        = tag;
            child.parent         = this;
            child.orderOfArrival = globalOrderOfArrival++;

            if (_isRunning)
            {
                child.onEnter();
                child.onEnterTransitionDidFinish();
            }
        }
Esempio n. 3
0
		/* "add" logic MUST only be on this method
		 * If a class want's to extend the 'addChild' behaviour it only needs
		 * to override this method
		 */
		public virtual void addChild(CCNode child, int z, string tag){
			NSUtils.Assert( child != null, "Argument must be non-nil");
			NSUtils.Assert( child.parent == null, "child already added. It can't be added again");
			
			if (_children == null)
				_children = new List<CCNode> ();
			insertChild (child, z);
			
			child.userTag = tag;
			child.parent = this;
			child.orderOfArrival = globalOrderOfArrival ++;
			
			if (_isRunning) {
				child.onEnter();
				child.onEnterTransitionDidFinish();
			}
		}