Creating the abstract FSM class
Next, we implement a generic abstract class to define the enemy tank AI class's methods. This abstract class will be the skeleton of our AI and represent a high-level view of what an enemy tank should do.
We can see the code of this class in the FSM.cs
file:
using UnityEngine; using System.Collections; public class FSM : MonoBehaviour { protected virtual void Initialize() { } protected virtual void FSMUpdate() { } protected virtual void FSMFixedUpdate() { } // Use this for initialization void Start () { Initialize(); } // Update is called once per frame void Update () { FSMUpdate(); ...