EDITED: I have edited the scripts so that they are actual Singletons! Thanks to a suggestion from a friend I was able to find out how to implement them in Unity. I also followed this link as a reference HERE
This week I worked on the implementation of a Time Freeze Controller and Time Controller. The first would be similar to the one I used for the prototype, however it would also allow me to add other effects when time is FROZEN.
Time Controller – A singleton in charge of calculating a delta time to be used for all entities who will not be affected by the time freeze. It will also allow us to play around with effects to be added when time is frozen.
Time State Data – A singleton that contains the state of time which could be either NORMAL or FROZEN.
Time Freeze Controller – A singleton that contains the details of the time freeze mechanic for the game (enable, cooldown, etc).
Time Manager Window – An editor window to be used to edit all values for the Time Controller and time Freeze controller. I thought it would be a good idea to have these editable in a single window! 🙂
CLICK HERE TO CHECK OUT SCRIPTS IN GITHUB
0 thoughts on “Implementing a Time Controller in Unity”