Ejemplo n.º 1
0
    protected override void Awake()
    {
        base.Awake();

        m_navMeshAgent.destination = GetWanderPosition(transform.position);
        m_navMeshAgent.speed       = m_fWanderSpeed;

        m_findOBjectsInRadius = GetComponent <FindObjectsInRadius>();
    }
Ejemplo n.º 2
0
    void Start()
    {
        m_enemyScript = this.GetComponent <Enemy>();
        m_weapon      = this.GetComponent <BaseWeapon>();
        m_foir        = this.GetComponent <FindObjectsInRadius>();
        m_collider    = GetComponent <Collider>();

        m_animator = GetComponent <Animator>();
    }
Ejemplo n.º 3
0
    private new void Awake()
    {
        base.Awake();

        m_navMeshAgent             = GetComponent <NavMeshAgent>();
        m_navMeshAgent.destination = GetWanderPosition(transform.position);
        m_navMeshAgent.speed       = m_fWanderSpeed;

        m_findOBjectsInRadius = GetComponent <FindObjectsInRadius>();
    }
Ejemplo n.º 4
0
 private new void Awake()
 {
     base.Awake();
     m_foir                     = this.GetComponent <FindObjectsInRadius>();
     m_navMeshAgent             = GetComponent <NavMeshAgent>();
     m_OrcRenderer              = transform.Find("Melee_Mesh_Low").GetComponent <Renderer>();
     m_ChargeColour             = new Color(0.0f, 0.0f, 1.0f, 1.0f);
     m_IdleColour               = m_OrcRenderer.material.color;
     m_navMeshAgent.destination = GetWanderPosition(transform.position);
     m_navMeshAgent.speed       = m_fMoveSpeed;
     //playerlayer = LayerMask.GetMask("Player");
     //Debug.Log(playerlayer);
 }
Ejemplo n.º 5
0
 // OnStateEnter is called when a transition starts and the state machine starts to evaluate this state
 override public void OnStateEnter(Animator animator, AnimatorStateInfo stateInfo, int layerIndex)
 {
     m_agent = animator.GetComponent <NavMeshAgent>();
     m_foir  = animator.GetComponent <FindObjectsInRadius>();
 }
Ejemplo n.º 6
0
 // Use this for initialization
 void Start()
 {
     m_enemyScript = this.GetComponent <Enemy>();
     m_foir        = this.GetComponent <FindObjectsInRadius>();
 }