bullet.hpp 622 B

1234567891011121314151617181920212223242526272829
  1. //
  2. // bullet.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. public:
  13. bullet(int damage, math::vec2 const & vel, graphics::object const & obj);
  14. void update(float delta);
  15. graphics::object const & render_info() const { return render_info_; }
  16. void set_position(math::vec2 const & ll, math::radian facing);
  17. void set_velocity(math::vec2 const & v) { velocity_ = v; }
  18. private:
  19. int damage_;
  20. math::vec2 velocity_;
  21. graphics::object render_info_;
  22. };
  23. }