public override void OnStart()
 {
     m_DeathmatchAgent = GetComponent <DeathmatchAgent>();
     if (purpose == "cover")
     {
         successProbability = m_DeathmatchAgent.phenoType.GetParameter("cover probability");
     }
 }
Example #2
0
        private void AttackThief()
        {
            DeathmatchAgent  agent            = GetComponentInParent <DeathmatchAgent>();
            PatrolController patrolController = GetComponentInParent <PatrolController>();

            agent.TrackLayerAndTag(m_InteractorGameObject.layer, m_InteractorGameObject.tag);
            patrolController.CheckAlarm(m_InteractorGameObject);
        }
Example #3
0
        void Start()
        {
            behaviorTree    = GetComponent <BehaviorTree>();
            deathmatchAgent = GetComponent <DeathmatchAgent>();
            navMeshAgent    = GetComponent <NavMeshAgent>();

            if (flowchart == null && flowchartName != null && flowchartName.Trim().Length != 0)
            {
                flowchart = GameObject.Find("/Fungus/Flowcharts/" + flowchartName).GetComponent <Fungus.Flowchart>();
            }

            trackEvent.AddListener(TrackTargetsInLayers);
        }
Example #4
0
        void Start()
        {
            if (flowchart == null && flowchartName != null && flowchartName.Trim().Length != 0)
            {
                flowchart = GameObject.Find(flowchartName).GetComponent <Fungus.Flowchart>();
            }

            patrolController = GetComponentInParent <PatrolController>();
            health           = GetComponentInParent <CustomHealth>();
            behaviorTree     = GetComponentInParent <BehaviorTree>();
            navMeshAgent     = GetComponentInParent <NavMeshAgent>();
            deathmatchAgent  = GetComponentInParent <DeathmatchAgent>();
        }
Example #5
0
        void Start()
        {
            health              = GetComponent(typeof(CharacterHealth)) as CharacterHealth;
            behaviorTree        = GetComponent <BehaviorTree>();
            deathmatchAgent     = GetComponent <DeathmatchAgent>();
            navMeshAgent        = GetComponent <NavMeshAgent>();
            characterController = GetComponent <RigidbodyCharacterController>();
            speedChange         = GetComponent <SpeedChange>();
            inventory           = GetComponent <Opsive.ThirdPersonController.Wrappers.Inventory>();

            if (flowchart == null && flowchartName != null && flowchartName.Trim().Length != 0)
            {
                flowchart = GameObject.Find("/Fungus/Flowcharts/" + flowchartName).GetComponent <Fungus.Flowchart>();
            }

            trackEvent.AddListener(TrackTargetsInLayers);
        }
Example #6
0
 public override void OnStart()
 {
     // Remember the start time.
     m_DeathmatchAgent = GetComponent <DeathmatchAgent>();
     if (purpose == "chase")
     {
         waitTime = m_DeathmatchAgent.phenoType.GetParameter("chase wait time") * 20f;
     }
     startTime = Time.time;
     if (randomWait.Value)
     {
         waitDuration = Random.Range(randomWaitMin.Value, randomWaitMax.Value);
     }
     else
     {
         waitDuration = waitTime.Value;
     }
 }
Example #7
0
 private void Start()
 {
     deathmatchAgent = GetComponent <DeathmatchAgent>();
 }
Example #8
0
 public override void OnStart()
 {
     m_DeathmatchAgent = GetComponent <DeathmatchAgent>();
     m_Amount          = m_DeathmatchAgent.phenoType.GetParameter("find health threshold") * 100f;
 }
 public override void OnStart()
 {
     m_DeathmatchAgent = GetComponent <DeathmatchAgent>();
     m_Distance        = m_DeathmatchAgent.phenoType.GetParameter("ammo distance threshold") * 20f;
 }
 public override void OnStart()
 {
     m_DeathmatchAgent = GetComponent <DeathmatchAgent>();
     m_HealthAmount    = m_DeathmatchAgent.phenoType.GetParameter("flee health threshold") * 100f;
     m_MinDistance     = m_DeathmatchAgent.phenoType.GetParameter("flee distance threshold") * 20f;
 }