暂无描述
您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符

awoorwae.h 695B

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. #ifndef AWOORWAE_H
  2. #define AWOORWAE_H
  3. #include "olcPixelGameEngine.h"
  4. #include "olcPGEX_Sound.h"
  5. #include "player.h"
  6. #include "bug.h"
  7. #include <vector>
  8. namespace pabloader {
  9. class Awoorwae : public olc::PixelGameEngine {
  10. private:
  11. Player* player;
  12. std::vector<Bug*> bugs;
  13. public:
  14. Awoorwae()
  15. {
  16. sAppName = "Awoorwa";
  17. }
  18. ~Awoorwae()
  19. {
  20. delete player;
  21. }
  22. public:
  23. bool OnUserCreate() override;
  24. bool OnUserUpdate(float fElapsedTime) override;
  25. bool OnUserDestroy() override;
  26. private:
  27. Bug* SpawnBug();
  28. public:
  29. olc::ResourcePack pack;
  30. olc::Sprite playerSprite;
  31. olc::Sprite enemiesSprite;
  32. int playerFallSample;
  33. };
  34. }
  35. #endif