소스 검색

Move bullets.

Sam Jaffe 6 년 전
부모
커밋
ccf0a8d2f0
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  1. 1 1
      src/entity/bullet.cxx

+ 1 - 1
src/entity/bullet.cxx

@@ -16,7 +16,7 @@ using namespace danmaku;
 bullet::bullet(int damage, math::vec2 const & vel, graphics::object const & obj)
     : engine::collidable(obj), damage_(damage), velocity_(vel) {}
 
-void bullet::update(float delta) {}
+void bullet::update(float delta) { move(velocity_ * delta); }
 
 void bullet::set_position(math::vec2 const & ll, math::radian facing) {
   auto & size = render_info_.location.size;