From: dsc Date: Tue, 17 May 2011 05:39:07 +0000 (-0700) Subject: dupe X-Git-Url: http://git.less.ly:3516/?a=commitdiff_plain;h=75aeaf945d68d21c009558f1065e778ee924a98f;p=tanks-ios.git dupe --- diff --git a/Icon-iPhone@2x.png b/Icon-iPhone@2x.png deleted file mode 100644 index 1a3bbd4..0000000 Binary files a/Icon-iPhone@2x.png and /dev/null differ diff --git a/src/game/QQGame.mm b/src/game/QQGame.mm index a43d26a..bb9cd08 100644 --- a/src/game/QQGame.mm +++ b/src/game/QQGame.mm @@ -28,18 +28,14 @@ static QQGame* _currentGame = NULL; ticks = 0l; _world = [[QQWorld alloc] init]; - [self addEventListener:@selector(onEnterFrame:) atObject:self forType:SP_EVENT_TYPE_ENTER_FRAME]; - _unit = [[QQUnit alloc] init]; - // [self addEventListener:@selector(onTouch:) atObject:_unit forType:SP_EVENT_TYPE_TOUCH]; - // if (_unit.shape) [self addChild:_unit.shape]; + + [self addEventListener:@selector(onEnterFrame:) atObject:self forType:SP_EVENT_TYPE_ENTER_FRAME]; } return self; } - (void) dealloc { - // [self setUnit:nil]; - // [self setWorld:nil]; [_unit release]; [_world release]; _currentGame = NULL; @@ -53,6 +49,8 @@ static QQGame* _currentGame = NULL; [self.world step]; } + + + (QQGame*) current { if (!_currentGame) [[[QQGame alloc] init] // init assigns to singleton, but singleton is a weakref,