效果图:
直接上代码:
#include "pch.h"#include <iostream>#include "graphics.h"#include <math.h>#include <time.h>#include <thread>#include <cstdio>#include <cstdlib>#include <mmsystem.h>using namespace std;/*全局变量定义*/PIMAGE img;mouse_msg msg;int score1 = 0,score2 = 0,over=0;//得分1,得分2,结束标志int width = 900,height = 700,Left=0,Up=1,Right=2,Down=3;//游戏界面宽,高,由于子弹发射出去是一个独立的模块,所以要给每个子弹配备上方向,用0,1,2,3分别代表左,上,右,下int lenT=0,lenG=0,lenW=0,lenF=0,lenR=0,lenS=0,lenBT=0;//坦克的数量,普通棕色墙的个数,白色墙的个数,草坪的个数,水潭的个数,小墙的个数,子弹的个数int td1=0,td2=0;//方向int model=0;//游戏模式标志,单人还是双人clock_t ts1,te1,ts2,te2;//定义时间变量,防止子弹发射过快,用于计算时间间隔,时间太短就不发射子弹struct Tank {//保存机器人坦克的信息int x,y,direction,preTime;//(x,y)坦克的位置,坦克的方向,上一次自动换方向的时刻} tank[100];struct myTank {//游戏玩家的坦克int x, y, direction;//位置和方向}t1, t2;struct Bullet {//子弹int x,y,direction,w;//子弹的位置,方向,w用于记录谁打出的子弹,1,2,3分别表示玩家1,玩家2,机器人} bullet[1000];struct General_wall {//棕色的大墙(可打破)(大小:60*60)int x,y;//位置} gw[50];struct White_wall {//白色的墙(不可打破)60*60int x,y;//位置} ww[50];struct Forest {//草丛60*60int x,y;//位置} ft[50];struct Water {//水块60*60int x,y;//位置} wr[50];struct samllBlocks {//小墙30*30int x,y;} sb[50];void startUI() {//初始化工作ts1= ts2 = clock();initgraph(width,height);//游戏界面大小setcaption("Tank");//设置游戏窗框标题img = newimage();}void playTank() {//绘制玩家坦克getimage(img,"D:/tank/p2tankU.gif",0,0);if(!model) {//模式1,单人t1.x=420,t1.y=550;//保存玩家坦克的初始化位置t1.direction = 1;//玩家坦克的方向putimage(420,550,img);//绘制玩家坦克} else {//双人t1.x=330,t1.y=640;//保存玩家坦克的初始化位置t2.x=510,t2.y=640;//保存玩家坦克的初始化位置t1.direction = 1;//玩家坦克的方向t2.direction = 1;//玩家坦克的方向putimage(330,640,img);//绘制玩家坦克putimage(510,640,img);//绘制玩家坦克}}void ranXY(int &x,int &y) {//随机位置,&x,&y相当于指针,直接改变调用函数时传入参数的值x = random(15)*60;y = random(11)*60+40;//40偏移,用于得分显示,不被游戏影响}int isRepeat(int x,int y) {//避免初始化物块重叠for(int i=0; i<lenT; i++) {//检测传入的(x,y)坐标是否与所有的坦克位置重复if(tank[i].x==x&&tank[i].y==y||y>550)return false;}for(int i=0; i<lenG; i++) {//检测传入的(x,y)坐标是否与所有的大棕墙位置重复if(gw[i].x==x&&gw[i].y==y)return false;}for(int i=0; i<lenW; i++) {//检测传入的(x,y)坐标是否与所有的大白墙位置重复if(ww[i].x==x&&ww[i].y==y)return false;}for(int i=0; i<lenF; i++) {//检测传入的(x,y)坐标是否与所有的草块位置重复if(ft[i].x==x&&ft[i].y==y)return false;}for(int i=0; i<lenR; i++) {//检测传入的(x,y)坐标是否与所有的水块位置重复if(wr[i].x==x&&wr[i].y==y)return false;}return true;}void produceTank() {//增加机器人坦克,用于补充坦克数量int temp = random(4) + 1;//增加的坦克个数int x, y;while (lenT < temp) {ranXY(x, y);if (isRepeat(x, y)) {//检测ranXY()产生的(x,y)坐标是否与其他物块重叠,重叠返回false//保存随机生成的坦克信息tank[lenT].x = x;tank[lenT].y = y;tank[lenT].direction = rand() % 4;tank[lenT++].preTime = 0;}}}void roadblocksXY() {//初始化所有的障碍物的数量及其位置int x,y,cnt=0,temp;//小墙块的信息int xx = 390, yy = 610;for (int i = 0; i < 3; i++) {//左边三个sb[lenS].x = xx;sb[lenS++].y = yy + 30 * i;}for (int i = 0; i < 3; i++) {//上边三个sb[lenS].x = xx + 30 * i;sb[lenS++].y = yy;}xx = 480;for (int i = 0; i < 3; i++) {//右边三个sb[lenS].x = xx;sb[lenS++].y = yy + 30 * i;}//机器人坦克temp = random(4)+3;//坦克数量while(lenT<temp) {ranXY(x,y);//产生随机位置函数if(isRepeat(x,y)) {//保存tank[lenT].x=x;tank[lenT].y=y;tank[lenT].direction = rand() % 4;//初始化方向tank[lenT++].preTime = 0;}}//草块temp = random(5)+1;//加1防止产生0个草块while(lenF<temp) {ranXY(x,y);if(isRepeat(x,y)) {//保存ft[lenF].x=x;ft[lenF++].y=y;}}//大棕墙temp = random(20)+2;while(lenG<temp) {ranXY(x,y);if(isRepeat(x,y)) {//保存gw[lenG].x=x;gw[lenG++].y=y;}}//大白墙temp = random(8)+2;while(lenW<temp) {ranXY(x,y);if(isRepeat(x,y)) {//保存ww[lenW].x=x;ww[lenW++].y=y;}}//水块temp = random(8)+1;while(lenR<temp) {ranXY(x,y);if(isRepeat(x,y)) {//保存wr[lenR].x=x;wr[lenR++].y=y;}}}void paintW() {//绘制所有的水块getimage(img,"D:/tank/water.gif",0,0);for(int i=0; i<lenR; i++) {putimage(wr[i].x,wr[i].y,img);}}void paintG() {//绘制所有的草块getimage(img,"D:/tank/grass.png",0,0);for(int i=0; i<lenF; i++) {putimage(ft[i].x,ft[i].y,img);}}void Paintcave() {//绘制大本营getimage(img, "D:/tank/star.gif", 0, 0);putimage(430, 650, img);//星星图getimage(img, "D:/tank/wallBig.gif", 0, 0);for (int i = 0; i < lenS; i++) {putimage(sb[i].x, sb[i].y, img);//小墙块}}void paintRoadblocks() {//模式一if (t1.direction == 0) {//绘制坦克1getimage(img, "D:/tank/p2tankL.gif", 0, 0);//左,不同的反向绘制的图片不一样,四张图片选择putimage(t1.x, t1.y, img);}else if (t1.direction == 1) {getimage(img, "D:/tank/p2tankU.gif", 0, 0);//上putimage(t1.x, t1.y, img);}else if (t1.direction == 2) {getimage(img, "D:/tank/p2tankR.gif", 0, 0);//右putimage(t1.x, t1.y, img);}else {getimage(img, "D:/tank/p2tankD.gif", 0, 0);//下putimage(t1.x, t1.y, img);}if (model) {//如果是模式二,就执行if语句,绘制坦克2,否则就不绘制if (t2.direction == 0) {getimage(img, "D:/tank/p2tankL.gif", 0, 0);//左putimage(t2.x, t2.y, img);}else if (t2.direction == 1) {getimage(img, "D:/tank/p2tankU.gif", 0, 0);//上putimage(t2.x, t2.y, img);}else if (t2.direction == 2) {getimage(img, "D:/tank/p2tankR.gif", 0, 0);//右putimage(t2.x, t2.y, img);}else {getimage(img, "D:/tank/p2tankD.gif", 0, 0);//下putimage(t2.x, t2.y, img);}}//机器人坦克getimage(img,"D:/tank/p1tankU.gif",0,0);for(int i=0; i<lenT; i++) {putimage(tank[i].x,tank[i].y,img);}//大白墙getimage(img,"D:/tank/steels.gif",0,0);for(int i=0; i<lenW; i++) {putimage(ww[i].x,ww[i].y,img);}//大棕墙getimage(img,"D:/tank/walls.gif",0,0);for(int i=0; i<lenG; i++) {putimage(gw[i].x,gw[i].y,img);}//以下几个物块的绘制提取成函数,是因为其他地方要单独绘制,方便使用paintW();//水块paintG();//草块Paintcave();//大本营}int crashCheck(int x,int y) {//坦克的碰撞检测if(x<0||x>width-60||y<40||y>height-60)//是否越界,跑到游戏界面外return false;for(int i=0; i<lenS; i++) {//与所有的小墙是否相撞if(sb[i].x-x>=60||x-sb[i].x>=30||sb[i].y-y>=60||y-sb[i].y>=30)continue;return false;}for(int i=0; i<lenG; i++) {//与所有的大棕墙是否相撞if(abs(gw[i].x-x)>=60||abs(gw[i].y-y)>=60)continue;return false;}for(int i=0; i<lenT; i++) {//与所有的机器人坦克是否相撞if(abs(tank[i].x-x)>=60||abs(tank[i].y-y)>=60)continue;return false;}for(int i=0; i<lenW; i++) {//与所有的大白墙是否相撞if(abs(ww[i].x-x)>=60||abs(ww[i].y-y)>=60)continue;return false;}return true;}void leftMove(myTank &t) {//玩家坦克左移if(crashCheck(t.x-5,t.y)) {//碰撞检测getimage(img,"D:/tank/back.png",0,0);putimage(t.x,t.y,img);//用黑块覆盖原来的坦克t.x-=5;paintW();getimage(img,"D:/tank/p2tankL.gif",0,0);putimage(t.x,t.y,img);//在新的位置绘制坦克paintG();}}void upMove(myTank &t) {//玩家坦克上移if(crashCheck(t.x,t.y-5)) {getimage(img,"D:/tank/back.png",0,0);putimage(t.x,t.y,img);t.y-=5;paintW();getimage(img,"D:/tank/p2tankU.gif",0,0);putimage(t.x,t.y,img);paintG();}}void downMove(myTank &t) {//玩家坦克下移if(crashCheck(t.x,t.y+5)) {getimage(img,"D:/tank/back.png",0,0);putimage(t.x,t.y,img);t.y+=5;paintW();getimage(img,"D:/tank/p2tankD.gif",0,0);putimage(t.x,t.y,img);paintG();}}void rightMove(myTank &t) {//玩家坦克右移if(crashCheck(t.x+5,t.y)) {getimage(img,"D:/tank/back.png",0,0);putimage(t.x,t.y,img);t.x+=5;paintW();getimage(img,"D:/tank/p2tankR.gif",0,0);putimage(t.x,t.y,img);paintG();}}void sExplode(const int xx,const int yy) {//小方块的爆炸效果显示int x = xx,y = yy;x-=53,y-=38;PlaySound(TEXT("D:/tank/blast.wav"), NULL, SND_FILENAME | SND_ASYNC);//爆炸音效播放getimage(img,"D:/tank/blast3.gif",0,0);//爆炸图片1putimage(x,y,img);delay_fps(300);//延时getimage(img,"D:/tank/blast4.gif",0,0);//爆炸图片2putimage(x,y,img);delay_fps(300);//延时getimage(img,"D:/tank/bback.png",0,0);//黑块覆盖爆炸图片putimage(x,y,img);paintRoadblocks();PlaySound(TEXT("D:/tank/tank.wav"), NULL, SND_FILENAME | SND_ASYNC | SND_LOOP);//继续播放背景音乐}void explode(const int xx,const int yy) {//大方块的爆炸显示int x = xx,y = yy;x-=38,y-=24;PlaySound(TEXT("D:/tank/blast.wav"), NULL, SND_FILENAME | SND_ASYNC);//爆炸音效播放getimage(img,"D:/tank/blast3.gif",0,0);//爆炸图片1putimage(x,y,img);delay_fps(300);getimage(img,"D:/tank/blast4.gif",0,0);//爆炸图片2putimage(x,y,img);delay_fps(300);getimage(img,"D:/tank/blast5.gif",0,0);//爆炸图片3putimage(x,y,img);delay_fps(300);getimage(img,"D:/tank/blast6.gif",0,0);//爆炸图片4putimage(x,y,img);delay_fps(300);getimage(img,"D:/tank/blast7.gif",0,0);//爆炸图片5putimage(x,y,img);delay_fps(300);getimage(img,"D:/tank/blast8.gif",0,0);//爆炸图片6putimage(x,y,img);delay_fps(300);getimage(img,"D:/tank/bback.png",0,0);//黑块覆盖爆炸图片putimage(x,y,img);paintRoadblocks();PlaySound(TEXT("D:/tank/tank.wav"), NULL, SND_FILENAME | SND_ASYNC | SND_LOOP);//继续播放背景音乐}void paintBullet() {//绘制子弹移动int x,y,flag,cx,cy;for(int j=0; j<lenBT; j++) {//计算移动后的位置if(bullet[j].direction==0) {x = bullet[j].x-5;y = bullet[j].y;} else if(bullet[j].direction==1) {x = bullet[j].x;y = bullet[j].y-5;} else if(bullet[j].direction==2) {x = bullet[j].x+5;y = bullet[j].y;} else {x = bullet[j].x;y = bullet[j].y+5;}flag=false;for(int i=0; i<lenS; i++) {//是否与所有的小墙相撞if(sb[i].x-x>=17||x-sb[i].x>=30||sb[i].y-y>=17||y-sb[i].y>=30)continue;cx = sb[i].x, cy = sb[i].y;//如果相撞,则从小墙结构体数组移除for(int k=i+1; k<lenS; k++)sb[k-1]=sb[k];lenS--;//相撞后,开启一个线程,调用爆炸效果播放,由于爆炸有一定的时间,如果不用线程,主函数会等待爆炸效果的执行,从而坦克失去控制thread thread1(sExplode,cx,cy);thread1.join();flag=true;break;}for(int i=0; i<lenG; i++) {//是否与所有的大棕墙相撞if(gw[i].x-x>=17||x-gw[i].x>=60||gw[i].y-y>=17||y-gw[i].y>=60)continue;cx = gw[i].x, cy = gw[i].y;//如果相撞,则从结构体数组移除for(int k=i+1; k<lenG; k++)gw[k-1]=gw[k];lenG--;//相撞后,开启一个线程,调用爆炸效果播放thread thread2(explode, cx, cy);thread2.join();flag=true;break;}for(int i=0; i<lenT; i++) {//是否与所有的机器坦克相撞if(tank[i].x-x>=17||x-tank[i].x>=60||tank[i].y-y>=17||y-tank[i].y>=60)continue;//判断是哪一个玩家击中机器人坦克if (bullet[j].w == 1) {score1 += 1;}else if(bullet[j].w == 2){score2 += 1;}//玩家1//将得分转化成数组,因为outtextxy()只能接受数组打印char c[5];c[2] = score1%10 + '0';//个位c[1] = score1%100/10 + '0';//十位c[0] = score1/100 + '0';//百位c[3] = 0;//数组结束标志getimage(img, "D:/tank/sblack.png", 0, 0);putimage(50, 10, img);outtextxy(50, 10, c);//得分输出到屏幕//玩家2c[2] = score2 % 10 + '0';c[1] = score2 % 100 / 10 + '0';c[0] = score2 / 100 + '0';c[3] = 0;getimage(img, "D:/tank/sblack.png", 0, 0);putimage(450, 10, img);outtextxy(450, 10, c);//得分输出到屏幕//如果相撞,则从结构体数组移除cx = tank[i].x, cy = tank[i].y;for(int k=i+1; k<lenT; k++)tank[k-1]=tank[k];lenT--;//相撞后,开启一个线程,调用爆炸效果播放thread thread3(explode, cx, cy);thread3.join();flag=true;break;}for(int i=0; i<lenW; i++) {//是否与所有的大白墙相撞if(ww[i].x-x>=17||x-ww[i].x>=60||ww[i].y-y>=17||y-ww[i].y>=60)continue;flag=true;break;}if(x<-17||x>=width+17||y>height+17|| y < 40)//子弹是否超出游戏边界flag=true;if(flag) {//如果flag为true,则子弹应该被销毁getimage(img, "D:/tank/sblack.png", 0, 0);putimage(bullet[j].x, bullet[j].y, img);//覆盖子弹for(int k=j+1; k<lenBT; k++)//从子弹结构体移除bullet[k-1]=bullet[k];lenBT--;j--;} else {//移向下一个位置if (!(430 - x >= 17 || x - 430 >= 40 || 650 - y >= 17 || y - 650 >= 40)) {over = true;return;}getimage(img,"D:/tank/sblack.png",0,0);//覆盖原来的子弹putimage(bullet[j].x,bullet[j].y,img);getimage(img,"D:/tank/tankmissile.gif",0,0);//绘制新的子弹putimage(x,y,img);bullet[j].x=x;//保存子弹的新位置bullet[j].y=y;// getch();}}}void produce(myTank t,int v,int w) {//产生子弹,参数分别为:哪一个坦克,方向,谁发射的子弹PlaySound(TEXT("D:/tank/blast.wav"), NULL, SND_FILENAME | SND_ASYNC);//发弹音效bullet[lenBT].w = w;//计算子弹的位置,并保存到结构体数组if(v==0) {bullet[lenBT].direction=0;bullet[lenBT].x=t.x-20;bullet[lenBT++].y=t.y+21;} else if(v==1) {bullet[lenBT].direction=1;bullet[lenBT].x=t.x+21;bullet[lenBT++].y=t.y-20;} else if(v==2) {bullet[lenBT].direction=2;bullet[lenBT].x=t.x+65;bullet[lenBT++].y=t.y+21;} else {bullet[lenBT].direction=3;bullet[lenBT].x=t.x+21;bullet[lenBT++].y=t.y+65;}delay_fps(60);PlaySound(TEXT("D:/tank/tank.wav"), NULL, SND_FILENAME | SND_ASYNC | SND_LOOP);//继续主题音乐}void keyListener() {//键盘按键的监听//每一个键盘按钮都有一个虚拟的键值,可以查表if(kbmsg()) {if(keystate(0x25)) { //leftt1.direction = 0;leftMove(t1);//左移函数td1 = Left;//修改玩家坦克的方向}if(keystate(0x26)) { //upt1.direction = 1;upMove(t1);td1 = Up;}if(keystate(0x27)) { //rightt1.direction = 2;rightMove(t1);td1 = Right;}if(keystate(0x28)) { //downt1.direction = 3;downMove(t1);td1 = Down;}if(keystate('O')) { //发弹,字符ote1 = clock();if(te1-ts1>=200)produce(t1,td1,1);ts1 = te1;}if (model) {//如果是模式二,则监听玩家二的游戏按键if (keystate('W')) {t2.direction = 0;upMove(t2);td2 = Up;}if (keystate('A')) {t2.direction = 1;leftMove(t2);td2 = Left;}if (keystate('D')) {t2.direction = 2;rightMove(t2);td2 = Right;}if (keystate('S')) {t2.direction = 3;downMove(t2);td2 = Down;}if (keystate(0x20)) { //space 空格te2 = clock();if (te2 - ts2 >= 200)produce(t2, td2,2);ts2 = te2;}}}}int machinecrashCheck(int x, int y) {//机器人运动检测碰撞if (x<0 || x>width - 60 || y<40 || y>height - 60)return false;if (!(abs(t1.x - x) >= 60 || abs(t1.y - y) >= 60))//是否与玩家1碰撞return false;if (!(abs(t2.x - x) >= 60 || abs(t2.y - y) >= 60))//是否与玩家2碰撞return false;for (int i = 0; i < lenS; i++) {//是否与所有小墙碰撞if (sb[i].x - x >= 60 || x - sb[i].x >= 30 || sb[i].y - y >= 60 || y - sb[i].y >= 30)continue;return false;}for (int i = 0; i < lenG; i++) {//是否与所有大棕墙碰撞if (abs(gw[i].x - x) >= 60 || abs(gw[i].y - y) >= 60)continue;return false;}for (int i = 0; i < lenW; i++) {//是否与所有大白墙碰撞if (abs(ww[i].x - x) >= 60 || abs(ww[i].y - y) >= 60)continue;return false;}return true;}void machineleftMove(Tank &t) {//机器人左移if (machinecrashCheck(t.x - 5, t.y)) {//位置检测,是否能够左移getimage(img, "D:/tank/back.png", 0, 0);//覆盖原来的位置putimage(t.x, t.y, img);t.x -= 5;paintW();getimage(img, "D:/tank/p1tankL.gif", 0, 0);//新位置绘制putimage(t.x, t.y, img);paintG();}}void machineupMove(Tank &t) {//机器人上移if (machinecrashCheck(t.x, t.y - 5)) {getimage(img, "D:/tank/back.png", 0, 0);putimage(t.x, t.y, img);t.y -= 5;paintW();getimage(img, "D:/tank/p1tankU.gif", 0, 0);putimage(t.x, t.y, img);paintG();}}void machinedownMove(Tank &t) {//机器人下移if (machinecrashCheck(t.x, t.y + 5)) {getimage(img, "D:/tank/back.png", 0, 0);putimage(t.x, t.y, img);t.y += 5;paintW();getimage(img, "D:/tank/p1tankD.gif", 0, 0);putimage(t.x, t.y, img);paintG();}}void machinerightMove(Tank &t) {//机器人右移if (machinecrashCheck(t.x + 5, t.y)) {getimage(img, "D:/tank/back.png", 0, 0);putimage(t.x, t.y, img);t.x += 5;paintW();getimage(img, "D:/tank/p1tankR.gif", 0, 0);putimage(t.x, t.y, img);paintG();}}void machineAttack() {//坦克移动for (int i = 0; i < lenT; i++) {clock_t now = clock();if (now - tank[i].preTime > 1000) {//定时改变方向tank[i].direction=rand()%4;//随机生成方向tank[i].preTime = now;}int d = tank[i].direction;//移动if (d == 0) {machineleftMove(tank[i]);}else if (d == 1) {machinerightMove(tank[i]);}else if (d == 2) {machineupMove(tank[i]);}else {machinedownMove(tank[i]);}}}void machineAtackBullet() {//机器人发射子弹if (lenT) {int i = rand() % lenT;//随机选取一个机器人坦克myTank mt;mt.x = tank[i].x;mt.y = tank[i].y;mt.direction = tank[i].direction;produce(mt, tank[i].direction,3);}}void select() {getimage(img, "D:/tank/startui.jpg", 0, 0);//开始界面putimage(0, 0, img);PlaySound(TEXT("D:/tank/start.wav"),NULL, SND_FILENAME | SND_ASYNC | SND_LOOP);//开始音乐delay_fps(60);mouse_msg msg;while (true) {//死循环,等待鼠标或者键盘事件if (mousemsg()) {//是否有鼠标事件msg = getmouse();//得到鼠标事件结构体//判断鼠标是否是左键,是否按下,点击位置是否在图片开始按钮的位置范围内if (msg.is_left() && msg.is_down() && msg.x >= 306 && msg.x <= 502 && msg.y >= 440 && msg.y <= 625) {break;//满足条件的话,跳出开始等待界面}}if (keystate(0x0d)){ //enter是否按下enter键break;//跳出开始等待界面}if (keystate(0x1b) ){//esc是否按下esc键over=1;//游戏结束标记return ;}}setfillcolor(EGERGB(0x0, 0x0, 0x0));bar(0, 0, width, height);//游戏界面恢复成黑色PlaySound(NULL, NULL, SND_FILENAME);//停止播放开始音乐delay_fps(60);}int main() {model = 1;startUI();//初始化界面select();//等待用户选择界面outtextxy(10, 10, "score1:");outtextxy(400, 10, "score2:");roadblocksXY();//初始化随机生成障碍物位置playTank();//绘制玩家坦克paintRoadblocks();//绘制所有的障碍物PlaySound(TEXT("D:/tank/tank.wav"), NULL, SND_FILENAME | SND_ASYNC | SND_LOOP);//播放背景音乐int mark = 0,e=50;while(true) {//死循环if (over) {//游戏是否结束PlaySound(TEXT("D:/tank/add.wav"), NULL, SND_FILENAME | SND_ASYNC);//播放结束音乐break;}keyListener();//键盘按键监听paintBullet();//子弹运动machineAttack();//机器人坦克移动if (mark>e) {//机器人开火间隔,死循环多少次发射一次子弹machineAtackBullet();mark = 0;e = rand() % 100 + 30;//随机生成死循环次数}mark++;if (lenT <= 2) {//机器人坦克的数量少于等于两个,添加机器人坦克produceTank();}delay_fps(60);//延时60fps}getimage(img, "D:/tank/over.jpg", 0, 0);//结束界面图片putimage(0, 0, img);getch();delay_fps(2000);//延时getch();closegraph();//关闭游戏界面return 0;}
图片资源地址:/download/qq_38865022/10650346