void Roar_DetectMermans(float DetectDistance) { // 레이어가 Enemy인 오브젝트 검출 allys = Physics.OverlapSphere(this.transform.position, DetectDistance, AllyLayer); int mermanIndex = 0; if (allys.Length != 0) { // 그중에서 어인몬스터만 검출 for (int i = 0; i < allys.Length; i++) { mermanController = allys[i].gameObject.GetComponent <MermanController>(); // 매복중인 애들은 제외 if (mermanController != null && mermanController.m_IdleType != IdleType.Hiding) { mermans[mermanIndex++] = allys[i]; } } } if (mermans.Length != 0) { for (int i = 0; i < mermanIndex; i++) { mermans[i].gameObject.GetComponent <MermanController>().Target = Target; } } }
private void Awake() { sc_Controller = GetComponent <MermanController>(); if (sc_Controller.m_MermanType == MermanType.Leader) { //TargetPlayer = GameManager.Instance.ClientPlayer; isCreateSerum = false; } }
protected override void Awake() { base.Awake(); sc_Controller = GetComponentInParent <MermanController>(); }