-
Notifications
You must be signed in to change notification settings - Fork 0
Time Controller
This script is used to increase and decrease the speed of the game by increasing the speed of conveyors, machines, points etc. When enabled, the player can increase and decrease the speed of the game using the up and down arrows. This is not normally enabled as the increased speed often causes issues where the interactions between machines and bottles are not as accurate. This inaccuracy is visible to the player. Increased time is really only used when loading certain levels where the line needs to be set to a steady state. As such the game is run with auto ordering at a higher speed.
This script includes public variables and functions that can be referenced by other scripts to ensure that they will work properly when the speed is increased. Instead of just using deltatime when handling time, other scripts will do use deltatime * TimeController.speedMultiplier. This will make it so that when other scripts are determining how much time has passed, they interpret that time has passed relative to the speed of the game.
There is also the WaitCustomSeconds ienumerator within this script which does the same feature as the built in WaitForSeconds, but relative to the speed changes.
- Current Branch Descriptions
- Version 1 Game Flow Overview
- Version 2 Game Flow Overview
- Localization and Start Screen Canvas Organization
- Overview of Scripts and Connections
- Machine Scripts
- Order Releases
- Demand
- Stage Controller
- Data Collection
- Video Recording
- Money Tracking
- Quest Systems for Levels and Tutorials
- Object Pooling
- Time Controller
- Forklift Scripts
- OpenAI Assistant Integration
- Ray Casting
- Camera Script
- General Purpose Object Collision