/** * Act - do whatever the Capitan wants to do. This method is called whenever the 'Act' or 'Run' * button gets pressed in the environment. */ public void act() { if (!pasoAlJugador()) { super.act(); rebota(); } else { Escenario e = (Escenario) getWorld(); Batman i = e.getBatman(); // i.restaSalud(i.getSalud()/2); e.restaNumEnemigos(); getWorld().removeObject(this); } }