Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Revision 3:4bc4e762a906, committed 2021-05-04
- Comitter:
- an_xuanyu
- Date:
- Tue May 04 14:18:28 2021 +0000
- Parent:
- 2:ce24c50fc0a6
- Commit message:
- anxuanyu;
Changed in this revision
main1.cpp | Show annotated file Show diff for this revision Revisions of this file |
--- a/main1.cpp Tue May 04 09:02:33 2021 +0000 +++ b/main1.cpp Tue May 04 14:18:28 2021 +0000 @@ -270,6 +270,7 @@ int k; int l; int n; //炮弹刷新计数 + int o; int shoot;//开火计数 int t[tank_num][2]; //坦克坐标 int t_pre[tank_num][2]; //坦克预测坐标(npc) @@ -278,7 +279,7 @@ int bullet_direct[tank_num][3];//炮弹的方向 int bullet_val[tank_num][3];//炮弹是否被阻挡 int tank_state[tank_num]; //坦克的f方向 - int hp_set[tank_num]= {3,1,1,1}; //坦克血量预设 + int hp_set[tank_num]= {3,2,2,2}; //坦克血量预设 int hp[tank_num]= {0,0,0,0}; //坦克血量 int tank_count;//坦克单位的计数 int trace[tank_num-1][3]= {{0,0,0},{0,0,0},{0,0,0}}; @@ -292,6 +293,10 @@ map_adj[t_start[k][0]][t_start[k][1]]=k+3; for (l=0; l<bullet_v; l++) { bullet_val[k][l]=0; + bullet_direct[k][l]=0; + for(o=0;o<2;o++){ + b[k][l][o]=0; + } } for (ii=0; ii<2; ii++) { t[k][ii]=t_start[k][ii];