1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24
| void drawGame() { BeginBatchDraw(); putimage(0, 0, &img[0]); putimage(myPlane.planePos.x - PLANE_SIZE / 3, myPlane.planePos.y - PLANE_SIZE / 3, &img[2],SRCAND);
for (int i = 0; i < enemyPlaneLen; i++) { putimage(enemyPlanes[i].planePos.x - PLANE_SIZE/3, enemyPlanes[i].planePos.y - PLANE_SIZE/3, &img[1], SRCAND); }
for(int i = 0;i< myPlane.bulletLen;i++) { solidcircle(myPlane.planeBullets[i].x, myPlane.planeBullets[i].y, PLANE_SIZE / 4);; }
RECT rect = {0,PLANE_SIZE,SCREEN_WIDTH,SCREEN_HEIGHT }; setbkmode(TRANSPARENT); char str[30] = { 0 }; sprintf_s(str, "分数:%d", score); drawtext(str, &rect, DT_TOP | DT_CENTER); EndBatchDraw();
}
|