private void OnTriggerEnter(Collider other) { var unit = other.GetComponent <Unit>(); if (unit == null) { return; } if (possessor != null) { unit = DeterminePossessor(unit); } possessor = unit; unitBallPosition = unit.GetBallPosition(); }
public void Awake() { // Get Components _navMeshAgent = GetComponent <NavMeshAgent>(); _unitBallPosition = GetComponentInChildren <UnitBallPosition>(); }