Hello, everyone !!!
Today it's a quick article. What I implemented was a checkpoint system as well a save system.
For the checkpoint system what I do is put gamobjects in the scene and then I drop them into a script, where they go through that list and spawn a prefab called checkpoint.
The prefab contains the script Checkpoint. This script contains the method OntriggerEnter it's called when the player finally reaches the checkpoint.
If the player is in the last checkpoint the material of the prefab changes
When the player reaches the last checkpoint, the game finishes and the time is "saved" into a list on the GameManager, the GameManager organizes the list and sends it to the SaveManager to be saved into a JSON file.
Of course, I also implemented a Load method that is called at the beginning of the game
And that's all for this week.
Don't forget to follow me on X.