@@ -625,11 +625,11 @@ cc.Scheduler = cc.Class.extend(/** @lends cc.Scheduler# */{
625
625
* @param {Boolean } paused
626
626
* @example
627
627
* //register a schedule to scheduler
628
- * cc.Director.getInstance().getScheduler().scheduleSelector(selector , this, interval, !this._isRunning);
628
+ * cc.Director.getInstance().getScheduler().scheduleCallback(function , this, interval, !this._isRunning);
629
629
*/
630
- scheduleSelector :function ( selector , target , interval , paused , repeat , delay ) {
631
- cc . Assert ( selector , "scheduler.scheduleSelector () Argument selector must be non-NULL" ) ;
632
- cc . Assert ( target , "scheduler.scheduleSelector () Argument target must be non-NULL" ) ;
630
+ scheduleCallback :function ( selector , target , interval , paused , repeat , delay ) {
631
+ cc . Assert ( selector , "scheduler.scheduleCallback () Argument selector must be non-NULL" ) ;
632
+ cc . Assert ( target , "scheduler.scheduleCallback () Argument target must be non-NULL" ) ;
633
633
634
634
repeat = ( repeat == null ) ? cc . REPEAT_FOREVER : repeat ;
635
635
delay = delay || 0 ;
@@ -651,7 +651,7 @@ cc.Scheduler = cc.Class.extend(/** @lends cc.Scheduler# */{
651
651
for ( var i = 0 ; i < element . timers . length ; i ++ ) {
652
652
timer = element . timers [ i ] ;
653
653
if ( selector == timer . _selector ) {
654
- cc . log ( "CCSheduler#scheduleSelector. Selector already scheduled. Updating interval from:"
654
+ cc . log ( "CCSheduler#scheduleCallback. Callback already scheduled. Updating interval from:"
655
655
+ timer . getInterval ( ) . toFixed ( 4 ) + " to " + interval . toFixed ( 4 ) ) ;
656
656
timer . _interval = interval ;
657
657
return ;
@@ -703,16 +703,16 @@ cc.Scheduler = cc.Class.extend(/** @lends cc.Scheduler# */{
703
703
704
704
/**
705
705
* <p>
706
- * Unschedule a selector for a given target.<br/>
706
+ * Unschedule a callback function for a given target.<br/>
707
707
* If you want to unschedule the "update", use unscheudleUpdateForTarget.
708
708
* </p>
709
709
* @param {function } selector
710
710
* @param {cc.Class } target
711
711
* @example
712
712
* //unschedule a selector of target
713
- * cc.Director.getInstance().getScheduler().unscheduleSelector(selector , this);
713
+ * cc.Director.getInstance().getScheduler().unscheduleCallback(function , this);
714
714
*/
715
- unscheduleSelector :function ( selector , target ) {
715
+ unscheduleCallback :function ( selector , target ) {
716
716
// explicity handle nil arguments when removing an object
717
717
if ( ( target == null ) || ( selector == null ) ) {
718
718
return ;
@@ -769,10 +769,10 @@ cc.Scheduler = cc.Class.extend(/** @lends cc.Scheduler# */{
769
769
} ,
770
770
771
771
/**
772
- * Unschedules all selectors for a given target. This also includes the "update" selector .
772
+ * Unschedules all function callbacks for a given target. This also includes the "update" callback function .
773
773
* @param {cc.Class } target
774
774
*/
775
- unscheduleAllSelectorsForTarget :function ( target ) {
775
+ unscheduleAllCallbacksForTarget :function ( target ) {
776
776
//explicit NULL handling
777
777
if ( target == null ) {
778
778
return ;
@@ -797,27 +797,27 @@ cc.Scheduler = cc.Class.extend(/** @lends cc.Scheduler# */{
797
797
798
798
/**
799
799
* <p>
800
- * Unschedules all selectors from all targets. <br/>
800
+ * Unschedules all function callbacks from all targets. <br/>
801
801
* You should NEVER call this method, unless you know what you are doing.
802
802
* </p>
803
803
*/
804
- unscheduleAllSelectors :function ( ) {
805
- this . unscheduleAllSelectorsWithMinPriority ( cc . PRIORITY_SYSTEM ) ;
804
+ unscheduleAllCallbacks :function ( ) {
805
+ this . unscheduleAllCallbacksWithMinPriority ( cc . PRIORITY_SYSTEM ) ;
806
806
} ,
807
807
808
808
/**
809
809
* <p>
810
- * Unschedules all selectors from all targets with a minimum priority.<br/>
810
+ * Unschedules all function callbacks from all targets with a minimum priority.<br/>
811
811
* You should only call this with kCCPriorityNonSystemMin or higher.
812
812
* </p>
813
813
* @param {Number } minPriority
814
814
*/
815
- unscheduleAllSelectorsWithMinPriority :function ( minPriority ) {
815
+ unscheduleAllCallbacksWithMinPriority :function ( minPriority ) {
816
816
// Custom Selectors
817
817
var i ;
818
818
for ( i = 0 ; i < this . _hashForSelectors . length ; i ++ ) {
819
- // element may be removed in unscheduleAllSelectorsForTarget
820
- this . unscheduleAllSelectorsForTarget ( this . _hashForSelectors [ i ] . target ) ;
819
+ // element may be removed in unscheduleAllCallbacksForTarget
820
+ this . unscheduleAllCallbacksForTarget ( this . _hashForSelectors [ i ] . target ) ;
821
821
}
822
822
823
823
//updates selectors
@@ -902,7 +902,7 @@ cc.Scheduler = cc.Class.extend(/** @lends cc.Scheduler# */{
902
902
903
903
/**
904
904
* Resume selectors on a set of targets.<br/>
905
- * This can be useful for undoing a call to pauseAllSelectors .
905
+ * This can be useful for undoing a call to pauseAllCallbacks .
906
906
* @param targetsToResume
907
907
*/
908
908
resumeTargets :function ( targetsToResume ) {
0 commit comments