feat: 支持音频管线
This commit is contained in:
@@ -18,6 +18,7 @@ import { CommonModal } from 'db://assets/prefabs/CommonModal';
|
||||
import { ApiEnvelope, StaminaInfo, NextLevelData, SubmitShareLevel } from 'db://assets/scripts/types/ApiTypes';
|
||||
import { AchievementTitleManager } from 'db://assets/scripts/utils/AchievementTitleManager';
|
||||
import { applyRoundedCorner } from 'db://assets/scripts/utils/roundedMaterial.utils';
|
||||
import { AudioManager } from 'db://assets/scripts/utils/AudioManager';
|
||||
const { ccclass, property } = _decorator;
|
||||
|
||||
/**
|
||||
@@ -646,7 +647,11 @@ export class PageLevel extends BaseView {
|
||||
const editBox = inputNode.getComponent(EditBox);
|
||||
if (editBox) {
|
||||
editBox.placeholder = '';
|
||||
editBox.maxLength = chars.length;
|
||||
// 不限制单格 maxLength:iOS 拼音 / 日韩 IME 在选词前需要键入比目标字数更长的拼写串,
|
||||
// 例如答案"你好"(2 字)需键入"nihao"(5 字符)才能上屏;若 maxLength=2 会在第三个
|
||||
// 拼音字符就被原生键盘截断,用户连选词都做不到。最终长度限制由 distributeInputText
|
||||
// 在 EDITING_DID_ENDED 时裁剪到每格 1 字(见 applyInputTextToBlocks)。
|
||||
editBox.maxLength = -1;
|
||||
editBox.string = '';
|
||||
editBox.node.on(EditBox.EventType.EDITING_DID_BEGAN, this.onInputEditingBegan, this);
|
||||
editBox.node.on(EditBox.EventType.TEXT_CHANGED, this.onInputTextChanged, this);
|
||||
@@ -859,7 +864,7 @@ export class PageLevel extends BaseView {
|
||||
*/
|
||||
private onIconSettingClick(): void {
|
||||
console.log('[PageLevel] IconSetting 点击,返回主页');
|
||||
this.playClickSound();
|
||||
AudioManager.instance.playButtonClick();
|
||||
|
||||
// 分享模式下栈中没有 PageHome,需要清除分享状态并直接打开首页
|
||||
if (this._isShareMode) {
|
||||
@@ -2018,6 +2023,17 @@ export class PageLevel extends BaseView {
|
||||
onShare: () => {
|
||||
// 分享后不关闭弹窗,用户可继续点击下一关
|
||||
console.log('[PageLevel] 分享完成');
|
||||
},
|
||||
onHome: () => {
|
||||
this._closePassModal();
|
||||
|
||||
if (this._isShareMode) {
|
||||
ShareManager.instance.clearShareMode();
|
||||
ViewManager.instance.replace('PageHome');
|
||||
return;
|
||||
}
|
||||
|
||||
ViewManager.instance.back();
|
||||
}
|
||||
});
|
||||
// 动画消费完一次后清除起点,避免弹窗多次打开时复用
|
||||
|
||||
Reference in New Issue
Block a user