mirror of
https://github.com/scratchfoundation/scratch-vm.git
synced 2024-12-23 14:32:59 -05:00
Makes setMotorPower() and setMotorDirection() yield for a tick
This commit is contained in:
parent
66ff92433e
commit
6611abec9e
1 changed files with 4 additions and 0 deletions
|
@ -1722,6 +1722,7 @@ class Scratch3BoostBlocks {
|
|||
* @param {object} args - the block's arguments.
|
||||
* @property {MotorID} MOTOR_ID - the motor(s) to be affected.
|
||||
* @property {int} POWER - the new power level for the motor(s).
|
||||
* @return {Promise} - returns a promise to make sure the block yields.
|
||||
*/
|
||||
setMotorPower (args) {
|
||||
// TODO: cast args.MOTOR_ID?
|
||||
|
@ -1741,6 +1742,7 @@ class Scratch3BoostBlocks {
|
|||
}
|
||||
}
|
||||
});
|
||||
return Promise.resolve();
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -1749,6 +1751,7 @@ class Scratch3BoostBlocks {
|
|||
* @param {object} args - the block's arguments.
|
||||
* @property {MotorID} MOTOR_ID - the motor(s) to be affected.
|
||||
* @property {MotorDirection} MOTOR_DIRECTION - the new direction for the motor(s).
|
||||
* @return {Promise} - returns a promise to make sure the block yields.
|
||||
*/
|
||||
setMotorDirection (args) {
|
||||
// TODO: cast args.MOTOR_ID?
|
||||
|
@ -1782,6 +1785,7 @@ class Scratch3BoostBlocks {
|
|||
}
|
||||
}
|
||||
});
|
||||
return Promise.resolve();
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in a new issue