hello ,
at the moment it's like one actor grabs one actor and gives it to another actor after the second actor gets it it should move and add points
public void grabaCrate()
{
if (crate == null && Greenfoot.mouseClicked(crate))
{
move(getImage().getWidth()/2);
container = (Crates) getOneObjectAtOffset(0, 0, Crates.class);
move(-getImage().getWidth()/2);
if (crate != null)
{
crate.schip = null;
}
if (crate != null && Greenfoot.isKeyDown("space"))
{
crate = null;
}
}
}
private void adjustContainerPosition()
{
if (crate == null)
{
return;
}
crate.setLocation(getX(), getY());
crate.setRotation(getRotation());
crate.move(getImage().getWidth()/2);
crate.setRotation(0);
}