public void DoAction(CharacterStateType eType) { AnimationAction pAction = m_dicActions[eType]; if (m_pCurrentAction.CanReplace(pAction)) { m_pCurrentAction = pAction; m_pInfo.m_pCurrentStateData = m_pInfo.m_pInstructionData.Actions[eType]; m_pInfo.m_eCurrentStateType = eType; m_pInfo.m_iCurrentFrame = 0; } m_bIsPlaying = true; }
public CharacterAnimiationLogic(CharacterInfo info) { m_pInfo = info; m_pCurrentAction = m_dicActions[CharacterStateType.UNDEFINE]; m_pDefaultActionType = CharacterStateType.IDLE; }
public void UnInitialize() { m_pCurrentAction = m_dicActions[CharacterStateType.UNDEFINE]; m_bIsPlaying = false; }
virtual public bool CanReplace(AnimationAction action) { return(action.m_eType != this.m_eType || m_bReplaceSame); }