|
Vehicle
|
#include <vehicle.h>
成员变量 | |
| float | position |
| unsigned char | speed |
| unsigned char | laps |
| volatile unsigned char | gear |
| float Vehicle::position |
赛车位置:用角度表示,取值为0 ~ 360
| unsigned char Vehicle::speed |
赛车速度:当前最大速度 = 档位(gear) × 10
| unsigned char Vehicle::laps |
赛车跑过的圈数
| volatile unsigned char Vehicle::gear |
赛车档位: 共四个档 0、1、2、3