mirror of
https://github.com/scratchfoundation/scratch-vm.git
synced 2024-12-24 06:52:40 -05:00
Fixing comments to reflect original code.
This commit is contained in:
parent
73fc5b8723
commit
12233b73dd
1 changed files with 2 additions and 6 deletions
|
@ -497,9 +497,7 @@ class BoostMotor {
|
||||||
* @param {boolean} [resetState=true] - whether to reset the state of the motor when running this command.
|
* @param {boolean} [resetState=true] - whether to reset the state of the motor when running this command.
|
||||||
*/
|
*/
|
||||||
turnOnForever (resetState = true){
|
turnOnForever (resetState = true){
|
||||||
/* if (this.power === 0) {
|
// if (this.power === 0) return;
|
||||||
this.turnOff(false);
|
|
||||||
} */
|
|
||||||
|
|
||||||
if (resetState) this.status = BoostMotorState.ON_FOREVER;
|
if (resetState) this.status = BoostMotorState.ON_FOREVER;
|
||||||
this._turnOn();
|
this._turnOn();
|
||||||
|
@ -511,9 +509,7 @@ class BoostMotor {
|
||||||
* @param {boolean} [resetState=true] - whether to reset the state of the motor when running this command.
|
* @param {boolean} [resetState=true] - whether to reset the state of the motor when running this command.
|
||||||
*/
|
*/
|
||||||
turnOnFor (milliseconds, resetState = true) {
|
turnOnFor (milliseconds, resetState = true) {
|
||||||
/* if (this.power === 0) {
|
// if (this.power === 0) return;
|
||||||
this.turnOff(false);
|
|
||||||
} */
|
|
||||||
|
|
||||||
milliseconds = Math.max(0, milliseconds);
|
milliseconds = Math.max(0, milliseconds);
|
||||||
if (resetState) this.status = BoostMotorState.ON_FOR_TIME;
|
if (resetState) this.status = BoostMotorState.ON_FOR_TIME;
|
||||||
|
|
Loading…
Reference in a new issue