File tree Expand file tree Collapse file tree 1 file changed +8
-7
lines changed Expand file tree Collapse file tree 1 file changed +8
-7
lines changed Original file line number Diff line number Diff line change @@ -768,26 +768,27 @@ cc.Scheduler = cc.Class.extend(/** @lends cc.Scheduler# */{
768
768
}
769
769
} ,
770
770
771
- isScheduled : function ( key , target ) {
771
+ isScheduled : function ( callback , target ) {
772
772
//key, target
773
773
//selector, target
774
- cc . assert ( key , "Argument key must not be empty" ) ;
774
+ cc . assert ( callback , "Argument callback must not be empty" ) ;
775
775
cc . assert ( target , "Argument target must be non-nullptr" ) ;
776
776
777
- var element = this . _hashForUpdates [ target . __instanceId ] ;
777
+ var element = this . _hashForTimers [ target . __instanceId ] ;
778
778
779
- if ( ! element ) {
779
+ if ( ! element ) {
780
780
return false ;
781
781
}
782
782
783
783
if ( element . timers == null ) {
784
784
return false ;
785
- } else {
785
+ }
786
+ else {
786
787
var timers = element . timers ;
787
- for ( var i = 0 ; i < timers . length ; ++ i ) {
788
+ for ( var i = 0 ; i < timers . length ; ++ i ) {
788
789
var timer = timers [ i ] ;
789
790
790
- if ( key === timer . getKey ( ) ) {
791
+ if ( callback === timer . _selector ) {
791
792
return true ;
792
793
}
793
794
}
You can’t perform that action at this time.
0 commit comments