Repository navigation
helpers
This folder contains helper classes that let you modify configurations or perform calculations at runtime.
Need to change a configuration during runtime? Look no further than the ExecutionContext class! It allows you to:
- Adjust the speed of rotating balls
- Modify the spawning speed of balls
- Access important game elements like the spawned ball or approaching balls
In essence, ExecutionContext provides runtime access to any element's configuration on the screen, making it a powerful tool.
The ExecutionContext class is initialized within the engine class when the application starts. As the engine initializes, it naturally initializes the JobManager and passes the ExecutionContext through it. This ensures that all jobs running on each tick have access to the ExecutionContext.
- Modify configurations or perform calculations at runtime.
- ExecutionContext allows runtime changes to various game elements.
- The engine class initializes ExecutionContext and makes it accessible to all jobs.
The Position class within the aa.engine.helpers package offers a way to represent a 2D location with separate X and Y coordinates. It provides methods to retrieve and modify these values.