mirror of
https://github.com/4ian/GDevelop.git
synced 2025-10-15 10:19:04 +00:00
Compare commits
1 Commits
ai-ux-impr
...
feature/em
Author | SHA1 | Date | |
---|---|---|---|
![]() |
d87259a2aa |
@@ -663,8 +663,9 @@ void ExporterHelper::AddLibsInclude(bool pixiRenderers,
|
||||
"pixi-renderers/spriteruntimeobject-pixi-renderer.js");
|
||||
InsertUnique(includesFiles,
|
||||
"pixi-renderers/loadingscreen-pixi-renderer.js");
|
||||
InsertUnique(includesFiles, "howler-sound-manager/howler.min.js");
|
||||
InsertUnique(includesFiles, "howler-sound-manager/howler-sound-manager.js");
|
||||
InsertUnique(includesFiles, "empty-sound-manager/empty-sound-manager.js");
|
||||
// InsertUnique(includesFiles, "howler-sound-manager/howler.min.js");
|
||||
// InsertUnique(includesFiles, "howler-sound-manager/howler-sound-manager.js");
|
||||
InsertUnique(includesFiles,
|
||||
"fontfaceobserver-font-manager/fontfaceobserver.js");
|
||||
InsertUnique(
|
||||
|
87
GDJS/Runtime/empty-sound-manager/empty-sound-manager.js
Normal file
87
GDJS/Runtime/empty-sound-manager/empty-sound-manager.js
Normal file
@@ -0,0 +1,87 @@
|
||||
// @ts-check
|
||||
/*
|
||||
* GDevelop JS Platform
|
||||
* Copyright 2013-present Florian Rival (Florian.Rival@gmail.com). All rights reserved.
|
||||
* This project is released under the MIT License.
|
||||
*/
|
||||
|
||||
/**
|
||||
* EmptySoundManager does not play any sound or music.
|
||||
*
|
||||
* @memberof gdjs
|
||||
* @class EmptySoundManager
|
||||
*/
|
||||
gdjs.EmptySoundManager = function (resources) {
|
||||
this._globalVolume = 100;
|
||||
this._resources = resources;
|
||||
};
|
||||
|
||||
gdjs.SoundManager = gdjs.EmptySoundManager; //Register the class to let the engine use it.
|
||||
|
||||
/**
|
||||
* Update the resources data of the game. Useful for hot-reloading, should not be used otherwise.
|
||||
*
|
||||
* @param {ResourceData[]} resources The resources data of the game.
|
||||
*/
|
||||
gdjs.EmptySoundManager.prototype.setResources = function (resources) {
|
||||
this._resources = resources;
|
||||
};
|
||||
|
||||
gdjs.EmptySoundManager.prototype.playSound = function (
|
||||
soundName,
|
||||
loop,
|
||||
volume,
|
||||
pitch
|
||||
) {};
|
||||
|
||||
gdjs.EmptySoundManager.prototype.playSoundOnChannel = function (
|
||||
soundName,
|
||||
channel,
|
||||
loop,
|
||||
volume,
|
||||
pitch
|
||||
) {
|
||||
return null;
|
||||
};
|
||||
|
||||
gdjs.EmptySoundManager.prototype.getSoundOnChannel = function (channel) {
|
||||
return null;
|
||||
};
|
||||
|
||||
gdjs.EmptySoundManager.prototype.playMusic = function (
|
||||
soundName,
|
||||
loop,
|
||||
volume,
|
||||
pitch
|
||||
) {};
|
||||
|
||||
gdjs.EmptySoundManager.prototype.playMusicOnChannel = function (
|
||||
soundName,
|
||||
channel,
|
||||
loop,
|
||||
volume,
|
||||
pitch
|
||||
) {};
|
||||
|
||||
gdjs.EmptySoundManager.prototype.getMusicOnChannel = function (channel) {
|
||||
return null;
|
||||
};
|
||||
|
||||
gdjs.EmptySoundManager.prototype.setGlobalVolume = function (volume) {
|
||||
this._globalVolume = volume;
|
||||
if (this._globalVolume > 100) this._globalVolume = 100;
|
||||
if (this._globalVolume < 0) this._globalVolume = 0;
|
||||
};
|
||||
|
||||
gdjs.EmptySoundManager.prototype.getGlobalVolume = function () {
|
||||
return this._globalVolume;
|
||||
};
|
||||
|
||||
gdjs.EmptySoundManager.prototype.clearAll = function () {};
|
||||
|
||||
gdjs.EmptySoundManager.prototype.preloadAudio = function (
|
||||
onProgress,
|
||||
onComplete
|
||||
) {
|
||||
onComplete(this._resources.length);
|
||||
};
|
@@ -94,6 +94,7 @@ const getAllDevelopmentWatchPaths = (): Promise<DevelopmentWatchPaths> => {
|
||||
'events-tools',
|
||||
'fontfaceobserver-font-manager',
|
||||
'howler-sound-manager',
|
||||
'empty-sound-manager',
|
||||
'libs',
|
||||
'pixi-renderers',
|
||||
'websocket-debugger-client',
|
||||
|
Reference in New Issue
Block a user