protected override void Awake() { base.Awake(); m_navMeshAgent.destination = GetWanderPosition(transform.position); m_navMeshAgent.speed = m_fWanderSpeed; m_findOBjectsInRadius = GetComponent <FindObjectsInRadius>(); }
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>(); }
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>(); }
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); }
// 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>(); }
// Use this for initialization void Start() { m_enemyScript = this.GetComponent <Enemy>(); m_foir = this.GetComponent <FindObjectsInRadius>(); }