08 SFX
In this chapter, we will add SFX to note hit segment.
Declaring
As before, declare the effect clip to be used:
TypeScript
export const effect = defineEffect({
clips: {
perfect: EffectClipName.Perfect,
},
})
JavaScript
export const effect = defineEffect({
clips: {
perfect: EffectClipName.Perfect,
},
})
Hit Segment
Let's add the SFX to hit segment:
TypeScript
export const noteHit = {
enter() {
effect.clips.perfect.play(0)
},
}
JavaScript
export const noteHit = {
enter() {
effect.clips.perfect.play(0)
},
}