This site requires JavaScript, please enable it in your browser!
Greenfoot back
Dalle4
Dalle4 wrote ...

2012/1/4

Change Actor

Dalle4 Dalle4

2012/1/4

#
What could the code for: if the Actor go into a key then there is a gate which get unlocked
DonaldDuck DonaldDuck

2012/1/4

#
boolean unlocked = false;
In the world
if(this is collected)
{
    ((myWorld) getWorld()).unlocked = true;
}
In the key
if(((myWorld getWorld()).unlocked)
{
    open();
}
In the gate
You need to login to post a reply.