bullet.hpp 540 B

1234567891011121314151617181920212223242526
  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 : public engine::collidable {
  12. public:
  13. bullet(int damage, math::vec2 const & vel, graphics::object const & obj);
  14. void update(float delta);
  15. void set_position(math::vec2 const & ll, math::radian facing);
  16. void set_velocity(math::vec2 const & v) { velocity_ = v; }
  17. private:
  18. int damage_;
  19. math::vec2 velocity_;
  20. };
  21. }