📄 martchmode.cpp
字号:
// MartchMode.cpp: implementation of the CMartchMode class.
//
//////////////////////////////////////////////////////////////////////
#include "stdafx.h"
#include "DBallGame.h"
#include "MartchMode.h"
#include "MyDef.h"
#ifdef _DEBUG
#undef THIS_FILE
static char THIS_FILE[]=__FILE__;
#define new DEBUG_NEW
#endif
//////////////////////////////////////////////////////////////////////
// Construction/Destruction
//////////////////////////////////////////////////////////////////////
CMartchMode::CMartchMode()
{
}
CMartchMode::~CMartchMode()
{
}
void CMartchMode::InitOther()
{
x_dir = y_dir = 1;
Pos.y = WinRect->bottom *10/11-7;
m_news->SetWindowText ("年轻人,准备好了吗?\n请不要按的太急,谢谢支持");
}
void CMartchMode::ResetEx()
{
x_dir = y_dir = 1;
PrePos.x = Pos.x = m_BelowBarPos;
PrePos.y = Pos.y =WinRect->bottom *10/11-7;
m_news->SetWindowText ("年轻人,准备好了吗?\n请不要按的太急,谢谢支持");
}
bool CMartchMode::MoveEx()
{
bool i;
if(Pos.y >=y_Above+6&&Pos.y<=y_Above+6+delta_x )//小球步长为2
{
i=y_dir;
if(Analyse(BAR_ABOVE))y_dir=0;
if(i!=y_dir)
{
PlaySound("sound",AfxGetResourceHandle(),SND_RESOURCE|SND_ASYNC|SND_NODEFAULT );
m_news->SetWindowText ("年轻人,准备好了吗?\n请不要按的太急,谢谢支持");
}
return 0;
}
if(Pos.y <=y_Below-6&&Pos.y>=y_Below-6-delta_x )
{
i=y_dir;
if(Analyse(BAR_BELOW))y_dir=1;
if(i!=y_dir)
{
PlaySound("sound",AfxGetResourceHandle(),SND_RESOURCE|SND_ASYNC|SND_NODEFAULT );
m_news->SetWindowText ("年轻人,准备好了吗?\n请不要按的太急,谢谢支持");
}
return 0;
}
if(Pos.y >=y_Below*11/10-5)
{
m_news->SetWindowText ("恭喜B,这证明你不SB");
return 1;
}
if(Pos.y <=5)
{
m_news->SetWindowText ("恭喜A,SB不属于你");
return 1;
}
return 0;
}
void CMartchMode::Failure()
{
if(Pos.y <=20)
AfxMessageBox("A徒,胜利");
else
AfxMessageBox("B徒,胜利");
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -