I keep getting this error in my code. I have followed the video word for word.
this is the code:
public class Fighter : MonoBehaviour
{
Transform target;
private void Update()
{
if(target != null)
{
GetComponent<Mover>().MoveTo(target.position);
}
}
public void Attack(CombatTarget combatTarget)
{
this.CombatTarget = combatTarget;
this.combatTarget = combatTarget;
target = combatTarget.transform;
}
}
}
The issue lies in the public void Attack(CombatTarget combatTarget)