feat: 优化分享模式通关判定逻辑
This commit is contained in:
@@ -213,10 +213,8 @@ export class PassModal extends BaseModal {
|
||||
return;
|
||||
}
|
||||
|
||||
const audioSource = this.node.getComponent(AudioSource);
|
||||
if (audioSource) {
|
||||
audioSource.playOneShot(this.successAudio);
|
||||
}
|
||||
const audioSource = this.node.getComponent(AudioSource) ?? this.node.addComponent(AudioSource);
|
||||
audioSource.playOneShot(this.successAudio);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user