Hey,
I am trying to make a second condition for a method in the world.
In this condition I want to make a boolean which is testing if two actors (Player1, Ball) are intersecting. If they aren't the code shouldn't get executed because no other ball should spawn. Here the code that makes disappear the first wave of balls and the player:
Is it possible to call this method again and if the method is being executed, to make that the code for the ballspawn isn't getting executed? Or is there something to just check if the two actors are colliding?
Thanks for the help
if (BallSpawnTimer == 0 /* && add condition -> method disappear*/) {
spawnBall();
}public void disappear(){
if (this.getOneIntersectingObject(Ball.class) != null)
{
if (!getWorld().getObjects(Ball.class).isEmpty())
{
getWorld().removeObjects(getWorld().getObjects(Ball.class));
}
getWorld().removeObject(this);

