Exemplo n.º 1
0
        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>();
 }
Exemplo n.º 3
0
        public static void NavigateToRandomNearbyPosition(TargetNavigationBehaviour navigation, Vector3 currentPosition, float maxDistance, float interactionSqrDistance)
        {
            var targetPosition = currentPosition + (UnityEngine.Random.insideUnitSphere * maxDistance).FlattenVector();

            navigation.StartNavigation(targetPosition, interactionSqrDistance);
        }
Exemplo n.º 4
0
 private void OnEnable()
 {
     navigation = GetComponent <TargetNavigationBehaviour>();
     targetNavigation.ComponentUpdated += NavigationUpdated;
 }