I want to create a scoreboard where if I destroy an enemy, my score will go up. I had it so when an enemy score spawned it went up, but I don't want that. I put the code for adding score into the enemy code thinking that would work. It complied, but the game would stop when I destroyed the enemy
Actor shot = getOneIntersectingObject(Shot.class); if (shot != null) { getWorld().removeObject(shot); getWorld().removeObject(this); scoreboard.addScore(25); }