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