Commit cf5c1bd7 authored by CjhGm's avatar CjhGm
Browse files

TODO: destroy enemy

parent ca62fce8
......@@ -370,7 +370,7 @@ void CPlaneWarView::OnLButtonDown(UINT nFlags, CPoint point)
isStarted = TRUE;
}
else if (myplane != NULL) {
// 按空格键发射子弹
// 按鼠标左键发射子弹
CBullet* bullet = new CBullet(myplane->GetPoint().x + PLANE_WIDTH / 2 - BULLET_WIDTH / 2, myplane->GetPoint().y);
bulletList.AddTail(bullet);
}
......@@ -381,7 +381,10 @@ void CPlaneWarView::OnLButtonDown(UINT nFlags, CPoint point)
//鼠标右键监听
void CPlaneWarView::OnRButtonUp(UINT /* nFlags */, CPoint point)
{
// MyTODO
if (isStarted == TRUE && myplane != NULL) {
// 按鼠标右键发射炮弹
// MyTODO
}
}
//生命周期
......
......@@ -12,10 +12,6 @@ CScene::~CScene(void)
//初始化场景
bool CScene::InitScene()
{
/*this->images[0].Load(L"image\\background1.bmp");
this->images[1].Load(L"image\\background2.bmp");
this->images[2].Load(L"image\\background3.bmp");
*/
//加载开始图片
this->images[0].Load(_T("image\\start.bmp"));
CString str;
......@@ -28,7 +24,7 @@ bool CScene::InitScene()
}
//开始为真, 背景起始坐标为0
this->isStart = true;
this->isStart = TRUE;
this->beginY = 0;
//播放背景音乐
......@@ -53,7 +49,7 @@ void CScene::StickScene(CDC* pDC,int index, CRect rClient)
beginY = 0;
if (isStart)
isStart = false;
isStart = FALSE;
}
//客户区高度
......
......@@ -11,7 +11,7 @@ private:
CImage images[8];//滚动背景,0位为开始图片,1-7为七张不同的背景
int beginY;//背景的Y坐标
bool isStart;//是否开始
BOOL isStart;//是否开始
//成员函数
public:
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment