cocos2d-iphone
2.0
Improved Cocos2D API Reference (iOS version) for www.kobold2d.com developers
|
Public Member Functions | |
(void) | - update: |
(void) | - scheduleSelector:forTarget:interval:paused:repeat:delay: |
(void) | - scheduleSelector:forTarget:interval:paused: |
(void) | - scheduleUpdateForTarget:priority:paused: |
(void) | - unscheduleSelector:forTarget: |
(void) | - unscheduleUpdateForTarget: |
(void) | - unscheduleAllSelectorsForTarget: |
(void) | - unscheduleAllSelectors |
(void) | - unscheduleAllSelectorsWithMinPriority: |
(void) | - pauseTarget: |
(void) | - resumeTarget: |
(BOOL) | - isTargetPaused: |
(NSSet *) | - pauseAllTargets |
(NSSet *) | - pauseAllTargetsWithMinPriority: |
(void) | - resumeTargets: |
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 * | hashForSelectors |
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 from all targets. You should NEVER call this method, unless you know what you are doing.
- (NSSet*) pauseAllTargetsWithMinPriority: | (NSInteger) | minPriority |
Pause all selectors 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) 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 | |
paused: | (BOOL) | paused | |
repeat: | (uint) | repeat | |
delay: | (ccTime) | delay | |
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 recommened to use 'scheduleUpdateForTarget:' instead. If the selector is already scheduled, then only the interval parameter will be updated without re-scheduling it again. repeat let the action be repeated repeat + 1 times, use kCCRepeatForever to let the action run continiously 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) unscheduleAllSelectors |
Unschedules all selectors from all targets. You should NEVER call this method, unless you know what you are doing.
- (void) unscheduleAllSelectorsForTarget: | (id) | target |
Unschedules all selectors for a given target. This also includes the "update" selector.
- (void) unscheduleAllSelectorsWithMinPriority: | (NSInteger) | minPriority |
Unschedules all selectors from all targets with a minimum priority. You should only call this with kCCPriorityNonSystemMin or higher.
- (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 fordward' effect. Default is 1.0. To create a 'slow motion' effect, use values below 1.0. To create a 'fast fordward' effect, use values higher than 1.0.