void Awake()
    {
        initalizeNavMeshAgent();
        initalizeTarget();
        m_selfAgent     = this.GetComponent <FlyingAgent>();
        m_behaviorState = new DroneCombatStage(m_selfAgent, m_navMeshAgent, m_enemy);

        tempFloat = Random.value * 10;
    }
예제 #2
0
 void Start()
 {
     m_navMeshAgent = this.GetComponent <NavMeshAgent>();
     m_currentState = new CombatStage(m_movingAgent, target, m_navMeshAgent);
     m_movingAgent.setHealth(health);
     m_movingAgent.setWeponFireCapability(false);
     intializeAgentCallbacks(m_movingAgent);
     m_movingAgent.setFaction(m_agentFaction);
     m_movingAgent.setSkill(skillLevel);
     m_movingAgent.enableTranslateMovment(false);
 }