BBGamelib.CCScheduler.scheduleUpdate C# (CSharp) Method

scheduleUpdate() public method

public scheduleUpdate ( System target, int priority, bool paused ) : void
target System
priority int
paused bool
return void
		public void scheduleUpdate(System.Object target, int priority, bool paused){
			tHashUpdateEntry hashElement = hashForUpdates.HASH_FIND_INT(target.GetHashCode());
			if (hashElement!=null) {
				if(CCDebug.COCOS2D_DEBUG>=1)
					NSUtils.Assert(hashElement.entry.obj.markedForDeletion, "CCScheduler: You can't re-schedule an 'update' selector'. Unschedule it first");			

				// TODO : check if priority has changed!
				hashElement.entry.obj.markedForDeletion = false;
				return;
			}
			
			
			// most of the updates are going to be 0, that's way there
			// is an special list for updates with priority 0
			if (priority == 0){
				appendIn (updates0, target, paused);
			}
			else if (priority < 0)
				priorityIn (updatesNeg, target, priority, paused);
			else // priority > 0
				priorityIn (updatesPos, target, priority, paused);
		}

Usage Example

コード例 #1
0
        protected CCDirector()
        {
            CCDebug.Log("cocos2d: cocos2d-iphone v2.1");
            // scenes
            _runningScene = null;
            _nextScene    = null;

//			_notificationNode = nil;

            _oldAnimationInterval = _animationInterval = 1.0f / kDefaultFPS;
            _scenesStack          = new Stack <CCScene> (10);

            // Set default projection (3D)
//			_projection = kCCDirectorProjectionDefault;

            // projection delegate if "Custom" projection is used
//			_delegate = nil;

            // FPS
            _displayStats = false;

            _displayError = false;

//			_totalFrames = _frames = 0;

            // paused ?
            _isPaused = false;

            // running thread
//			_runningThread = null;

            // scheduler
            _scheduler = new CCScheduler();

            // action manager
            _actionManager = new CCActionManager();
            _scheduler.scheduleUpdate(_actionManager, CCScheduler.kCCPrioritySystem, false);

            _winSizeInPixels = Vector2.zero;


            //CCDirectorIOS
//			_ccContentScaleFactor = 1;
//			_isContentScaleSupported = false;
            _touchDispatcher = new CCTouchDispatcher();
        }
All Usage Examples Of BBGamelib.CCScheduler::scheduleUpdate