Skip to content
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

Open
ErikOverflow opened this issue Apr 9, 2019 · 0 comments
Open
Labels
enhancement New feature or request intermediate issue This will require some Unity expertise to accomplish

Comments

@ErikOverflow
Copy link
Owner

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

@ErikOverflow ErikOverflow added enhancement New feature or request good first issue Good for newcomers intermediate issue This will require some Unity expertise to accomplish and removed good first issue Good for newcomers labels Apr 9, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request intermediate issue This will require some Unity expertise to accomplish
Projects
None yet
Development

No branches or pull requests

1 participant