private void Awake() { ingameManager = GameObject.FindGameObjectWithTag("InGameManager").GetComponent <InGameManager>(); mesh = GetComponentInChildren <SkinnedMeshRenderer>(); fog = GetComponent <FogOfWarEntity>(); minHP = transform.GetComponent <MinionHP>(); TheAIDest = gameObject.GetComponent <AIDestinationSetter>(); minAtk = transform.GetComponentInChildren <MinionAtk>(); Audio = GetComponentInChildren <AudioSource>(); Audio.minDistance = 1.0f; Audio.maxDistance = 10.0f; Audio.volume = 1f; Audio.spatialBlend = 0.5f; Audio.rolloffMode = AudioRolloffMode.Linear; if (minAtk == null) { print("minatk is null"); } TheAIPath = gameObject.GetComponent <AIPath>(); if (!cursor) { cursor = GameObject.FindGameObjectWithTag("MouseCursor").GetComponent <AOSMouseCursor>(); } }
private void MinionHit() { MinionHP m_HP = m_Target.GetComponent <MinionHP>(); if (m_HP != null) { m_HP.Damage(attackDmg); } }
/// <summary> /// 해당 스크립트의 전체적인 기본 값을 설정하는 함수 /// </summary> private void Init() { ingameManager = GameObject.FindGameObjectWithTag("InGameManager").GetComponent <InGameManager>(); mesh = GetComponentInChildren <SkinnedMeshRenderer>(); fog = GetComponent <FogOfWarEntity>(); minHP = transform.GetComponent <MinionHP>(); minAtk = transform.GetComponentInChildren <MinionAtk>(); TheAIDest = gameObject.GetComponent <AIDestinationSetter>(); TheAIPath = gameObject.GetComponent <AIPath>(); if (!cursor) { cursor = GameObject.FindGameObjectWithTag("MouseCursor").GetComponent <AOSMouseCursor>(); } InitAudio(); }