woso_javan 3 hónapja
szülő
commit
c6e1a3844d

+ 2 - 0
assets/module_extra/ui_setting/UI_Setting_Impl.ts

@@ -5,6 +5,7 @@ import { tgxModuleContext } from "../../core_tgx/tgx";
 import { GameUILayers } from "../../scripts/GameUILayers";
 import { UI_Setting } from "../../scripts/UIDef";
 import { Layout_Setting } from "./Layout_Setting";
+import { TakeGobletAudioMgr } from "../../module_take_goblet/Script/Manager/TakeGobletAudioMgr";
 
 export class UI_Setting_Impl extends UI_Setting {
     constructor() {
@@ -18,6 +19,7 @@ export class UI_Setting_Impl extends UI_Setting {
     protected onCreated(): void {
         let layout = this.layout as Layout_Setting;
         this.onButtonEvent(layout.btnClose, () => {
+            TakeGobletAudioMgr.playOneShot(TakeGobletAudioMgr.getMusicIdName(2), 1.0);
             this.hide();
         });
 

+ 2 - 2
assets/module_take_goblet/RoosterTakeGoblet.ts

@@ -41,13 +41,13 @@ export class RoosterTakeGoblet extends Component {
     }
 
     private async onClickRefresh(): Promise<void> {
-        TakeGobletAudioMgr.playOneShot(TakeGobletAudioMgr.getMusicIdName(3), 1.0);
+        TakeGobletAudioMgr.playOneShot(TakeGobletAudioMgr.getMusicIdName(2), 1.0);
         Tween.stopAll();
         EventDispatcher.instance.emit(GameEvent.EVENT_BATTLE_FAIL_LEVEL_RESET);
     }
 
     private onClickSet(): void {
-        TakeGobletAudioMgr.playOneShot(TakeGobletAudioMgr.getMusicIdName(3), 1.0);
+        TakeGobletAudioMgr.playOneShot(TakeGobletAudioMgr.getMusicIdName(2), 1.0);
         const show = tgxUIMgr.inst.isShowing(UI_Setting);
         if (!show) {
             tgxUIMgr.inst.showUI(UI_Setting);

+ 2 - 1
assets/module_take_goblet/Script/Component/ButtonComponent.ts

@@ -5,6 +5,7 @@ import { GlobalConfig } from 'db://assets/start/Config/GlobalConfig';
 import { AdvertMgr } from 'db://assets/core_tgx/base/ad/AdvertMgr';
 import { TYPE_ITEM } from '../TakeGobletGlobalInstance';
 import { tgxUIAlert } from 'db://assets/core_tgx/tgx';
+import { TakeGobletAudioMgr } from '../Manager/TakeGobletAudioMgr';
 const { ccclass, property } = _decorator;
 
 /**
@@ -27,7 +28,7 @@ export class ButtonComponent extends Component {
     }
 
     private onClickHandler(type: TYPE_ITEM): void {
-        // CarUnscrewAudioMgr.playOneShot(CarUnscrewAudioMgr.getMusicIdName(3), 1.0);
+        TakeGobletAudioMgr.playOneShot(TakeGobletAudioMgr.getMusicIdName(2), 1.0);
         let alerType = '';
         switch (type) {
             case TYPE_ITEM.FillUp:

+ 2 - 0
assets/module_take_goblet/Script/Component/CocktailCup.ts

@@ -5,6 +5,7 @@ import { EventDispatcher } from 'db://assets/core_tgx/easy_ui_framework/EventDis
 import { GameEvent } from '../Enum/GameEvent';
 import { OutArea } from './OutArea';
 import { GameUtil } from '../GameUtil';
+import { TakeGobletAudioMgr } from '../Manager/TakeGobletAudioMgr';
 const { ccclass, property, executeInEditMode } = _decorator;
 
 //调酒杯状态 默认 接水
@@ -65,6 +66,7 @@ export class CocktailCup extends Component {
 
     //补满水
     public async fillUp() {
+        TakeGobletAudioMgr.playOneShot(TakeGobletAudioMgr.getMusicIdName(5), 1.0);
         this.playAnimationByState(CocktailCupState.Full);
         await GameUtil.delay(0.5);
 

+ 4 - 0
assets/module_take_goblet/Script/Component/OriginCup.ts

@@ -8,6 +8,7 @@ import { OriginArea } from './OriginArea';
 import { LevelManager } from '../Manager/LevelMgr';
 import { tgxUITips } from 'db://assets/core_tgx/tgx';
 import { GameUtil } from '../GameUtil';
+import { TakeGobletAudioMgr } from '../Manager/TakeGobletAudioMgr';
 const { ccclass, property, executeInEditMode } = _decorator;
 
 //原浆杯状态 默认 抬起 倒水
@@ -48,6 +49,7 @@ export class OriginCup extends Component {
         this.cupSkeleton = this.node.getChildByName('Cup')?.getComponent(sp.Skeleton)!;
 
         this.node.on(Node.EventType.TOUCH_END, () => {
+            TakeGobletAudioMgr.playOneShot(TakeGobletAudioMgr.getMusicIdName(3), 1.0);
             if (this.freezeActive) {
                 tgxUITips.show('冰冻中,无法操作!');
                 return;
@@ -59,6 +61,7 @@ export class OriginCup extends Component {
     async spawnNewOriginCup(height: CupHeight, targetPos: Vec3, colors: WaterColors[]): Promise<void> {
         return new Promise((resolve) => {
             if (!this.node) return;
+            TakeGobletAudioMgr.playOneShot(TakeGobletAudioMgr.getMusicIdName(6), 1.0);
             const levelAction = this.node.parent?.parent?.getComponent(LevelAction)!;
 
             // 设置初始位置(屏幕左侧)
@@ -133,6 +136,7 @@ export class OriginCup extends Component {
 
     /** 倒水动画*/
     pourWater() {
+        TakeGobletAudioMgr.playOneShot(TakeGobletAudioMgr.getMusicIdName(4), 1.0);
         const activeWaters = this.waters.children.filter(n => n.active);
         const topIndex = this.waters.children.length - activeWaters.length;
         if (activeWaters.length >= 0) {

+ 2 - 0
assets/module_take_goblet/Script/Component/TempCup.ts

@@ -4,6 +4,7 @@ import { Water } from './Water';
 import { EventDispatcher } from 'db://assets/core_tgx/easy_ui_framework/EventDispatcher';
 import { GameEvent } from '../Enum/GameEvent';
 import { GameUtil } from '../GameUtil';
+import { TakeGobletAudioMgr } from '../Manager/TakeGobletAudioMgr';
 const { ccclass, property } = _decorator;
 
 //暂存杯状态 默认 接水 倒水
@@ -93,6 +94,7 @@ export class TempCup extends Component {
 
     /**暂存杯 倒水动画*/
     pour() {
+        TakeGobletAudioMgr.playOneShot(TakeGobletAudioMgr.getMusicIdName(4), 1.0);
         this.playAnimation(TempCupState.PourWater);
     }
 

+ 1 - 0
assets/module_take_goblet/Script/TakeGobletGlobalInstance.ts

@@ -126,6 +126,7 @@ export class TakeGobletGlobalInstance {
 
     //初始化 冰冻水刷新概率
     refreshFreezeWaterInit(): boolean {
+        //DOTO 修改上限问题
         const { ice_thelimit } = LevelManager.instance.levelModel.levelConfig;
         const random = Math.random() * 100;
         return random <= ice_thelimit;