-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCSWaveTimer.h
43 lines (30 loc) · 1.07 KB
/
CSWaveTimer.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
//
// CSWaveTimer.h
// GuardianOfTheTomb
//
// Created by Evan Gould on 4/6/14.
// Copyright (c) 2014 The Evan & The Jason. All rights reserved.
//
#import <Foundation/Foundation.h>
@class CSWaveTimer;
@protocol CSWaveTimerDelegate <NSObject>
-(void) longTimerExpired:(CSWaveTimer*) gameTimer;
-(void) shortTimerExpired:(CSWaveTimer*) gameTimer time:(float) time longInterval:(float) longInterval;
@end
@interface CSWaveTimer : NSObject
@property (weak, nonatomic) id<CSWaveTimerDelegate> delegate;
//How often the short and periodic timer will fire
@property float shortInterval;
//How long the overarching timer is
@property float longInterval;
//The current amount of elapsed time
@property (nonatomic, readonly) float time;
//The two timer objects
@property (strong, nonatomic) NSTimer * longTimer;
@property (strong, nonatomic) NSTimer * shortTimer;
-(id) initWithLongInterval:(float) longInterval andShortInterval:(float) shortInterval andDelegate:(id<CSWaveTimerDelegate>) delegate;
-(void) stopTimer;
-(void) startTimer;
-(void) pauseTimer;
-(void) unPauseTimer;
@end