-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCSGameModel.h
48 lines (33 loc) · 1.22 KB
/
CSGameModel.h
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
//
// CSGameModel.h
// GuardianOfTheTomb
//
// Created by Evan Gould on 4/3/14.
// Copyright (c) 2014 The Evan & The Jason. All rights reserved.
//
#import <Foundation/Foundation.h>
#import "CSWaveTimer.h"
@class CSGameModel;
@protocol CSGameModelDelegate <NSObject>
-(void) waveStarted:(CSGameModel*) gameModel;
-(void) spawnMonsters:(CSGameModel*) gameModel meleeSkeletons:(int) melee andRangedSkeletons:(int) ranged;
-(void) waveEnded:(CSGameModel*) gameModel;
-(void) gameOver:(CSGameModel*) gameModel;
@end
//This class implements the CSWaveTimerDelegate
@interface CSGameModel : NSObject <CSWaveTimerDelegate>
//Delegate for the game model
@property (nonatomic, weak) id<CSGameModelDelegate> delegate;
//Returns the current wave
@property int currentWave;
//Can return or set the state of the game. Used to stop timers and clear enemies from the screen.
@property BOOL gameIsOngoing;
//Returns 0 if the game is in the shooting phase, or 1 if the game is in the protecting phase, or 2 if the game is between waves
@property int gameState;
//Timer for the first part of a wave where a player is shooting outwards
@property CSWaveTimer * timer;
-(void) startGame;
-(void) pauseGame;
-(void) resumeGame;
-(void) saveGame;
@end