/minild29

To get this branch, use:
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 by Josh C
track palyer noisiness, beginnings of "alert" state for creatures
16
    float noisiness;
1 by Josh C
initial commit
17
18
    SpriteAnimation *sprite;
10 by Josh C
"light" in the dark
19
    Entity *dark;
7 by Josh C
footsteps
20
    AudioDeck *footsteps;
1 by Josh C
initial commit
21
3 by Josh C
square moving around the screen
22
    int const FRICTION;
23
    float const MAXSPEED;
24
    int const ACCELERATION;    
1 by Josh C
initial commit
25
  };
26
5 by Josh C
added a "creature" moving around w/ the same dynamics as you do
27
  class Creature : public Entity
28
  {
29
  public:
30
    Creature();
31
    void Update();
32
33
    Vector2 velocity;
34
    Vector2 direction;
35
    float aiTime;
19 by Josh C
beginnings of "stalk" state
36
    float noiseTime;
5 by Josh C
added a "creature" moving around w/ the same dynamics as you do
37
    std::string state;
38
39
    SpriteAnimation *sprite;
6 by Josh C
skittering blue square
40
    AudioDeck *skitter1;
17 by Josh C
alert noise
41
    AudioAsset *alert;
19 by Josh C
beginnings of "stalk" state
42
    AudioAsset *stalk;
5 by Josh C
added a "creature" moving around w/ the same dynamics as you do
43
44
    int const FRICTION;
45
    float const MAXSPEED;
19 by Josh C
beginnings of "stalk" state
46
    int const ACCELERATION;
47
    float const STALKSPEED;
20 by Josh C
some more stalk logic
48
    float const HUNTSPEED;
5 by Josh C
added a "creature" moving around w/ the same dynamics as you do
49
  };
50
18 by Josh C
ping!
51
  class Ping : public Entity
52
  {
53
  public:
54
    Ping();
55
    void Update();
56
    static Ping *NewPing(Vector2 pos, float d1, float d2, float t2);
57
58
    float d1, d2, t, t2;
59
60
    Sprite *sprite;
61
  };
62
1 by Josh C
initial commit
63
  class DarkScene : public Scene
64
  {
65
  public:
66
    DarkScene();
67
    void Begin();
68
    void Update();
69
70
    LevelEditor *levelEditor;
11 by Josh C
disappear darkness mask in editor mode
71
    
72
    Player *player;
1 by Josh C
initial commit
73
  };
74
75
  class Text: public Entity
76
  {
77
  public:
78
    Text(const std::string& text, FontAsset* font=NULL);
79
    
80
    void Render();
81
    
82
    void SetFont(FontAsset* font) { this->font = font; }
83
    void SetText(const std::string& text) { this->text = text; }
84
    
85
  protected:
86
    FontAsset* font;
87
    std::string text;
88
  };
89
}
90