/minild29

To get this branch, use:
bzr branch http://9ix.org/bzr/minild29
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
#include "Monocle.h"
#include "Graphics/SpriteAnimation.h"
#include "LevelEditor/LevelEditor.h"

using namespace Monocle;

namespace Dark
{
  class Player : public Entity
  {
  public:
    Player();
    void Update();

    Vector2 velocity;
    float noisiness;

    SpriteAnimation *sprite;
    Entity *dark;
    AudioDeck *footsteps;

    int const FRICTION;
    float const MAXSPEED;
    int const ACCELERATION;    
  };

  class Creature : public Entity
  {
  public:
    Creature();
    void Update();

    Vector2 velocity;
    Vector2 direction;
    float aiTime;
    std::string state;

    SpriteAnimation *sprite;
    AudioDeck *skitter1;

    int const FRICTION;
    float const MAXSPEED;
    int const ACCELERATION;     
  };

  class DarkScene : public Scene
  {
  public:
    DarkScene();
    void Begin();
    void Update();

    LevelEditor *levelEditor;
    
    Player *player;
  };

  class Text: public Entity
  {
  public:
    Text(const std::string& text, FontAsset* font=NULL);
    
    void Render();
    
    void SetFont(FontAsset* font) { this->font = font; }
    void SetText(const std::string& text) { this->text = text; }
    
  protected:
    FontAsset* font;
    std::string text;
  };
}