-
Notifications
You must be signed in to change notification settings - Fork 4
Gap Scanner Factory
The Gap scanner factory class creates scanner entities that detect the absence of towers and engineers, and the presence of mobs within approximately half the length of the lane. This triggers spawning of engineers by the attached ScannerTask.
Scanner entities have no visual, collider, or hitbox components. They have a PhysicsComponent which allows them to use raycasts for scanning, and an AITaskComponent which allows them to run the ScannerTask. A Single scanner entity is spawned at the far left end of each lane, and remains there for the duration of the game.
Scanner entities can be instantiated and spawned by
Entity scanner = GapScannerFactory.createScanner();
spawnEntityAt(scanner, <position>, true, true);
The logical flow of GapScanner and ScannerTask are illustrated in the following sequence diagram
The class structure of the GapScanner Factory and ScannerTask is shown in the following UML diagram