⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 扑捉虫子.cpp

📁 模拟抓虫子的源代码,是一个很好的c++的学习代码
💻 CPP
字号:
/***********************
软件工程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 + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -