📄 player.h
字号:
// Player.h: interface for the CPlayer class.
//
//////////////////////////////////////////////////////////////////////
#if !defined(AFX_PLAYER_H__3429E9E2_4222_44A6_BE53_457D86002624__INCLUDED_)
#define AFX_PLAYER_H__3429E9E2_4222_44A6_BE53_457D86002624__INCLUDED_
#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
#define TIME_KEEP_SUPER_SHOOTER 35000 //35秒
#define TIME_KEEP_LOST_CONTROL 20000 //20秒
#define TIME_KEEP_BLIND 18000 //18秒
class CPlayer : public BubbleScene
{
public:
bool Shoot();
HRESULT Render(LONG x, LONG y);
CPlayer(CGsEngine* pEngine = NULL);
virtual ~CPlayer();
virtual bool Create(uint8 width, uint8 height);
void SetGsEngine(CGsEngine* pEngine) {m_pEngine = pEngine;}
public:
BOOL IsBlind();
void TriggerBlind();
BOOL IsLostControl();
void TriggerLostControl();
BOOL IsSuperShooter();
void TriggerSuperShooter();
void Reset();
virtual HRESULT do_restore_source();
virtual void do_release_source();
void add_effect_tip(const char* strTip, GPOINT pt_start, GPOINT pt_end, D3DCOLOR color, float fscale);
void trigger_scene_shaking();
void add_effect_cards(BYTE card_type, float ax, float ay);
void Start();
bool IsPlaying();
void update_user_data(int index, STRUCT_ADD_USER *pData);
bool IsReady();
void on_msg_score(STRUCT_SCORE *pSS);
void on_msg_pointer(int cmd);
bool update_scene_data(STRUCT_ADD_SCENE* ptr_add_scene, UCHAR* ptr_scene_data);
bool on_msg_shoot(STRUCT_SHOOT_DATA* pShoot);
virtual void Clearup();
FLAG Update();
float m_angle;
float m_scale;
int m_score;
BOOL m_is_shoot_shaking;
DWORD m_tick_power_shooter;
DWORD m_tick_lost_control;
DWORD m_tick_blind;
protected:
virtual void on_bubble_pop(int index);
virtual void on_bubble_spread(int index);
CGsEngine* m_pEngine;
struct _SHOOT_BUBBLE
{
STRUCT_SHOOT_DATA shoot;
int idx;
float y_speed;
float y_pos;
};
std::list<_SHOOT_BUBBLE> m_lst_shoot;
GSANI m_ani_pointer;
GSANI m_ani_ready;
GSANI m_ani_face;
GSANI m_ani_effect_blind;
CBubble** m_ap_bubble;
CBubble* m_ptr_bubble_current;
CBubble* m_ptr_bubble_next;
std::list<CBubble*> m_lst_pop;
struct _FALL_BUBBLE{
CBubble* p_bubble;
float v_x;
float h;
float fall;
};
std::list<_FALL_BUBBLE> m_lst_spread;
struct _EFFECT_CARDS {
BYTE card_type;
float ax;
float ay;
float alpha;
float scale;
DWORD tick;
};
std::list<_EFFECT_CARDS> m_lst_effect_cards;
struct _EFFECT_TIP {
CGsTexture* pTexture;
GPOINT pt_dest;
GPOINT pt_src;
DWORD start_time;
float scale;
};
std::list<_EFFECT_TIP> m_lst_effect_tip;
struct _POINTER_CONTROL
{
float angle_base;
DWORD tick_base;
FLAG key;
} m_control_pointer;
CGsTexture* m_ptr_texture_score;
CGsTexture* m_ptr_texture_state;
BOOL m_is_end;
BOOL m_is_scene_shaking;
};
#endif // !defined(AFX_PLAYER_H__3429E9E2_4222_44A6_BE53_457D86002624__INCLUDED_)
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -