Castlekeep
A isometric castle build simulator
 All Classes Namespaces
castlekeep.h
1 
23 #ifndef CASTLE_KEEP_H
24 #define CASTLE_KEEP_H
25 
26 #include <stdio.h>
27 
28 #include "game.h"
29 #include "input_manager.h"
30 
31 namespace CastleKeep
32 {
34  {
35  public:
36  void onKeyPress(const KeyEvent &event)
37  {
38  switch(event.key) {
39  case KeyCode::ARROW_UP:
40  printf("Up\n");
41  break;
42  case KeyCode::ARROW_DOWN:
43  printf("Down\n");
44  break;
45  case KeyCode::ARROW_LEFT:
46  printf("Left\n");
47  break;
48  case KeyCode::ARROW_RIGHT:
49  printf("Right\n");
50  break;
51  default:
52  break;
53  }
54  }
55  void onKeyRelease(const KeyEvent &event)
56  {
57  }
58  };
59 
60  class CastleKeep : public Game
61  {
62  public:
63 
64  CastleKeep();
65 
66  virtual ~CastleKeep();
67 
68  protected:
69  KeyHandler *_key_handler;
70  };
71 
72 }
73 
74 #endif
Definition: input_manager.h:108
Definition: castlekeep.h:60
Definition: input_manager.h:83
Definition: castlekeep.h:33
Definition: game.h:34