Permalink
Browse files

Trying to fix that shit but still no idea

  • Loading branch information...
laci200270 committed Jan 13, 2018
1 parent d32c2b8 commit cba33a1bb70800eded8870214d9eb34dd6c03a01
Showing with 3 additions and 5 deletions.
  1. +2 −5 characters/Player.cpp
  2. +1 −0 main.cpp
View
@@ -12,7 +12,7 @@ Player::Player(std::string name,std::string textName) {
cout<<"Hello my name is "<<name<<endl;
this->name=name;
this->textName=textName;
this->setGameRunning(false);
//this->setGameRunning(false);
}
void Player::loadTexture() {
texture.loadFromFile("textures/"+textName+".png");
@@ -26,10 +26,7 @@ void Player::setGameRunning(bool state) {
}
bool Player::getGameRunning() const {
cout << "Game is" ;
if(!this->isGameRunning)
cout << " not";
cout << " running" <<endl;
std::cout << "Game is " << (isGameRunning ? "not" : "" ) << " running" << std::endl;
return isGameRunning;
}
View
@@ -36,6 +36,7 @@ int main() {
window.close();
}
if(!player1.getGameRunning()&&Keyboard::isKeyPressed(Keyboard::Space))
player1.setGameRunning(true);
world.tick();

0 comments on commit cba33a1

Please sign in to comment.