-
Notifications
You must be signed in to change notification settings - Fork 0
/
MedalsScene.m
62 lines (47 loc) · 1.34 KB
/
MedalsScene.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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
//
// MedalsScene.m
//
// Created by : Michael Heirendt
// Project : Crush
// Date : 1/1/16
//
// Copyright (c) 2016 Apportable.
// All rights reserved.
//
// -----------------------------------------------------------------
#import "MedalsScene.h"
#import "TableView.h"
#import "GameData.h"
// -----------------------------------------------------------------
@implementation MedalsScene{
}
@synthesize doubleKills;
@synthesize tripleKills;
@synthesize overKills;
// -----------------------------------------------------------------
+ (instancetype)node
{
return [[self alloc] init];
}
- (instancetype)init
{
self = [super init];
NSAssert(self, @"Unable to create class %@", [self class]);
self.doubleKills = 0;
TableView *table = [TableView node];
table.contentSizeType = CCSizeTypeNormalized;
table.positionType = CCPositionTypeNormalized;
table.position = ccp(.2f,-0.01f);
table.contentSize = CGSizeMake(1, 1);
table.zOrder = 1000;
[self addChild:table];
return self;
}
-(void)backToMenu{
//CCScene *gameplayScene = [CCBReader loadAsScene:@"MainScene"];
//[[CCDirector sharedDirector] replaceScene:gameplayScene];
[GameData sharedGameData].tableID = 0;
[[CCDirector sharedDirector] popScene];
}
// -----------------------------------------------------------------
@end