BBGamelib.CCTouchDispatcher.setPriority C# (CSharp) Method

setPriority() public method

public setPriority ( int priority, System aDelegate ) : void
priority int
aDelegate System
return void
		public void setPriority(int priority, System.Object aDelegate)
		{
			NSUtils.Assert(aDelegate != null, "Got nil touch delegate!");
			
			CCTouchHandler handler = null;
			handler = findHandler(aDelegate);
			
			NSUtils.Assert(handler != null, "Delegate not found!");
			
			handler.priority = priority;
			
			rearrangeHandlers(targetedHandlers);
			rearrangeHandlers(standardHandlers);
		}
		

Usage Example

        /** set event handler priority. By default it is: kCCMenuTouchPriority */
        public void setHandlerPriority(int newPriority)
        {
            CCTouchDispatcher dispatcher = CCDirector.sharedDirector.touchDispatcher;

            dispatcher.setPriority(newPriority, this);
        }