bzr branch
http://9ix.org/bzr/minild29
1
by Josh C
initial commit |
1 |
#include "Monocle.h" |
2 |
#include "Graphics/SpriteAnimation.h" |
|
3 |
#include "LevelEditor/LevelEditor.h" |
|
4 |
||
5 |
using namespace Monocle; |
|
6 |
||
7 |
namespace Dark |
|
8 |
{ |
|
9 |
class Player : public Entity |
|
10 |
{ |
|
11 |
public: |
|
12 |
Player(); |
|
13 |
void Update(); |
|
14 |
||
15 |
Vector2 velocity; |
|
16 |
||
17 |
SpriteAnimation *sprite; |
|
10
by Josh C
"light" in the dark |
18 |
Entity *dark; |
7
by Josh C
footsteps |
19 |
AudioDeck *footsteps; |
1
by Josh C
initial commit |
20 |
|
3
by Josh C
square moving around the screen |
21 |
int const FRICTION; |
22 |
float const MAXSPEED; |
|
23 |
int const ACCELERATION; |
|
1
by Josh C
initial commit |
24 |
}; |
25 |
||
5
by Josh C
added a "creature" moving around w/ the same dynamics as you do |
26 |
class Creature : public Entity |
27 |
{ |
|
28 |
public: |
|
29 |
Creature(); |
|
30 |
void Update(); |
|
31 |
||
32 |
Vector2 velocity; |
|
33 |
Vector2 direction; |
|
34 |
float aiTime; |
|
35 |
std::string state; |
|
36 |
||
37 |
SpriteAnimation *sprite; |
|
6
by Josh C
skittering blue square |
38 |
AudioDeck *skitter1; |
5
by Josh C
added a "creature" moving around w/ the same dynamics as you do |
39 |
|
40 |
int const FRICTION; |
|
41 |
float const MAXSPEED; |
|
42 |
int const ACCELERATION; |
|
43 |
}; |
|
44 |
||
1
by Josh C
initial commit |
45 |
class DarkScene : public Scene |
46 |
{ |
|
47 |
public: |
|
48 |
DarkScene(); |
|
49 |
void Begin(); |
|
50 |
void Update(); |
|
51 |
||
52 |
LevelEditor *levelEditor; |
|
53 |
}; |
|
54 |
||
55 |
class Text: public Entity |
|
56 |
{ |
|
57 |
public: |
|
58 |
Text(const std::string& text, FontAsset* font=NULL); |
|
59 |
||
60 |
void Render(); |
|
61 |
||
62 |
void SetFont(FontAsset* font) { this->font = font; } |
|
63 |
void SetText(const std::string& text) { this->text = text; } |
|
64 |
||
65 |
protected: |
|
66 |
FontAsset* font; |
|
67 |
std::string text; |
|
68 |
}; |
|
69 |
} |
|
70 |