I know this is not covered in the Laser Defender series, but I’m trying to make a high score feature that is saved.
I’ve watched a lot of videos on how to do it. They all use the PlayerPrefs method, but I can’t figure out how to implement it specifically into the laser defender code.
I think part of the problem may be with how things have been setup in this game, i.e… the int score variable is stored in the GameSession.cs, the score display is in the ScoreDisplay.cs, and the enemy score value and the method to add to the score when an enemy dies is in the Enemy.cs script. I’m still very new at coding and struggling how to reference all these separate items so it creates a high score feature.
If anyone has done this, or has any suggestions - I’d love to hear them. I find I’m learning a lot more by adding onto the game’s systems, and stuff like this really helps me connect the dots better. But this one is really stumping me.