void Start() { base.Start(); m_enemyFlip = GetComponent <Enemy_FlipByPlayer>(); m_bDashToggle = true; player = GameObject.FindGameObjectWithTag("player").GetComponent <Transform>(); playerControl = player.GetComponent <PlayerControl1>(); body = GetComponent <Rigidbody2D>(); playerBox = player.GetComponent <BoxCollider2D>(); m_shootSkill = GetComponent <EnemySkillShoot>(); m_throwBomb = GetComponent <EnemySkillThrowBomb>(); m_animator = GetComponentInChildren <Animator>(); m_nAnimatorChargingPara = Animator.StringToHash(AnimatorChargingPara); m_nAnimatorAttackPara = Animator.StringToHash(AnimatorAttackPara); m_nAnimatorThrowBombPara = Animator.StringToHash(AnimatorThrowBombPara); m_nAnimatorShootingPara = Animator.StringToHash(AnimatorShootingPara); m_nAnimatorThrowReadyPara = Animator.StringToHash(AnimatorThrowReadyPara); m_nAnimationThrowReady = Animator.StringToHash(AnimationNameThrowReady); m_nAnimationThrow = Animator.StringToHash(AnimationNameThrow); }
private void Awake() { m_flipEnemy = GetComponent <Enemy_FlipByPlayer>(); animator = GetComponent <Animator> (); player = GameObject.FindGameObjectWithTag("player").GetComponent <Transform> (); lr = GetComponent <LineRenderer> (); }
// Start is called before the first frame update protected override void Start() { base.Start(); Registe(this); m_flipEnemy = GetComponent <Enemy_FlipByPlayer>(); m_rigidBody = GetComponent <Rigidbody2D>(); m_ColliderPlayerBox = m_transPlayer.GetComponent <BoxCollider2D>(); m_ColliderBox = GetComponent <BoxCollider2D>(); m_playerCtrl = m_transPlayer.GetComponent <PlayerControl1>(); }