// WARNING: This file is auto-generated and any changes to it will be overwritten import lang.stride.*; import java.util.*; import greenfoot.*; /** * */ public class WorldSwitcherItem extends Thing { /** * */ public WorldSwitcherItem() { super(3); } /** * Act - do whatever the SwitcherSchlossgarten wants to do. This method is called whenever the 'Act' or 'Run' button gets pressed in the environment. */ public void act() { if (this.isTouching(Prinzessin.class)) { this.switchToWorld((Prinzessin)this.getOneIntersectingObject(Prinzessin.class)); } } /** * */ public void switchToWorld(Prinzessin prinzessin) { /* will be overwritten in subclasses*/ } }