mirror of
https://forge.univ-lyon1.fr/tplifap4/dungeonanddeamon.git
synced 2024-02-27 13:31:50 +01:00
Changement gestion colliosn sol dans player
This commit is contained in:
@ -70,12 +70,10 @@ void GestionPlayer::traitementInput()
|
|||||||
if (i->is_action_pressed("ui_select"))
|
if (i->is_action_pressed("ui_select"))
|
||||||
saut();
|
saut();
|
||||||
|
|
||||||
if (is_on_floor()) {
|
if (on_ground) {
|
||||||
on_ground = true;
|
|
||||||
p.velocity.y += 0;
|
p.velocity.y += 0;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
on_ground = false;
|
|
||||||
p.velocity.y += gravity;
|
p.velocity.y += gravity;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user