Esempio n. 1
0
    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();
    }
Esempio n. 2
0
 public void Awake()
 {
     // Get Components
     _navMeshAgent     = GetComponent <NavMeshAgent>();
     _unitBallPosition = GetComponentInChildren <UnitBallPosition>();
 }