Ejemplo n.º 1
0
        protected override void AfterNearnessUpdate()
        {
            var closest = CurrentObjs.OrderBy(obj => Vector3.Distance(transform.position, obj.transform.position)).FirstOrDefault();

            if (closest != Current)
            {
                var from = Current;
                Current = closest;
                player.OnClosestTurretChanged(from, closest);
            }
        }
Ejemplo n.º 2
0
 protected override void OnHasObjects()
 {
     GetComponent <Enemy>().OnNearNexus(CurrentObjs.First());
 }