![]() |
cocos2d-iphone
2.1
Improved Cocos2D API Reference (iOS version) for www.kobold2d.com developers
|
Public Member Functions | |
(void) | - update: |
(void) | - scheduleSelector:forTarget:interval:repeat:delay:paused: |
(void) | - scheduleSelector:forTarget:interval:paused: |
(void) | - scheduleUpdateForTarget:priority:paused: |
(void) | - scheduleBlockForKey:target:interval:repeat:delay:paused:block: |
(void) | - unscheduleSelector:forTarget: |
(void) | - unscheduleBlockForKey:target: |
(void) | - unscheduleUpdateForTarget: |
(void) | - unscheduleAllForTarget: |
(void) | - unscheduleAll |
(void) | - unscheduleAllWithMinPriority: |
(void) | - pauseTarget: |
(void) | - resumeTarget: |
(BOOL) | - isTargetPaused: |
(NSSet *) | - pauseAllTargets |
(NSSet *) | - pauseAllTargetsWithMinPriority: |
(void) | - resumeTargets: |
(void) | - DEPRECATED_ATTRIBUTE |
(void) | - scheduleSelector:forTarget:interval:paused:repeat:delay: |
(void) | - unscheduleAllSelectorsForTarget: |
(void) | - unscheduleAllSelectorsWithMinPriority: |
Static Public Member Functions | |
(CCScheduler *) | + DEPRECATED_ATTRIBUTE |
Protected Attributes | |
ccTime | _timeScale |
struct _listEntry * | updatesNeg |
struct _listEntry * | updates0 |
struct _listEntry * | updatesPos |
struct _hashUpdateEntry * | hashForUpdates |
struct _hashSelectorEntry * | hashForTimers |
struct _hashSelectorEntry * | currentTarget |
BOOL | currentTargetSalvaged |
TICK_IMP | impMethod |
SEL | updateSelector |
BOOL | updateHashLocked |
Properties | |
ccTime | timeScale |
- (BOOL) isTargetPaused: | (id) | target |
Returns whether or not the target is paused
- (NSSet*) pauseAllTargets |
Pause all selectors and blocks from all targets. You should NEVER call this method, unless you know what you are doing.
- (NSSet*) pauseAllTargetsWithMinPriority: | (NSInteger) | minPriority |
Pause all selectors and blocks from all targets with a minimum priority. You should only call this with kCCPriorityNonSystemMin or higher.
- (void) pauseTarget: | (id) | target |
Pauses the target. All scheduled selectors/update for a given target won't be 'ticked' until the target is resumed. If the target is not present, nothing happens.
- (void) resumeTarget: | (id) | target |
Resumes the target. The 'target' will be unpaused, so all schedule selectors/update will be 'ticked' again. If the target is not present, nothing happens.
- (void) resumeTargets: | (NSSet *) | targetsToResume |
Resume selectors on a set of targets. This can be useful for undoing a call to pauseAllSelectors.
- (void) scheduleBlockForKey: | (NSString *) | key | |
target: | (id) | target | |
interval: | (ccTime) | interval | |
repeat: | (uint) | repeat | |
delay: | (ccTime) | delay | |
paused: | (BOOL) | paused | |
block: | (ccTime dt) | block | |
The scheduled block will be called every 'interval' seconds. 'key' is a unique identifier of the block. Needed to unschedule the block or update its interval. 'target' is needed for all the method related to "target" like "pause" and "unschedule" If 'interval' is 0, it will be called every frame, but if so, it recommended to use 'scheduleUpdateForTarget:' instead. 'repeat' lets the action be repeated repeat + 1 times, use kCCRepeatForever to let the action run continuously. 'delay' is the amount of time the action will wait before it'll start. If paused is YES, then it won't be called until it is resumed. If the block is already scheduled, then only the interval parameter will be updated without re-scheduling it again.
- (void) scheduleSelector: | (SEL) | selector | |
forTarget: | (id) | target | |
interval: | (ccTime) | interval | |
paused: | (BOOL) | paused | |
calls scheduleSelector with kCCRepeatForever and a 0 delay
- (void) scheduleSelector: | (SEL) | selector | |
forTarget: | (id) | target | |
interval: | (ccTime) | interval | |
repeat: | (uint) | repeat | |
delay: | (ccTime) | delay | |
paused: | (BOOL) | paused | |
The scheduled method will be called every 'interval' seconds. If paused is YES, then it won't be called until it is resumed. If 'interval' is 0, it will be called every frame, but if so, it recommended to use 'scheduleUpdateForTarget:' instead. If the selector is already scheduled, then only the interval parameter will be updated without re-scheduling it again. repeat lets the action be repeated repeat + 1 times, use kCCRepeatForever to let the action run continuously delay is the amount of time the action will wait before it'll start
- (void) scheduleUpdateForTarget: | (id) | target | |
priority: | (NSInteger) | priority | |
paused: | (BOOL) | paused | |
Schedules the 'update' selector for a given target with a given priority. The 'update' selector will be called every frame. The lower the priority, the earlier it is called.
- (void) unscheduleAll |
Unschedules all selectors and blocks from all targets. You should NEVER call this method, unless you know what you are doing.
- (void) unscheduleAllForTarget: | (id) | target |
Unschedules all selectors and blocks for a given target. This also includes the "update" selector.
- (void) unscheduleAllWithMinPriority: | (NSInteger) | minPriority |
Unschedules all selectors and blocks from all targets with a minimum priority. You should only call this with kCCPriorityNonSystemMin or higher.
- (void) unscheduleBlockForKey: | (NSString *) | key | |
target: | (id) | target | |
Unshedules a block for a given key / target pair. If you want to unschedule the "update", use unscheudleUpdateForTarget.
- (void) unscheduleSelector: | (SEL) | selector | |
forTarget: | (id) | target | |
Unshedules a selector for a given target. If you want to unschedule the "update", use unscheudleUpdateForTarget.
- (void) unscheduleUpdateForTarget: | (id) | target |
Unschedules the update selector for a given target
'update' the scheduler. You should NEVER call this method, unless you know what you are doing.
Modifies the time of all scheduled callbacks. You can use this property to create a 'slow motion' or 'fast forward' effect. Default is 1.0. To create a 'slow motion' effect, use values below 1.0. To create a 'fast forward' effect, use values higher than 1.0.