Turret defense
Turret defense is an example of implementation of a "tower defense" type of game.
The player has to prevent waves of enemies from accessing a target.
Enemies go through a maze-like defined path.
The target is located at the end of the path.
The player can build turrets on the walls that border the path.
Touch will handle this input.
Those towers will shoot projectiles that will lower the HP of the enemies.
The shooting is handled thanks to the Turret behavior.
The Turret behavior automatically triggers a shot when a defined object type is in the defined range of action.
The Turret also automatically rotates the object to be aiming at the specified object type.
The Enemies are moving along a path from the EnemySpawner object to the EnemyTarget object.
The path is calculated and moved along thanks to the Pathfinding behavior.
The manual article for the Pathfinding behavior will contain an explanation of how the behavior works, shows to set up your project in order to be able to calculate paths, how to calculate a path, how to make the object move along the calculated path.
When an Enemy reaches EnemyTarget, the Enemy is destroyed and a random Turret is also destroyed.
There are no actual death or winning conditions in this template.