void Start() { targetChoosing = GetComponent <TargetChoosing>(); movement = GetComponent <Movement>(); states = GetComponent <States>(); targetCheckTimer = targetCheckRate; }
void Start() { targetsInRange = new HashSet <VisibleTarget>(); seenTargets = new HashSet <VisibleTarget>(); detectionTrigger = GetComponent <CircleCollider2D>(); targetChoosing = transform.parent.GetComponent <TargetChoosing>(); detectionTrigger.radius = detectionDistance; }