文章分类 - CocosCreator问题集 / 音频
音频相关的问题
摘要:音频可视化使用了WebAudio的功能,仅在支持WebAudio的平台有效。 import { _decorator, AudioClip, Component, instantiate, Label, lerp, Node, UITransform, v3 } from 'cc'; const {
阅读全文
摘要:背景音乐淡入淡出 && 音效不受影响 实际上和打断音效的实现差不多。需要淡入淡出的音频单独用一个AudioSource管理。 代码实现: fadeOut(){ tween(this._audioSource) .to(2,{volume:0}) .start(); } fadeIn(){ if(!t
阅读全文
摘要:音频管理 Cocos Creator 3.x 使用 AudioSource 控制音频的播放。AudioSource 是组件,可以添加到场景中,由 编辑器 设置,也可以在 脚本 中进行调用。 这里就演示如何在脚本中创建音频管理模块。 创建一个空项目 创建音频管理脚本AudioMgr 把AudioMgr
阅读全文
浙公网安备 33010602011771号