bughunt.cpp

来自「一个同学用C++写的小游戏」· C++ 代码 · 共 36 行

CPP
36
字号
// bughunt.cpp: the implement of the bughunt

#include "Control.h"

GameController *BugHunt;

int TimerCallback()
{
	BugHunt ->TimerTick();
	return 1;
}

int MouseCallback( const Position &MousePosition )
{
	BugHunt ->MouseClick(MousePosition);
	return 1;
}

int ApiMain()
{
	EzRandomize();
	BugHunt = new GameController();
	(BugHunt ->GetGameWindow()) ->SetTimerCallback(TimerCallback);
	(BugHunt ->GetControlWindow()) ->SetMouseClickCallback(MouseCallback);
    
	BugHunt ->Play(Slow);
	return 0;
}

int ApiEnd()
{
	delete BugHunt;
	return 0;
}

⌨️ 快捷键说明

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