In my project i have a board, named "paddel", which is bouncing back a ball.
Now i want remove the paddel when the variable s==48 und use the class "paddel2" to do the job of the "paddel"
My problem is that it can not find symbol-class paddel2 in the last line
My 2. questino :
I have some places like here where I want check out if the paddel hit the ball, which is flying around.
Can I write the code like this:
if ( s == 48) { Actor paddel = getOneIntersectingObject(Paddel.class); getWorld().removeObject(paddel); Paddel2 paddel2 = new Paddel2(); getWorld().addObject(new paddel2(), 240, 440); }
if (getOneIntersectingObject(Paddel.class) != null || getOneIntersectingObject(Paddel.class) != null) { dy = -dy; }