Last active
December 16, 2016 04:59
-
-
Save cozza13/f386a931e5f89c06cbefb08706fd7997 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(function() { | |
var _this = this; | |
var sound = SoundCache.getSound("https://s3.amazonaws.com/converter.tipodean.com/sounds/Aran_Music_Mix-ambiX.wav"); | |
// this is the version of injector that is visible to your leaveEntity() method | |
var injector; | |
_this.enterEntity = function(entityID) { | |
print('I am insiude'); | |
injector = Audio.playSound(sound, { loop: true, volume: 0.6 }); | |
injector.restart(); | |
}; | |
_this.leaveEntity = function(entityID) { | |
print('I am outsidee'); | |
injector.stop(); | |
print("Reverb is OFF."); | |
}; | |
}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment