private void Awake() { if (navigation == null) { navigation = GetComponent <TargetNavigationBehaviour>(); } if (teamAssignment == null) { teamAssignment = GetComponent <TeamAssignmentVisualizer>(); } if (spellsBehaviour == null) { spellsBehaviour = GetComponent <SpellsBehaviour>(); } }
private void Awake() { navigation = GetComponent <TargetNavigationBehaviour>(); inventoryInterface = GetComponent <InventoryBehaviour>(); }
public static void NavigateToRandomNearbyPosition(TargetNavigationBehaviour navigation, Vector3 currentPosition, float maxDistance, float interactionSqrDistance) { var targetPosition = currentPosition + (UnityEngine.Random.insideUnitSphere * maxDistance).FlattenVector(); navigation.StartNavigation(targetPosition, interactionSqrDistance); }
private void OnEnable() { navigation = GetComponent <TargetNavigationBehaviour>(); targetNavigation.ComponentUpdated += NavigationUpdated; }