import greenfoot.*; // (World, Actor, GreenfootImage, Greenfoot and MouseInfo)
import java.util.List;
/**
* Write a description of class Dialog1 here.
*
* @author (your name)
* @version (a version number or a date)
*/
public class Dialog1 extends Actor
{
/**
* Act - do whatever the Dialog1 wants to do. This method is called whenever
* the 'Act' or 'Run' button gets pressed in the environment.
*/
public void act()
{ World duniaRatu = new MyWorld();
List ratu = getWorld().getObjects(Ratu.class);
Actor player = (Actor)ratu.get(0);
int ratuY = player.getY();
if(ratuY== 500){duniaRatu.addObject(new Dialog1(),100,100);}
}
}

