PowerUp Items bewegen sich jetzt nach unten und lösen auch nur noch das richtige PowerUp aus
This commit is contained in:
@@ -118,7 +118,7 @@ public class Player extends Actor
|
||||
health--;
|
||||
getWorld().removeObjects(getIntersectingObjects(Projectile.class));
|
||||
getWorld().removeObjects(getIntersectingObjects(Enemy.class));
|
||||
getWorld().removeObjects(getIntersectingObjects(Spike.class));
|
||||
getWorld().removeObjects(getWorld().getObjects(Spike.class));
|
||||
|
||||
}
|
||||
}
|
||||
@@ -137,7 +137,7 @@ public class Player extends Actor
|
||||
}
|
||||
}
|
||||
|
||||
public void reveivePowerUp(int duration, String type){
|
||||
public void receivePowerUp(int duration, String type){
|
||||
switch(type){
|
||||
case "dummy":
|
||||
break;
|
||||
@@ -145,10 +145,12 @@ public class Player extends Actor
|
||||
currentJumpStrength = defaultJumpStrength;
|
||||
currentJumpStrength += jumpBoostStrength;
|
||||
jumpBoostDuration = duration;
|
||||
break;
|
||||
case "Heal":
|
||||
if (health < MAX_HEALTH){
|
||||
health++;
|
||||
}
|
||||
break;
|
||||
case "GroundPower":
|
||||
World theWorld= this.getWorld();
|
||||
if(!theWorld.getObjects(TemporaryGround.class).isEmpty())
|
||||
@@ -159,6 +161,7 @@ public class Player extends Actor
|
||||
{
|
||||
theWorld.addObject((new TemporaryGround(duration)), 200, 550);
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user