Added functionality to hide the doAsk prompt on a stopAll call with tests

This commit is contained in:
Brian Pilati 2014-03-08 09:41:01 -07:00
parent 1beed456cc
commit 6f54f52f3c
7 changed files with 218 additions and 10 deletions

View file

@ -88,19 +88,14 @@ Runtime.prototype.stopAll = function() {
interp.activeThread = new Thread(null);
interp.threads = [];
stopAllSounds();
// Hide reporters
// Hide sprite bubbles, resetFilters and doAsk prompts
for (var s = 0; s < runtime.sprites.length; s++) {
if (runtime.sprites[s].hideBubble) {
runtime.sprites[s].hideBubble();
}
if (runtime.sprites[s].hideBubble) runtime.sprites[s].hideBubble();
if (runtime.sprites[s].resetFilters) runtime.sprites[s].resetFilters();
if (runtime.sprites[s].hideAsk) runtime.sprites[s].hideAsk();
}
// Reset graphic effects
runtime.stage.resetFilters();
for (var s = 0; s < runtime.sprites.length; s++) {
if (runtime.sprites[s].resetFilters) {
runtime.sprites[s].resetFilters();
}
}
};
// Step method for execution - called every 33 milliseconds