Question

Can someone make this into a cpp and h file thanks class Bullet { public: sf::CircleShape...

Can someone make this into a cpp and h file thanks

class Bullet

{

public:

sf::CircleShape shape;

sf::Vector2f currVelocity;

float maxSpeed;

   Bullet(float radius = 5.f) : currVelocity(0.f, 0.f), maxSpeed(15.f)

{

this->shape.setRadius(radius);

this->shape.setFillColor(Color::Blue);

}

  

};

0 0
Add a comment Improve this question Transcribed image text
Answer #1

//Bullet.h

class Bullet

{

public:

sf::CircleShape shape;

sf::Vector2f currVelocity;

float maxSpeed;

Bullet(float );


};

//Bullet.cpp

#include"Bullet.h"

Bullet::Bullet(float radius = 5.f) : currVelocity(0.f, 0.f), maxSpeed(15.f)

{

this->shape.setRadius(radius);

this->shape.setFillColor(Color::Blue);

}

Add a comment
Know the answer?
Add Answer to:
Can someone make this into a cpp and h file thanks class Bullet { public: sf::CircleShape...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT