101 lines
2.9 KiB
C++
101 lines
2.9 KiB
C++
|
|
|
|
#pragma once
|
|
|
|
//#include <vector>
|
|
#include <Windows.h>
|
|
#include <mmo/ArType.h>
|
|
|
|
#include "SGameUIMgr.h"
|
|
|
|
//////////////////////////////////////////////////////////////////////////
|
|
/// 모션 정의
|
|
class SMotionSlot
|
|
{
|
|
public:
|
|
SMotionSlot();
|
|
~SMotionSlot();
|
|
|
|
const int GetPos() const { return m_nMotionPos; };
|
|
const char* GetIconName() const { return m_strIconName.c_str(); };
|
|
// const int GetIconID() const { return m_nMotionIconID; };
|
|
const int GetCommandID() const { return m_nMotionCommandID; };
|
|
const char* GetName() const { return m_strMotionName.c_str(); };
|
|
const char* GetToolTip() const { return m_strMotionToolTip.c_str(); };
|
|
|
|
void SetUse( bool bUse );
|
|
bool IsUse() { return m_bUse; }
|
|
|
|
void SetCasting( bool bCasting ) { m_bCasting = bCasting; };
|
|
void SetShooting( bool bShooting ) { m_bShooting = bShooting; };
|
|
const bool IsCasting() const { return m_bCasting; };
|
|
const bool IsShooting() const { return m_bShooting; };
|
|
|
|
void SetBeginTime( DWORD dwTime ) { m_dwBeginTime = dwTime; };
|
|
void SetMaxTime( DWORD dwTime ) { m_dwMaxTime = dwTime; };
|
|
|
|
const DWORD GetBeginTime() const { return m_dwBeginTime; };
|
|
const DWORD GetMaxTime() const { return m_dwMaxTime; };
|
|
|
|
void AddMotion( int nPos, const char* szIconName, int nCommandID, const char* szMotionName, const char* szMotionToolTip );
|
|
void Process( DWORD dwTime );
|
|
public:
|
|
|
|
int m_nMotionPos;
|
|
// int m_nMotionIconID;
|
|
int m_nMotionCommandID;
|
|
std::string m_strIconName;
|
|
std::string m_strMotionName;
|
|
std::string m_strMotionToolTip;
|
|
|
|
bool m_bUse;
|
|
bool m_bCasting;
|
|
bool m_bShooting;
|
|
DWORD m_dwBeginTime;
|
|
DWORD m_dwCoolTime;
|
|
DWORD m_dwStartTime;
|
|
DWORD m_dwMaxTime;
|
|
};
|
|
|
|
|
|
//////////////////////////////////////////////////////////////////////////
|
|
/// 모션 리스트 정의
|
|
class SMotionMgr : public SGameUIMgr
|
|
{
|
|
public:
|
|
SMotionMgr();
|
|
virtual ~SMotionMgr();
|
|
|
|
/// Cool Time 처리
|
|
virtual void Process( DWORD dwTime );
|
|
public:
|
|
const std::vector<SMotionSlot>& GetMotionList() const { return m_vecMotionList; };
|
|
|
|
void InitMotionList();
|
|
void UseMotion( int nPos );
|
|
|
|
void AddCooling( int nMotionCmd );
|
|
void SetCastingMotion( int nMotionType, bool bCasting );
|
|
void SetShootingMotion( int nMotionType, bool bShooting, DWORD dwDelayTime );
|
|
|
|
const int GetMotionCommandID( int nPos ) const;
|
|
const char* GetIconIconName( int nPos ) const;
|
|
const char* GetMotionName( int nPos ) const;
|
|
const char* GetToolTip( int nPos ) const;
|
|
const SMotionSlot* GetMotion( int nPos ) const;
|
|
const bool IsEnableMotion( int nPos ) const;
|
|
const int GetMotionCount() const { return static_cast<int>(m_vecMotionList.size()); };
|
|
|
|
const bool IsCastingMotion( int nMotionCmd ) const;
|
|
const bool IsShootingMotion( int nMotionCmd ) const;
|
|
|
|
const DWORD GetSkillCurTime( int nMotionID ) const;
|
|
const DWORD GetSkillMaxTime( int nMotionID ) const;
|
|
|
|
void ResetInfo();
|
|
private:
|
|
std::vector<SMotionSlot> m_vecMotionList;
|
|
|
|
DWORD m_dwTime;
|
|
};
|