Hello~ I'm writing a game sorta like Doodle Jump, except it's Harry Potter eating Horcruxes instead, and I want to make the ScoreBoard show the number of Horcruxes he's eaten. This is part of my code for the Horcrux:
The code won't compile because it can't find addScore(). But addScore() is placed inside my ScoreBoard, that's for sure. It's probably just a tiny problem in getting the object, but I can't find it. Please help!! Thank you!
public void destroyHorcrux(){
if(getOneIntersectingObject(HarryPotter.class) != null){
Actor scoreboard=getOneObjectAtOffset( 350,50,ScoreBoard.class);
scoreboard.addScore();
getWorld().removeObject(this);
}
}
