📄 zhuan.cpp
字号:
// Zhuan.cpp: implementation of the Zhuan class.
//
//////////////////////////////////////////////////////////////////////
#include "stdafx.h"
#include "mqgGAME.h"
#include "Zhuan.h"
#ifdef _DEBUG
#undef THIS_FILE
static char THIS_FILE[]=__FILE__;
#define new DEBUG_NEW
#endif
//////////////////////////////////////////////////////////////////////
// Construction/Destruction
//////////////////////////////////////////////////////////////////////
Zhuan::Zhuan()
{
w=55;
h=25;
}
Zhuan::~Zhuan()
{
}
void Zhuan::IsZhuang()
{
if(zt==0)
return;
RECT tt,cr2;
cr2.left=cr.left;
cr2.top=cr.top;
cr2.right=cr.right;
cr2.bottom=cr.bottom;
if(IntersectRect(&tt,&cr2,&pBall->cr))
{
zt=zt-1;
pJFB->JiaFen();
pBall->ZhuanXiang(2);
}
}
void Zhuan::Draw(CDC *pDC)
{
/**/ //CPen Pen(PS_NULL,0,RGB(255,255,255));
//pDC->SelectObject(&Pen);
CBrush Brush( RGB(200,0,0 ) );
pDC->SelectObject(&Brush);
// if(zt==1)
pDC->Rectangle(&cr);
// else if(zt==2)
// pDC->RoundRect(cr.left,cr.top,cr.right,cr.bottom,20,20);
/**/ CBrush Brush2( RGB(255,255,0 ) );
pDC->SelectObject(&Brush2);
pDC->Rectangle((cr.left+8),cr.top+5,(cr.right-8),cr.bottom-5);
// DeleteObject(Pen);
// DeleteObject(Brush);
// DeleteObject(Brush2);
}
Zhuan::Zhuan(int x, int y)
{
w=55;
h=25;
cr.left=x+1;
cr.top=y+1;
cr.right=cr.left+w-2;
cr.bottom=cr.top+h-2;
//zt=1;
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -