player.hpp 652 B

12345678910111213141516171819202122232425262728293031
  1. //
  2. // player.hpp
  3. // danmaku
  4. //
  5. // Created by Sam Jaffe on 5/26/19.
  6. // Copyright © 2019 Sam Jaffe. All rights reserved.
  7. //
  8. #pragma once
  9. #include "actor.hpp"
  10. namespace danmaku {
  11. class bullet;
  12. class player : public actor {
  13. public:
  14. player(Json::Value const & json, graphics::object const & obj,
  15. attack_factory get_attack);
  16. void hit(bullet const & b);
  17. void update(float delta) override {}
  18. void level(class level * l) override { level_ = l; }
  19. class level * level() const override {
  20. return level_;
  21. }
  22. private:
  23. class level * level_;
  24. std::vector<std::shared_ptr<bullet_pattern>> attack_;
  25. };
  26. }