test avoid bulled game
Dependencies: C12832_lcd LCD_fonts mbed mbed-rtos
Diff: main.cpp
- Revision:
- 54:64c0bdcc94ae
- Parent:
- 49:726ebd187f75
- Child:
- 55:e4e2274e5ec0
--- a/main.cpp Tue Dec 13 14:31:22 2016 +0000 +++ b/main.cpp Wed Dec 14 02:17:49 2016 +0000 @@ -86,6 +86,7 @@ } bool bullet_collision(point p_person, point p_bullet){ + //彈当たり判定 double person_center_x = p_person.x + PERSON_SIZE / 2; double person_center_y = p_person.y + PERSON_SIZE / 2; @@ -102,6 +103,7 @@ } bool wall_collision(point p_person){ + //壁衝突判定と穴落ち判定 int x = p_person.x + 5; int y = p_person.y + 6; if(wall_height[x - 1] > (LCD_Y - y)){