<?xml version="1.0" encoding="UTF-8"?>
<class name="WorldSwitcherItem" extends="Thing" extends-java="Thing" enable="true" strideversion="1">
    <javadoc xml:space="preserve"/>
    <imports>
        <import target="java.util.*" enable="true"/>
        <import target="greenfoot.*" enable="true"/>
    </imports>
    <implements/>
    <fields/>
    <constructors>
        <constructor access="public" enable="true">
            <javadoc xml:space="preserve"/>
            <params/>
            <throws/>
            <body>
                <call expression="super(3)" expression-java="super(3)" enable="true"/>
            </body>
        </constructor>
    </constructors>
    <methods>
        <method access="public" type="void" type-java="void" name="act" enable="true">
            <javadoc xml:space="preserve">Act - do whatever the SwitcherSchlossgarten wants to do. This method is called whenever the 'Act' or 'Run' button gets pressed in the environment.</javadoc>
            <params/>
            <throws/>
            <body>
                <if condition="this.isTouching(Prinzessin.class)" condition-java="this.isTouching(Prinzessin.class)" enable="true">
                    <ifStatements>
                        <call expression="this.switchToWorld((Prinzessin)this.getOneIntersectingObject(Prinzessin.class))" expression-java="this.switchToWorld((Prinzessin)this.getOneIntersectingObject(Prinzessin.class))" enable="true"/>
                    </ifStatements>
                </if>
            </body>
        </method>
        <method access="public" type="void" type-java="void" name="switchToWorld" enable="true">
            <javadoc xml:space="preserve"/>
            <params>
                <param type="Prinzessin" type-java="Prinzessin" name="prinzessin"/>
            </params>
            <throws/>
            <body>
                <comment xml:space="preserve">will be overwritten in subclasses</comment>
            </body>
        </method>
    </methods>
</class>
