onEnter() public method

public onEnter ( ) : void
return void
コード例 #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);
 }
コード例 #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();
            }
        }
コード例 #3
0
ファイル: CCNode.cs プロジェクト: BigWoodGames/cocos2d-unity
		/* "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();
			}
		}