//주석 개많네 private void Awake() { //퍼블릭으로 할당했습니다. 이름이 같아야 애니메이터를 공유할 수 있어서! m_sunbi = GameObject.FindGameObjectWithTag("Sunbi").GetComponent <Sunbi>(); m_battleManager = GameObject.FindGameObjectWithTag("BattleManager").GetComponent <BattleManager>(); speechBubble = GetComponent <SpeechBubble>(); }
private void Awake() { m_gameManager = GameObject.FindGameObjectWithTag("GameManager").GetComponent <GameManager>(); m_battleManager = GameObject.FindGameObjectWithTag("BattleManager").GetComponent <BattleManager>(); hpBar = GameObject.FindGameObjectWithTag("EnemyHpBar").GetComponent <Slider>(); hpAnimator = GameObject.FindGameObjectWithTag("EnemyHpBar").GetComponent <Animator>(); enemyHpText = hpBar.GetComponentInChildren <Text>(); m_canvas = GameObject.FindGameObjectWithTag("Canvas"); animator = this.GetComponent <Animator>(); bulletAnimator = GameObject.FindGameObjectWithTag("EnemyBullet").GetComponent <Animator>(); m_sunbi = GameObject.FindGameObjectWithTag("Sunbi").GetComponent <Sunbi>(); enemyBullet = GameObject.FindGameObjectWithTag("EnemyBullet"); hintHandler = GameObject.FindGameObjectWithTag("BulletHandler").GetComponent <EnemyHintBulletHandler>(); effectAudioSource = GameObject.FindGameObjectWithTag("effectAudioComp").GetComponent <AudioSource>(); enemy_attack = Resources.Load("EffectSounds/" + "enemy_attack") as AudioClip; enemy_hit = Resources.Load("EffectSounds/" + "enemy_hit") as AudioClip; }