-
Notifications
You must be signed in to change notification settings - Fork 0
/
AbstractEntity.h
118 lines (85 loc) · 2.54 KB
/
AbstractEntity.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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
//
// AbstractEntity.h
// TEORCutSceneTest
//
// Created by Zach Babb on 5/24/11.
// Copyright 2011 InstantLazer. All rights reserved.
//
#import <Foundation/Foundation.h>
#import "Global.h"
@class Animation;
@class GameController;
@class TouchManager;
@class SoundManager;
@class InputManager;
@interface AbstractEntity : NSObject {
GameController *sharedGameController;
TouchManager *sharedTouchManager;
InputManager *sharedInputManager;
SoundManager *sharedSoundManager;
Animation *leftAnimation;
Animation *rightAnimation;
Animation *upAnimation;
Animation *downAnimation;
BOOL wander;
CGRect wanderRect;
CGPoint currentLocation;
CGPoint currentTile;
CGPoint destination;
CGRect rect;
Animation *currentAnimation;
float movementSpeed;
Vector2f velocity;
int moving;
BOOL active;
BOOL wait;
float waitTimer;
BOOL isFadingOut;
float fadeOutAlpha;
BOOL isFadingIn;
float fadeInAlpha;
int stage;
NSString *message;
BOOL triggerNextStage;
//Added for testing
Image *tileOverlay;
}
@property (nonatomic, retain) Animation *leftAnimation;
@property (nonatomic, retain) Animation *rightAnimation;
@property (nonatomic, retain) Animation *upAnimation;
@property (nonatomic, retain) Animation *downAnimation;
@property (nonatomic, retain) Animation *currentAnimation;
@property (nonatomic, assign) CGPoint currentLocation;
@property (nonatomic, assign) CGPoint currentTile;
@property (nonatomic, assign) CGPoint destination;
@property (nonatomic, assign) CGRect rect;
@property (nonatomic, assign) int moving;
@property (nonatomic, assign) BOOL active;
@property (nonatomic, retain) NSString *message;
@property (nonatomic, assign) BOOL triggerNextStage;
- (id)initAtLocation:(CGPoint)aLocation;
- (id)initAtTile:(CGPoint)aTile;
- (void)updateWithDelta:(float)aDelta;
- (void)render;
- (void)moveToPoint:(CGPoint)aPoint duration:(float)aDuration;
- (void)moveToTile:(CGPoint)aTile duration:(float)aDuration;
- (void)teleportToTile:(CGPoint)aTile;
- (void)moveWithMapToPoint:(CGPoint)aPoint duration:(float)aDuration;
- (void)stopAnimation;
- (void)startAnimation;
- (void)faceLeft;
- (void)faceRight;
- (void)faceUp;
- (void)faceDown;
- (void)startMoving:(int)aDirection;
- (void)stopMoving;
- (CGRect)getRect;
- (void)youWereTapped;
- (void)facePlayerAndStop;
- (void)faceEntity:(AbstractEntity *)aEntity;
- (void)fadeOut;
- (void)fadeIn;
- (CGRect)getMovementBounds;
- (void)setWanderInRect:(CGRect)aRect;
BoundingBoxTileQuad getTileCoordsForBoundingRect(CGRect aRect, CGSize aTileSize);
@end