using System.Collections; using System.Collections.Generic; using UnityEngine; // TODO: Make inherit from BaseWeaponChanger // Add a true/false field to indicate if this AI should use the same weapon as target - make field visible in inspector window // Make start override Start method in base (inherited) class // Call the base (inherited) class start method first // Make Update override Update method in base (inherited) class // Call the base (inherited) class Update method first public class WeaponChangerAI : BaseWeaponChanger { [SerializeField] private bool sameWeaponAsTarget = false; // Start is called before the first frame update // Make start override Start method in base (inherited) class // Call the base (inherited) class start method first protected override void Start() { base.Start(); if (!sameWeaponAsTarget && useRandomWeapon) SelectRandomWeapon(); } // Make Update override Update method in base (inherited) class // If the value of the field you created above is true, call the base (inherited) class update method // Update is called once per frame protected override void Update() { if (sameWeaponAsTarget) { base.Update(); } } }