Im sorry, ill try to add these things in because the sole reason i didnt put em in is because i didnt know how to. thank you eitherway.
Also ill work on the quit button.
This helped a ton and now i can make the game better.
Thanks a ton,
DevvLogg
No problem! Here are a couple of quick tutorials that might help.
Feel free to ask follow-ups if these don't cover what you need:
https://www.youtube.com/watch?v=QbqnDbexrCw
https://www.youtube.com/watch?v=TAGZxRMloyU
Without having access to your code, I can only speak in generalities.
Basically, you should have a score object for which you create a function that increments the score by a given amount:
Example:
private int score = 0;
public void IncreaseScore(int points)
{
score += points
//here you should call code to update your HUD's score display
}
Now every time you kill an object, you should call the Score Object's "IncreaseScore" and pass it the correct number of points before destroying your enemy object.
So, for example, your red object would call the function by passing the amount of 1: IncreaseScore(1) and black would call the function by passing the amount of 8: IncreaseScore(8).
As to how *specifically* you call the score object's IncreaseScore function from your enemy depends on how you implemented it. And to know that, I'd need to see your code. If you'd like, you can send me the project files (or upload them to itch and send me a link to them) here: game.professor@yandex.com