/// <summary>
        /// Adds the agent to the agent list.
        /// </summary>
        /// <param name="agent">The agent to add.</param>
        protected override void AddAgentToGroup(Behavior agent, int index)
        {
            base.AddAgentToGroup(agent, index);

            if (tacticalAgent == null && gameObject == agent.gameObject)
            {
                tacticalAgent = new NavMeshTacticalAgent(agent.transform);
                tacticalAgent.AttackOffset = attackOffset.Value;
                tacticalAgent.TargetOffset = targetOffset.Value;
            }
        }
Exemplo n.º 2
0
        /// <summary>
        /// Adds the agent to the agent list.
        /// </summary>
        /// <param name="agent">The agent to add.</param>
        protected override void AddAgentToGroup(Behavior agent, int index)
        {
            base.AddAgentToGroup(agent, index);

            if (tacticalAgent == null && gameObject == agent.gameObject)
            {
                tacticalAgent = new NavMeshTacticalAgent(agent.transform, agentRadius, stoppingDistance, rotationSpeed, rotationThreshold);
                tacticalAgent.AttackOffset = attackOffset.Value;
                tacticalAgent.TargetOffset = targetOffset.Value;
            }
        }