I am currently creating a two player game for a school project.
For my game I am trying to make it so that each player is dependent on the other. eg, Player 1 pulling lever. to raise platform for Player2
I am stuck on a remove object code:
public void PanelOne()
{
Actor panel1;
panel1 = getOneObjectAtOffset(0,0, FloorPanel.class);
if(panel1 != null)
{
Actor block;
block = getOneObjectAtOffset(0,0, Map_One_Block.class);
World world;
world = getWorld();
world.removeObject(block);
panel1.setImage("FloorPanel2.png");
}
}
"panel1" is changing its image - to show its pressed
however the actor "block" is not being removed.
Can anyone help?
PanelOne() is being called from a subclass in it's Act() Method.

