After lots of failing, finally got it uploaded to git.
Question, I'm going to change all constructors in the project to use initialization lists but I have an issue.
If the super classes constructor is as follows;
Entity::Entity(GameState *state)
:_isLoaded(false), _state(state), alive(true)
{
}
What do I do a child classes constructor? I've attempted lots of different variations but none seem to be working, this was the closest I got to expecting it too work.
Player::Player(GameState *state)
: score(0), health(100), xp(0), rank(0), bulletSpeed(600),triShot(false),rapidFire(false)
: Entity(state) : name(entityPlayer), collidable(true)
I originally had name and collidable as part of the player constructor and it errored but then was curious at, because they're part of the entity class if they should go with that? Either way nothing worked and it left me back at the beginning of the error.
SLIGHT FIX:
Player::Player(GameState *state)
: Entity(state), score(0), health(100), xp(0), rank(0), bulletSpeed(600),triShot(false),rapidFire(false),_colour(sf::Color(128,255,86,255))
{
Complies without error but I'm unable to include the boolean "collidable" or the enum "name" as they appear to error no matter where I put them, So how does one include variables that are in the superclass using initialization lists?