Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include "Bullet.hpp"
- Bullet::Bullet(float tspeed)
- : speed(tspeed),
- velocity(0.0f, 0.0f)
- {
- bullet.setRadius(5.f);
- bullet.setFillColor(sf::Color::Red);
- }
- void Bullet::update(const float &dt)
- {
- bullet.move(velocity * dt);
- }
- void Bullet::draw(sf::RenderTexture &gameTexture)
- {
- gameTexture.draw(bullet);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement