当前位置:网站首页>[oops framework] audio management
[oops framework] audio management
2022-07-21 22:47:00 【dgflash_ game】
Functional specifications
OopsFramework- The audio management module mainly deals with the game background music 、 There are two main functions of game sound .
Demo program
Instructions
Play background music
oops.audio.playMusic("audios/nocturne");
notes : After calling this method , The background will download music resources asynchronously , When finished, start playing music
Background music playback completion callback settings
oops.audio.setMusicComplete(() => {
console.log(" Music playback is complete ");
});
Get or set the background music volume
oops.audio.musicVolume = 0.5;
notes : Volume range (0 ~ 1)
Background music switch
oops.audio.switchMusic = false;
Get or set the music playback progress
oops.audio.progressMusic = 0.5;
notes : Volume progress (0 ~ 1)
Play sound effects
oops.audio.playEffect("audios/Gravel");
notes : After calling this method , The background will download music resources asynchronously , When finished, start playing music
Get or set the sound volume
oops.audio.volumeEffect = 0.5;
notes : Volume range (0 ~ 1)
Sound effect music switch
oops.audio.switchEffect = false;
Resume all paused music playback
oops.audio.resumeAll();
Pause the current music and sound effects
oops.audio.pauseAll();
Stop playing the current music and sound effects
oops.audio.stopAll();
Stop playing the current music and sound effects
oops.audio.stopAll();
Save the volume of the music sound 、 Switch configuration data to local
oops.audio.save();
Load the volume of music sound locally 、 Switch configuration data and set it into the game
oops.audio.load();
边栏推荐
- 006: floating point data type storage space size
- Programmation créative / groupe primaire (4e - 6e année) - graphisme créatif
- Chat about matter protocol (original chip protocol)
- Probability theory - variance and covariance, correlation coefficient
- CocosCreator 3.x 环境搭建
- 567. 字符串的排列
- ACM training problem solution set record
- AtCoder Beginner Contest 218 题解
- Take stones
- Unity 使用 bvh 驱动骨骼动作
猜你喜欢
随机推荐
567. Arrangement of strings
Atcoder beginer contest 218 problem solution
关于Hololens2上AssetBundle资源管理、热更新问题(个人Hololens2进阶开发小总结三)
2020 popularization group summary
Combinatorial summary
Open source cocos creator 3 X game framework oops framework
Quick sort
14. 最长公共前缀
2021普及组总结
P2814 家谱(字符串并查集)
tmux学习记录
11th week ACM training report
14. Longest common prefix
Analysis of the characteristics of matter protocol (I) support non matter protocol, private protocol, and technical analysis of matter Bridge
Characteristics and differences between PCB and integrated circuit
創意編程/小學組(4-6年級)-圖形化創意
一个好用的Unity Touch管理器
9th week ACM training report
第十一周ACM训练报告
STL初步了解