-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathAbstractBattleAnimalEntity.m
More file actions
62 lines (46 loc) · 1.01 KB
/
AbstractBattleAnimalEntity.m
File metadata and controls
62 lines (46 loc) · 1.01 KB
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
58
59
60
61
62
//
// AbstractBattleAnimalEntity.m
// TEORBattleTest
//
// Created by Zach Babb on 5/29/11.
// Copyright 2011 InstantLazer. All rights reserved.
//
#import "AbstractBattleAnimalEntity.h"
#import "AbstractBattleEntity.h"
@implementation AbstractBattleAnimalEntity
@synthesize target;
@synthesize allEnemies;
@synthesize allCharacters;
- (id)init {
self = [super init];
if (self) {
allEnemies = NO;
allCharacters = NO;
battleTimer = 0;
attackPower = 1;
helpPower = 1;
}
return self;
}
- (void)updateWithDelta:(float)aDelta {
[super updateWithDelta:aDelta];
battleTimer += aDelta;
if (battleTimer > 8.0) {
[self timerFired];
battleTimer = 0 + (RANDOM_0_TO_1() * 2);
}
}
- (void)setTarget:(AbstractBattleEntity *)aEntity {
target = aEntity;
allEnemies = NO;
allCharacters = NO;
}
- (void)timerFired {}
- (void)beSummoned {}
- (void)depart {}
- (void)joinBattle {
target = nil;
allEnemies = NO;
allCharacters = NO;
}
@end