Skip to content

Commit

Permalink
Merge branch 'CleanUp' of https://github.com/DecaIi/Jeu_jin into CleanUp
Browse files Browse the repository at this point in the history
  • Loading branch information
alexis51151 committed Jun 9, 2020
2 parents a33943b + 5e73de3 commit febac87
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/Monster.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,10 @@ void Monster::updateSpeed()
if(timedetection > 0)
timedetection--;
}

if (timedetection > 30) {
Monster::my_playerdetected = true;
}

if (rfootcontact >= 1 && lfootcontact >= 1) { //deux pieds aux sol
body->SetLinearVelocity(b2Vec2(this->directionxsigne()*5, 0));
return;
Expand All @@ -178,9 +181,6 @@ void Monster::updateSpeed()
else {
body->SetLinearVelocity(b2Vec2(-directionxsigne() * 5, body->GetLinearVelocity().y));
}
if (timedetection > 30) {
my_playerdetected = true;
}
reverspeed_timout = 15;
}

Expand Down

0 comments on commit febac87

Please sign in to comment.