⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 dropbomb.cpp

📁 小蜜蜂射击游戏,画面精彩,声音也不错
💻 CPP
字号:
// dropbomb.cpp: implementation of the dropbomb class.
//
//////////////////////////////////////////////////////////////////////

#include "stdafx.h"
#include "bee.h"
#include "dropbomb.h"

#ifdef _DEBUG
#undef THIS_FILE
static char THIS_FILE[]=__FILE__;
#define new DEBUG_NEW
#endif

//////////////////////////////////////////////////////////////////////
// Construction/Destruction
//////////////////////////////////////////////////////////////////////

dropbomb::dropbomb()
{
status=1;
}

dropbomb::~dropbomb()
{

}

void dropbomb::move(screen *pscreen)
{
	if(y1<0){
		status=0;
	}else{
       y1-=7;
	   }
}

dropbomb::dropbomb(int cx, int cy)
{
x1=cx,y1=cy,status=1;
}

void dropbomb::paint(CDC *pdc, screen *pscreen)
{
    if(islived()){
	int cx,cy;
	CBrush BrRed(RGB(255,255,0));
	CBrush *pOldBrush=NULL;
	pOldBrush=pdc->SelectObject(&BrRed);
	cx=pscreen->transitx(x1);
	cy=pscreen->transity(y1);	
//	pdc->Ellipse(cx+4,cy+4,cx-4,cy-4);
	pdc->SetBkColor(RGB(255,255,0));
	pdc->TextOut(cx,cy,"V");
	pdc->SelectObject(pOldBrush);
	}
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -