📄 bumbobject.cpp
字号:
// BumbObject.cpp: implementation of the CBumbObject class.
//
//////////////////////////////////////////////////////////////////////
#include "stdafx.h"
#include "BumbObject.h"
//////////////////////////////////////////////////////////////////////
// Construction/Destruction
//////////////////////////////////////////////////////////////////////
CBumbObject::CBumbObject()
{
m_nBreak = 1;
m_nLife = 500;
}
CBumbObject::~CBumbObject()
{
}
BOOL CBumbObject::Hit( char nDamage )
{
int nMaxLife = 500;// 烙矫风 窍厘..
int nAniLife = nMaxLife/m_pObject->GetFrameCount();
m_nLife -= nDamage;
int nAni = (m_pObject->GetFrameCount() - (m_nCurFrame+1))*nAniLife;
if( m_nLife <= nAni)
{
m_nCurFrame++;
if(m_pObject->GetFrameCount() <= m_nCurFrame)
m_nCurFrame = m_pObject->GetFrameCount()-1;
//m_nCurFrame = 1;
return TRUE;
}
return FALSE;
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -