?? explode.cpp
字號(hào):
// Explode.cpp: implementation of the CExplode class.
//
//////////////////////////////////////////////////////////////////////
#include "stdafx.h"
#include "Explode.h"
#include "MainGame.h"
//////////////////////////////////////////////////////////////////////
// Construction/Destruction
//////////////////////////////////////////////////////////////////////
CExplode::CExplode(int px,int py,int n):CContainerObject(this)
{
stage = 0;
positionX=px;
positionY=py;
type=n;
if(type<4)sndPlaySound("sound//bang.wav",SND_ASYNC|SND_NODEFAULT);
}
CExplode::~CExplode()
{
}
void CExplode::displayObject()
{
CMainGame *pWnd=(CMainGame*)AfxGetMainWnd();
CRect rt1(positionX,positionY,positionX+30,positionY+30);
CRect rt2(32*(stage/5),0,32*(stage++/5+1),32);
//1--11 2--12 3--13
if(type==5)
pWnd->BltBitMap(pWnd->lpBackBuffer,rt1,pWnd->lpBKGObject[10+1],rt2);
else
pWnd->BltBitMap(pWnd->lpBackBuffer,rt1,pWnd->lpBKGObject[10+type],rt2);
}
bool CExplode::ActiveObject()
{
displayObject();
if(stage>40)return false;
else return true;
}
?? 快捷鍵說明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號(hào)
Ctrl + =
減小字號(hào)
Ctrl + -