mirror of
https://forge.univ-lyon1.fr/tplifap4/gyromite_ya.git
synced 2024-02-27 13:31:49 +01:00
Correction bug de quand il meurt sur les corde
This commit is contained in:
parent
9bde606748
commit
c0c90445ec
@ -23,6 +23,7 @@ public class Controle4Directions extends RealisateurDeDeplacement {
|
||||
directionCourante = _directionCourante;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean realiserDeplacement() {
|
||||
boolean ret = false;
|
||||
for (ElementDynamique e : lstEntitesDynamiques) {
|
||||
@ -36,8 +37,10 @@ public class Controle4Directions extends RealisateurDeDeplacement {
|
||||
case bas:
|
||||
case haut:
|
||||
ElementFond ef = ((Entite) e).regarderDerriereSoit();
|
||||
ElementPhysique eP = ((Entite) e).regarderDansLaDirection(directionCourante);
|
||||
|
||||
if(ef != null && ef.peutPermettreDeMonterDescendre()) {
|
||||
if((ef != null && ef.peutPermettreDeMonterDescendre())
|
||||
&& (eP == null || !eP.peutServirDeSupport())) {
|
||||
ret = e.avancerDirectionChoisie(directionCourante);
|
||||
}
|
||||
break;
|
||||
|
Loading…
Reference in New Issue
Block a user