void CircleBullet::draw(Camera *camera) const { Surface *dst = camera->get_surface(); Circle *circle = (Circle *)m_shape; int x = (int)(circle->get_x() - camera->get_x()); int y = (int)(circle->get_y() - camera->get_y()); int r = (int)(circle->get_r()); dst->draw_circle(mapRGB(255, 255, 255), x, y, r, 1); }
void CircleBullet::move(double dt) { Circle *circle = (Circle *)m_shape; circle->set_x(circle->get_x() + dt * m_v[0]); circle->set_y(circle->get_y() + dt * m_v[1]); }