So i'm trying to update my score when an enemy dies in a game but it keeps me giving the error message in de code above. Can someone help me out?
Here's the code in my world class:
And this is the code in my enemy class:
Thanks!
public void updateScore(int amount)
{
score = score + amount;
showText("Score: " + score, 100, 50);
}private void checkAlive()
{
if(isAlive=false)
{
MyWorld theWorld = (MyWorld) getWorld();
MyWorld.updateScore(15);
}
}
