public void act()
{
setRotation(direction);
move(speed);
touchingTheWall();
Actor disk1 = getOneIntersectingObject(Player2.class);
if(disk1 != null)
{
World myWorld = getWorld();
Level1 level1 = (Level1)myWorld;
Counter counter = level1.getCounter();
counter.addScore();
myWorld.removeObject(this);
}
}
public void touchingTheWall()
{
Actor contactwithwall = getOneIntersectingObject(PlasmaWalls.class );
Actor contactwithBoundary = getOneIntersectingObject(BoundaryWalls.class );
if( contactwithwall != null || contactwithBoundary != null )
{
getWorld().removeObject(this);
}
}
}
