-
Notifications
You must be signed in to change notification settings - Fork 4
Scanner Task
The ScannerTask implements scanning behaviour for GapScanner enitities that detect conditions related to engineer spawning.
The scanner task is added to the gapScanner entity's AITaskComponent during instantiation. It spawns up to 3 engineers at its location if the following conditions are met:
- No towers exist within detection range in the lane
- No Engineers exist within detection range in the lane
- Mobs are detected within detection range in the lane
The functionality will likely be modified/expanded to update the task if engineers die and more are required.
As with other tasks, this is a task that is added to an entity's AITaskComponent. It requires no arguments. An example of its use is as follows:
Entity scanner = new Entity();
AITaskComponent aiComponent = new AITaskComponent();
scanner
.addComponent(new PhysicsComponent())
.addComponent(aiComponent);
scanner.getComponent(AITaskComponent.class).addTask(new ScannerTask());
The integration of the ScannerTask into the GapScanner is shown in the sequence diagram in GapScannerFactory and will not be shown here.
The integration of the ScannerTask into the GapScanner class structure is shown in the UML diagram in GapScannerFactory and will not be shown here.