mirror of
https://github.com/scratchfoundation/scratch-vm.git
synced 2024-12-24 06:52:40 -05:00
Update public getters to new variable names.
This commit is contained in:
parent
9ae2c4b1f1
commit
0256fff8ce
1 changed files with 8 additions and 8 deletions
|
@ -439,35 +439,35 @@ class BoostMotor {
|
||||||
/**
|
/**
|
||||||
* @return {number} - time, in milliseconds, of when the pending duration timeout began.
|
* @return {number} - time, in milliseconds, of when the pending duration timeout began.
|
||||||
*/
|
*/
|
||||||
get pendingTimeoutStartTime () {
|
get pendingDurationTimeoutStartTime () {
|
||||||
return this._pendingDurationTimeoutStartTime;
|
return this._pendingDurationTimeoutStartTime;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @return {number} - delay, in milliseconds, of the pending duration timeout.
|
* @return {number} - delay, in milliseconds, of the pending duration timeout.
|
||||||
*/
|
*/
|
||||||
get pendingTimeoutDelay () {
|
get pendingDurationTimeoutDelay () {
|
||||||
return this._pendingDurationTimeoutDelay;
|
return this._pendingDurationTimeoutDelay;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @return {number} - delay, in milliseconds, of the pending duration timeout.
|
* @return {number} - delay, in milliseconds, of the pending duration timeout.
|
||||||
*/
|
*/
|
||||||
get pendingPositionDestination () {
|
get pendingRotationDestination () {
|
||||||
return this._pendingRotationDestination;
|
return this._pendingRotationDestination;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @return {boolean} - true if this motor is currently moving, false if this motor is off or braking.
|
* @return {boolean} - true if this motor is currently moving, false if this motor is off or braking.
|
||||||
*/
|
*/
|
||||||
get pendingPromiseFunction () {
|
get pendingRotationPromise () {
|
||||||
return this._pendingRotationPromise;
|
return this._pendingRotationPromise;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param {function} func - function to resolve promise
|
* @param {function} func - function to resolve promise
|
||||||
*/
|
*/
|
||||||
set pendingPromiseFunction (func) {
|
set pendingRotationPromise (func) {
|
||||||
this._pendingRotationPromise = func;
|
this._pendingRotationPromise = func;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1669,7 +1669,7 @@ class Scratch3BoostBlocks {
|
||||||
if (motor.power === 0) return Promise.resolve();
|
if (motor.power === 0) return Promise.resolve();
|
||||||
return new Promise(resolve => {
|
return new Promise(resolve => {
|
||||||
motor.turnOnForDegrees(degrees, sign);
|
motor.turnOnForDegrees(degrees, sign);
|
||||||
motor.pendingPromiseFunction = resolve;
|
motor.pendingRotationPromise = resolve;
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
return null;
|
return null;
|
||||||
|
@ -1739,7 +1739,7 @@ class Scratch3BoostBlocks {
|
||||||
motor.turnOnForever();
|
motor.turnOnForever();
|
||||||
break;
|
break;
|
||||||
case BoostMotorState.ON_FOR_TIME:
|
case BoostMotorState.ON_FOR_TIME:
|
||||||
motor.turnOnFor(motor.pendingTimeoutStartTime + motor.pendingTimeoutDelay - Date.now());
|
motor.turnOnFor(motor.pendingDurationTimeoutStartTime + motor.pendingDurationTimeoutDelay - Date.now());
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1785,7 +1785,7 @@ class Scratch3BoostBlocks {
|
||||||
motor.turnOnForever();
|
motor.turnOnForever();
|
||||||
break;
|
break;
|
||||||
case BoostMotorState.ON_FOR_TIME:
|
case BoostMotorState.ON_FOR_TIME:
|
||||||
motor.turnOnFor(motor.pendingTimeoutStartTime + motor.pendingTimeoutDelay - Date.now());
|
motor.turnOnFor(motor.pendingDurationTimeoutStartTime + motor.pendingDurationTimeoutDelay - Date.now());
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue