Example:
addObject(new Dialogue(dialog3), 300, 50);
public class WolfStatue extends Freature
{ String[] dialog3 =
{
"The Greatest of Alpha\n Blizzard Wolf Smith."
};
/**
* Act - do whatever the WolfStatue wants to do. This method is called whenever
* the 'Act' or 'Run' button gets pressed in the environment.
*/
public void act()
{touch();
}
public void touch()
{if(isTouching(Player.class))
{adddialog();
}
}
public void adddialog()
{ Dialogue dialogue3 = new Dialogue(dialog3);
getWorld().addObject(dialogue3,230, 56);
}
}