CrystalPoint.h 776 B

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. #pragma once
  2. class WorldHandler;
  3. class SoundSystem;
  4. class Player;
  5. class Cursor;
  6. class Menu;
  7. #include "Vector.h"
  8. #include "SoundSystem.h"
  9. #include "ControllerHandler.h"
  10. class KeyboardState
  11. {
  12. public:
  13. bool keys[256];
  14. bool special[256];
  15. bool control, shift, alt;
  16. KeyboardState();
  17. };
  18. class CrystalPoint
  19. {
  20. public:
  21. void init();
  22. void draw();
  23. void update();
  24. WorldHandler* worldhandler;
  25. Player* player;
  26. ControllerHandler controller;
  27. Cursor* cursor;
  28. Menu* menu;
  29. static int width, height;
  30. KeyboardState keyboardState;
  31. KeyboardState prevKeyboardState;
  32. Vec2f mouseOffset;
  33. Vec2f mousePosition;
  34. float lastFrameTime;
  35. static SoundSystem& GetSoundSystem() { return sound_system; }
  36. bool menuIsBuild;
  37. private:
  38. static SoundSystem sound_system;
  39. void buildMenu();
  40. };