protected override void Start() { base.Start(); normalAttack = GetComponent <PlayerNormalAttack>(); searchEnemy = GetComponent <SearchEnemy>(); searchCharactor = GetComponent <SearchCharacter>(); }
// 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) { if (m_playerNormalAttack == null) { m_playerNormalAttack = animator.transform.root.GetComponent <PlayerNormalAttack>(); } m_playerNormalAttack.StartAttack(); }
void Start() { m_playerState = this.GetComponent <PlayerState>(); m_characterMove = this.GetComponent <CharacterMove>(); m_characterJump = this.GetComponent <CharacterJump>(); m_animFuntion = this.GetComponentInChildren <PlayerAnimFuntion>(); m_skillManager = this.GetComponentInChildren <SkillManager>(); m_playerNormalAttack = this.GetComponent <PlayerNormalAttack>(); m_playerEvasion = this.GetComponent <PlayerEvasion>(); m_playerInfo = this.GetComponent <PlayerInfo>(); m_audioFunction = this.GetComponent <AudioFunction>(); }