This repository has been archived by the owner on Aug 14, 2019. It is now read-only.
Migrate pausing functionality to a singleton GameSpeed manager #42
Labels
enhancement
New feature or request
intermediate issue
This will require some Unity expertise to accomplish
Is your feature request related to a problem? Please describe.
Currently pausing occurs within the InventoryUI script, and the WeaponMelee/WeaponMelee Controllers check the timescale value to determine if the game is paused. This is obfuscating the functionality and can confuse those unfamiliar with the project.
Describe the solution you'd like
Create a singleton GameSpeed manager that contains an Enum for GameSpeed (Paused, NormalSpeed), as well as a public PauseGame() and UnPauseGame() methods that sets Time.timeScale to 0. Update InventoryUI to invoke the Pause/Unpause methods and the Weapon Controllers to check the GameSpeed instead of directly comparing against Time.timeScale.
Additional context
You will need to modify InventoryUI, WeaponMeleeController, and WeaponRangedController
The text was updated successfully, but these errors were encountered: