Skip to content
This repository was archived by the owner on Aug 14, 2019. It is now read-only.
This repository was archived by the owner on Aug 14, 2019. It is now read-only.

Migrate pausing functionality to a singleton GameSpeed manager #42

Description

@ErikOverflow

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

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requestintermediate issueThis will require some Unity expertise to accomplish

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions