What could the code for: if the Actor go into a key then there is a gate which get unlocked
boolean unlocked = false;
if(this is collected)
{
((myWorld) getWorld()).unlocked = true;
}if(((myWorld getWorld()).unlocked)
{
open();
}