PowerUp Items bewegen sich jetzt nach unten und lösen auch nur noch das richtige PowerUp aus
This commit is contained in:
@@ -11,11 +11,15 @@ public class HealthItem extends PowerUps
|
||||
int duration = 60*60;
|
||||
public void act()
|
||||
{
|
||||
moveDown();
|
||||
touchedByPlayer();
|
||||
if (deleteAfterActCycle){
|
||||
getWorld().removeObject(this);
|
||||
}
|
||||
}
|
||||
|
||||
@Override void collect(){
|
||||
Player player = getIntersectingObjects(Player.class).get(0);
|
||||
player.reveivePowerUp(duration, "Heal");
|
||||
player.receivePowerUp(duration, "Heal");
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user