SceneSound.js 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. require('Polycode/Entity')
  2. function SceneSound(fileName,referenceDistance,maxDistance,directionalSound) {
  3. if(arguments[0] != "__skip_ptr__") {
  4. this.__ptr = Polycode.SceneSound(fileName,referenceDistance,maxDistance,directionalSound)
  5. }
  6. }
  7. SceneSound.prototype = Object.create(Entity.prototype)
  8. SceneSound.prototype.Update = function() {
  9. Polycode.SceneSound_Update(this.__ptr)
  10. }
  11. SceneSound.prototype.Clone = function(deepClone,ignoreEditorOnly) {
  12. var retVal = new Entity()
  13. retVal.__ptr = Polycode.SceneSound_Clone(this.__ptr, deepClone, ignoreEditorOnly)
  14. return retVal
  15. }
  16. SceneSound.prototype.applyClone = function(clone,deepClone,ignoreEditorOnly) {
  17. Polycode.SceneSound_applyClone(this.__ptr, clone.__ptr, deepClone, ignoreEditorOnly)
  18. }
  19. SceneSound.prototype.isDirectionalSound = function() {
  20. return Polycode.SceneSound_isDirectionalSound(this.__ptr)
  21. }
  22. SceneSound.prototype.setDirectionalSound = function(val) {
  23. Polycode.SceneSound_setDirectionalSound(this.__ptr, val)
  24. }
  25. SceneSound.prototype.getSound = function() {
  26. var retVal = new Sound()
  27. retVal.__ptr = Polycode.SceneSound_getSound(this.__ptr)
  28. return retVal
  29. }
  30. SceneSound.prototype.setLoopOnLoad = function(val) {
  31. Polycode.SceneSound_setLoopOnLoad(this.__ptr, val)
  32. }
  33. SceneSound.prototype.getLoopOnLoad = function() {
  34. return Polycode.SceneSound_getLoopOnLoad(this.__ptr)
  35. }