The example project also includes a prefab for the tank, which is simply called (you guessed it) Tank, inside the Prefabs folder.
The tank itself is a simple agent with one goal: reach the end of the maze. As mentioned earlier, the player has to help the tank out along the way by activating its abilities to keep it safe from oncoming fire from the towers.
By now, you should be fairly familiar with the components you'll encounter along the way, except for the Tank.cs component attached to the prefab. Let's take a look at the code to figure out what's going on behind the scenes:
using UnityEngine; using System.Collections; public class Tank : MonoBehaviour { [SerializeField] private Transform goal; private NavMeshAgent agent; [SerializeField] private float speedBoostDuration = 3; [SerializeField] private ParticleSystem...