const int SPEED_COUNT = 10; void setSpeed(float speed) { for(int i = SPEED_COUNT - 1;i>0;i--) { this.mSpeed[i] = this.mSpeed[i - 1]; } this.mSpeed[0] = speed; }
时间: 2024-12-02 00:00:23
const int SPEED_COUNT = 10; void setSpeed(float speed) { for(int i = SPEED_COUNT - 1;i>0;i--) { this.mSpeed[i] = this.mSpeed[i - 1]; } this.mSpeed[0] = speed; }