Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class CEntity : public sf::RectangleShape
- {
- public:
- // If the user does not want to create it directly but needs a reference, for example
- CEntity() {}
- // Overloaded constructor for ease of use
- CEntity(sf::Texture* texturename)
- {
- create(texturename); // Not included in the constructor because create will be needed for empty constructor users
- }
- create(sf::Texture* texturename)
- {
- setSize(sf::Vector2f(textureName->getSize().x, textureName->getSize().y));
- setTexture(texturename);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement