ApericotStudio / Poltergeist

Main repository for development of the Poltergeist game
0 stars 0 forks source link

Fix: Level Select Grades #454

Closed ThijsvanDijk closed 9 months ago

ThijsvanDijk commented 9 months ago

Description

Updated the gradefile script to save the criteria that were used to calculate the grade in the grade file as well. Due to a recent update these criteria are needed to calculate the actual grade a player got.

UPDATE: I was being dumb, the resulting grade is obviously already stored in the grade file so when you load it in there is absolutely no need to calculate it again. So now when a grade file is loaded a boolean that indicates whether the grade has already been calculated will be set to true. If it is it will skip the calculation that caused the error in the first place.

The extra bonus with this solution is the fact the absolutely nothing has to be changed about the structure of the grade file so old save files will still work

Also applied the changes to the Scare Cam to the prefabs which is something i forgot to do before

Setting up testing environment

  1. Clear your PlayerPrefs and remove "Assignment" and "FinalExam" files from C:\Users\"YOUR USERNAME HERE"\AppData\LocalLow\Apericot Studio\Manor Madness (if they exist)
  2. In the project window navigate to Project/Assets/Scenes/UI and open the "Level Select" scene.
  3. Press Play.

Feat Review

Level Select Grades

Criteria:

Checklist

These checks should always be true for your pull request