public void StateInitialization(Transform enemy, Transform moveDirection, Transform character, CharacterController controller, Animator animator, ControlFSM controlFSM, HeroController heroController, IComboRegistration combosRegistration) { m_Enemy = enemy; m_HeroMoveDirection = moveDirection; m_Character = character; m_CharacterController = controller; m_Animator = animator; m_ControlFSM = controlFSM; m_HeroController = heroController; m_CombosRegistration = combosRegistration; }
public void FSMInitialization(Transform enemy, Transform moveDirection, HeroController heroController, IComboRegistration combosRegistration) { m_Character = transform; m_CharacterController = GetComponent <CharacterController>(); m_Animator = GetComponent <Animator>(); m_HeroController = heroController; m_CombosRegistration = combosRegistration; foreach (var cur in statesList) { cur.StateInitialization(enemy, moveDirection, m_Character, m_CharacterController, m_Animator, this, m_HeroController, combosRegistration); } currentState = this[initState]; currentState.EnterState(m_MoveDirection); }