扑捉虫子.cpp

来自「一个很有意思的扑杀虫子游戏」· C++ 代码 · 共 42 行

CPP
42
字号
/***********************
软件工程2002级3班
靳国荣
学号:20026235
***********************/
#include <assert.h>
#include "GameControler.h"

GameController *BugGame;

int TimerCallBack(void) {
	BugGame->TimerTick();
	return 1;
}
int MouseCallBack(const Position &MousePosition) {
	BugGame->MouseClick(MousePosition);
	return 1;
}

int ApiMain() {
	BugGame = new GameController();
	(BugGame->GetWindow())->SetTimerCallback(TimerCallBack);
	(BugGame->GetWindow())->SetMouseClickCallback(MouseCallBack);
	BugGame->Play(Slow);

	return 0;
}

int ApiEnd() {
	delete BugGame;

	return 0;
}








⌨️ 快捷键说明

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