mirror of
https://github.com/JulianGro/overte.git
synced 2025-04-09 15:33:02 +02:00
remove unecessary injector stops
This commit is contained in:
parent
05b7cd819e
commit
e3c4ead323
4 changed files with 3 additions and 21 deletions
|
@ -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();
|
||||
}
|
||||
});
|
|
@ -76,9 +76,6 @@ function scriptEnding() {
|
|||
if (entity != null) {
|
||||
Entities.deleteEntity(entity);
|
||||
}
|
||||
if (injector != null) {
|
||||
injector.stop();
|
||||
}
|
||||
}
|
||||
|
||||
Script.update.connect(update);
|
||||
|
|
|
@ -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);
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue