Thanks for the code, that's going to go into my code and if all is well, which I assume it will be, it will be in the code in the book as well
Mike
- (void)updateScene:(GLfloat)aDelta {
gameTicks += aDelta;
if (gameTicks >= 1)
{
// One second has passed
NSLog(@"One second");
gameTicks = 0;
}
// Update the games logic based for the current scene
[[_director currentScene] updateWithDelta:aDelta];
}
[Session started at 2009-09-02 22:35:51 +1000.]
2009-09-02 22:35:56.326 OGLGame[6401:20b] One second
2009-09-02 22:35:57.339 OGLGame[6401:20b] One second
2009-09-02 22:35:58.353 OGLGame[6401:20b] One second
2009-09-02 22:35:59.364 OGLGame[6401:20b] One second
2009-09-02 22:36:00.378 OGLGame[6401:20b] One second
2009-09-02 22:36:01.391 OGLGame[6401:20b] One second
2009-09-02 22:36:02.405 OGLGame[6401:20b] One second
if (TRUE)
something;
return TRUE;
else
return FALSE;if (FALSE)
return FALSE;
something;
return TRUE;if(_cachedTexture = [_cachedTextures objectForKey:aTextureName]) {
return _cachedTexture;
}
if(_cachedTexture = [_cachedTextures objectForKey:aTextureName])
_cachedTexture = [_cachedTextures objectForKey:aTextureName];
if(_cachedTexture) {
Return to iPhone Game Tutorials
Users browsing this forum: No registered users and 0 guests