mirror of
https://github.com/scratchfoundation/scratch-vm.git
synced 2025-07-29 23:49:21 -04:00
Clear answer on green flag
This commit is contained in:
parent
0722708004
commit
eede8105d1
2 changed files with 15 additions and 0 deletions
src/engine
|
@ -317,6 +317,15 @@ class Runtime extends EventEmitter {
|
|||
return 'BLOCK_GLOW_OFF';
|
||||
}
|
||||
|
||||
/**
|
||||
* Event name when the project is started (threads may not necessarily be
|
||||
* running).
|
||||
* @const {string}
|
||||
*/
|
||||
static get PROJECT_START () {
|
||||
return 'PROJECT_START';
|
||||
}
|
||||
|
||||
/**
|
||||
* Event name when threads start running.
|
||||
* Used by the UI to indicate running status.
|
||||
|
@ -1057,6 +1066,7 @@ class Runtime extends EventEmitter {
|
|||
*/
|
||||
greenFlag () {
|
||||
this.stopAll();
|
||||
this.emit(Runtime.PROJECT_START);
|
||||
this.ioDevices.clock.resetProjectTimer();
|
||||
this.clearEdgeActivatedValues();
|
||||
// Inform all targets of the green flag.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue