Hello, my project is a gladiator arena game with a portal room to take the player to different arenas. When clicked on, each portal should set the world to the appropriate arena.
This is my current code for the portal1 class
public void act()
{
if(Greenfoot.mouseClicked(this))
{
Greenfoot.setWorld(Arena1);
}
}
The only result is that it pauses the scenario and creates a copy of the character at its current location, without changing the world to Arena1. No terminal windows when this occurs so I am not sure how to identify the problem.
This is the constructor for Arena1
public Arena1()
{
addObject(new Character(), getWidth()/2, getHeight()/2);
addObject(new Gladiator(), 100, 50);
addObject(new Gladiator(), 700, 50);
addObject(new Gladiator(), 100, 450);
populateslaves();
setBackground(bg);
}
please help <3
