-
Notifications
You must be signed in to change notification settings - Fork 6
/
Startscreen.m
37 lines (31 loc) · 875 Bytes
/
Startscreen.m
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
//
// Startscreen.m
// PivotVividGGJ14
//
// Created by Benjamin Encz on 26/01/14.
// Copyright (c) 2014 Apportable. All rights reserved.
//
#import "Startscreen.h"
#import "UIUtils.h"
@implementation Startscreen {
CCLabelTTF *_label;
CCNode *_backgroundImage;
BOOL _loading;
}
- (void)startNow {
if (!_loading) {
_loading = YES;
CCNode *loadingScreen = [CCBReader load:@"UI/LoadingScreen"];
[self addChild:loadingScreen];
[self performSelector:@selector(start) withObject:nil afterDelay:0.1f];
}
}
- (void)start {
presentGameplaySceneWithCurrentLevel();
}
- (void)levelSelect {
CCScene *scene = [CCBReader loadAsScene:@"MainScene"];
CCTransition *transition = [CCTransition transitionCrossFadeWithDuration:0.3f];
[[CCDirector sharedDirector] replaceScene:scene withTransition:transition];
}
@end