-
Notifications
You must be signed in to change notification settings - Fork 4
Warning Factory
Praneet Dhoolia edited this page Oct 17, 2023
·
1 revision
The WarningFactory creates an Entity, adds a WarningComponent and configures it to process a mob. It then adds an AITaskComponent containing the WarningTask, which enables the WarningTask to update and delete the WarningComponent. A Camera object is used to flash size-matched warning signals on incoming mobs.
The public static Entity createWarning(Entity mob)
creates the WarningComponent, AITaskComponent, WarningTask and adds them to a new Entity which is returned after configuring the mob for the WarningComponent using warningComponent.config(mob);
.
The Camera for this class is configured globally using WarningFactory.camera = renderer.getCamera().getCamera();
in the MainGameScreen constructor.