Você não pode selecionar mais de 25 tópicos Os tópicos devem começar com uma letra ou um número, podem incluir traços ('-') e podem ter até 35 caracteres.
 
 
 

54 linhas
1.2 KiB

  1. //
  2. // Lol Engine
  3. //
  4. // Copyright: (c) 2010-2011 Sam Hocevar <sam@hocevar.net>
  5. // This program is free software; you can redistribute it and/or
  6. // modify it under the terms of the Do What The Fuck You Want To
  7. // Public License, Version 2, as published by Sam Hocevar. See
  8. // http://www.wtfpl.net/ for more details.
  9. //
  10. #pragma once
  11. //
  12. // The Ticker class
  13. // ----------------
  14. // The Ticker is a static class that registers entities and ticks them.
  15. //
  16. #include <stdint.h>
  17. #include "entity.h"
  18. namespace lol
  19. {
  20. class Ticker
  21. {
  22. public:
  23. static void Register(Entity *entity);
  24. static void Ref(Entity *entity);
  25. static int Unref(Entity *entity);
  26. static void Setup(float fps);
  27. static void TickDraw();
  28. static void StartBenchmark();
  29. static void StopBenchmark();
  30. static void StartRecording();
  31. static void StopRecording();
  32. static int GetFrameNum();
  33. static void SetState(Entity *entity, uint32_t state);
  34. static void SetStateWhenMatch(Entity *entity, uint32_t state,
  35. Entity *other_entity, uint32_t other_state);
  36. static void Shutdown();
  37. static int Finished();
  38. private:
  39. Ticker() {}
  40. };
  41. } /* namespace lol */