Hi everyone, I want to make a game where you have an object called Ball and an object called Brick, and when the ball hits a brick, a variable called life needs to be lowered by one. This is the code I have right now:
1 2 3 4 | Actor blok = getOneIntersectingObject(Brick. class ); if (blok != null ) { blok.leven--; } |