void Awake()
 {
     navMeshAgent = GetComponent <NavMeshAgent> ();
     survivorsk   = GetComponent <SurvivorSkills> ();
     character    = GetComponent <NetworkCharacter> ();
     hskills      = GetComponent <HunterSkills> ();
     navMeshAgent.stoppingDistance = navStopDistance;
     if (speedMultiplier == null)
     {
         speedMultiplier = GetComponent <SpeedMultiplier>();
     }
     deployedTimer = defaultDeployedUsageCooldown;
 }
Exemplo n.º 2
0
    private bool CheckPowerSourceNearBy(AIStateController controller)
    {
        SurvivorSkills skills = controller.survivorsk;

        //Debug.Log (skills.m_InteractingPowerSource);
        if (controller.targetIndx >= 0 && controller.targetIndx < controller.wayPointList.Count &&
            skills.m_InteractingPowerSource != null &&
            skills.m_InteractingPowerSource.gameObject.activeSelf &&
            skills.m_InteractingPowerSource.gameObject == controller.wayPointList[controller.targetIndx].gameObject)
        {
            controller.navMeshAgent.isStopped = true;
            return(true);
        }
        else
        {
            return(false);
        }
    }