Skip to content
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion packages/webgal/src/Core/gameScripts/playEffect.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import { IPerform } from '@/Core/Modules/perform/performInterface';
import { useSelector } from 'react-redux';
import { WebGAL } from '@/Core/WebGAL';
import { WEBGAL_NONE } from '@/Core/constants';
import { uniqueId } from 'lodash';

/**
* 播放一段效果音
Expand All @@ -15,7 +16,7 @@ export const playEffect = (sentence: ISentence): IPerform => {
logger.debug('play SE');
// 如果有ID,这里被覆写,一般用于循环的情况
// 有循环参数且有 ID,就循环
let performInitName = 'effect-sound';
let performInitName = `effect-sound-${uniqueId()}`;
Comment thread
xiaoxustudio marked this conversation as resolved.
// 清除先前的效果音
WebGAL.gameplay.performController.unmountPerform(performInitName, true);
let url = sentence.content;
Expand Down