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; }
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; }
转载于:https://www.cnblogs.com/kkkky/p/6524362.html