資源簡介
c語言打飛機小游戲(含存檔功能)
代碼片段和文件信息
#include?
#include?
#include?
#include?
#include?
#define?HIGH?22???//邊界
#define?WIDTH?30
#define?ENEMY_MAX?5
int?air[HIGH][WIDTH]={0};//圖
int?enemy_x[ENEMY_MAX]enemy_y[ENEMY_MAX];//敵機增加
int?air_xair_y;//飛機
int?bullet_xbullet_y;//子彈位置
int?score;//得分
int?boos_xboos_y;//暫未實現(xiàn)
int?on_file;//是否讀寫存檔
int?line_file;//在線存檔
bool?Bool_on_file_input_and_without();
void?Init_on_file();
void?Init();
void?Show();
void?Updatewithoutinput();
void?Updatewithinput();
void?gotoxy(int?int?);
int?main?()?{
Init_on_file();
Init();
while(1){
Show();
Updatewithoutinput();
Updatewithinput();
}
return?0;
}
bool?Bool_on_file_input_and_without(){
if(on_file==1){
return?true;
}
else?if(on_file==2){
return?false;
?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----
?????目錄???????????0??2018-10-25?17:53??飛機2存檔系列\(zhòng)
?????目錄???????????0??2018-10-25?17:58??飛機2存檔系列\(zhòng)Debug\
?????文件?????????107??2018-10-25?17:59??飛機2存檔系列\(zhòng)Debug\jilu.txt
?????文件??????132096??2018-10-25?17:53??飛機2存檔系列\(zhòng)Debug\vc60.idb
?????文件???????77824??2018-10-25?17:53??飛機2存檔系列\(zhòng)Debug\vc60.pdb
?????文件??????192588??2018-10-25?17:53??飛機2存檔系列\(zhòng)Debug\飛機2存檔系列.exe
?????文件??????266416??2018-10-25?17:53??飛機2存檔系列\(zhòng)Debug\飛機2存檔系列.ilk
?????文件???????25372??2018-10-25?17:53??飛機2存檔系列\(zhòng)Debug\飛機2存檔系列.obj
?????文件?????3562456??2018-10-24?21:14??飛機2存檔系列\(zhòng)Debug\飛機2存檔系列.pch
?????文件??????558080??2018-10-25?17:53??飛機2存檔系列\(zhòng)Debug\飛機2存檔系列.pdb
?????文件??????????38??2018-11-01?22:38??飛機2存檔系列\(zhòng)飛機2存檔1.txt
?????文件????????5681??2018-10-25?17:53??飛機2存檔系列\(zhòng)飛機2存檔系列.cpp
?????文件????????3487??2018-10-25?17:41??飛機2存檔系列\(zhòng)飛機2存檔系列.dsp
?????文件?????????551??2018-10-25?17:52??飛機2存檔系列\(zhòng)飛機2存檔系列.dsw
?????文件???????41984??2018-10-25?17:53??飛機2存檔系列\(zhòng)飛機2存檔系列.ncb
?????文件???????48640??2018-10-25?17:53??飛機2存檔系列\(zhòng)飛機2存檔系列.opt
?????文件????????1193??2018-10-25?17:53??飛機2存檔系列\(zhòng)飛機2存檔系列.plg
評論
共有 條評論