remove unecessary injector stops

This commit is contained in:
Stephen Birarda 2015-02-11 16:23:57 -08:00
parent 05b7cd819e
commit e3c4ead323
4 changed files with 3 additions and 21 deletions

View file

@ -32,10 +32,4 @@ Script.update.connect(function() {
injector = Audio.playSound(sound, audioOptions);
print("Playing: " + injector);
}
});
Script.scriptEnding.connect(function() {
if (injector !== null) {
injector.stop();
}
});

View file

@ -76,9 +76,6 @@ function scriptEnding() {
if (entity != null) {
Entities.deleteEntity(entity);
}
if (injector != null) {
injector.stop();
}
}
Script.update.connect(update);

View file

@ -30,13 +30,6 @@ function update(deltaTime) {
}
}
function scriptEnding() {
if (soundPlaying.isPlaying) {
Audio.stopInjector(soundPlaying);
print("Stopped sound loop");
}
}
Script.update.connect(update);
Script.scriptEnding.connect(scriptEnding);

View file

@ -45,11 +45,9 @@ function maybePlaySound(deltaTime) {
}
function scriptEnding() {
if (soundPlaying.isPlaying) {
soundPlaying.stop();
Entities.deleteEntity(ball);
print("Stopped sound.");
}
if (ball) {
Entities.deleteEntity(ball);
}
}
// Connect a call back that happens every frame