Răsfoiți Sursa

StormSunderAudioMgr

woso_javan 2 luni în urmă
părinte
comite
27b311affb

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

@@ -5,7 +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_storm_sunder/Script/Manager/TakeGobletAudioMgr";
+import { StormSunderAudioMgr } from "../../module_storm_sunder/Script/Manager/StormSunderAudioMgr";
 
 export class UI_Setting_Impl extends UI_Setting {
     constructor() {
@@ -19,7 +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);
+            StormSunderAudioMgr.playOneShot(StormSunderAudioMgr.getMusicIdName(2), 1.0);
             this.hide();
         });
 

+ 2 - 2
assets/module_storm_sunder/Prefabs/UI/Result/UI_BattleResult_Impl.ts

@@ -7,7 +7,7 @@ import { Layout_BattleResult } from "./Layout_BattleResult";
 import { GtagMgr, GtagType } from "db://assets/core_tgx/base/GtagMgr";
 import { GameEvent } from "../../../Script/Enum/GameEvent";
 import { LevelManager } from "../../../Script/Manager/LevelMgr";
-import { TakeGobletAudioMgr } from "../../../Script/Manager/TakeGobletAudioMgr";
+import { StormSunderAudioMgr } from "../../../Script/Manager/StormSunderAudioMgr";
 
 export class UI_BattleResult_Impl extends UI_BattleResult {
     timeoutIds: Array<number> = [];
@@ -24,7 +24,7 @@ export class UI_BattleResult_Impl extends UI_BattleResult {
     protected onCreated(): void {
         this.win = LevelManager.instance.levelModel.isWin;
         const soundId = this.win ? 7 : 8;
-        TakeGobletAudioMgr.playOneShot(TakeGobletAudioMgr.getMusicIdName(soundId), 1.0);
+        StormSunderAudioMgr.playOneShot(StormSunderAudioMgr.getMusicIdName(soundId), 1.0);
 
         let layout = this.layout as Layout_BattleResult;
         this.onButtonEvent(layout.btNext, () => {

+ 5 - 5
assets/module_storm_sunder/RoosterStormSunder.ts

@@ -7,7 +7,7 @@ import { GameUtil } from './Script/GameUtil';
 
 import { tgxUIMgr } from '../core_tgx/tgx';
 import { UI_Setting } from '../scripts/UIDef';
-import { TakeGobletAudioMgr } from './Script/Manager/TakeGobletAudioMgr';
+import { StormSunderAudioMgr } from './Script/Manager/StormSunderAudioMgr';
 import { LevelAction } from './Script/LevelAction';
 const { ccclass, property } = _decorator;
 
@@ -15,8 +15,8 @@ const { ccclass, property } = _decorator;
 export class RoosterStormSunder extends Component {
 
     onLoad() {
-        TakeGobletAudioMgr.initilize();
-        TakeGobletAudioMgr.play(TakeGobletAudioMgr.getMusicIdName(1), 1.0);
+        StormSunderAudioMgr.initilize();
+        StormSunderAudioMgr.play(StormSunderAudioMgr.getMusicIdName(1), 1.0);
 
         LevelManager.instance.initilizeModel();
         TakeGobletGlobalInstance.instance.levels = find('Canvas/Scene/Levels')!;
@@ -45,13 +45,13 @@ export class RoosterStormSunder extends Component {
     }
 
     private async onClickRefresh(): Promise<void> {
-        TakeGobletAudioMgr.playOneShot(TakeGobletAudioMgr.getMusicIdName(2), 1.0);
+        StormSunderAudioMgr.playOneShot(StormSunderAudioMgr.getMusicIdName(2), 1.0);
         Tween.stopAll();
         EventDispatcher.instance.emit(GameEvent.EVENT_BATTLE_FAIL_LEVEL_RESET);
     }
 
     private onClickSet(): void {
-        TakeGobletAudioMgr.playOneShot(TakeGobletAudioMgr.getMusicIdName(2), 1.0);
+        StormSunderAudioMgr.playOneShot(StormSunderAudioMgr.getMusicIdName(2), 1.0);
         const show = tgxUIMgr.inst.isShowing(UI_Setting);
         if (!show) {
             tgxUIMgr.inst.showUI(UI_Setting);

+ 2 - 2
assets/module_storm_sunder/Script/Component/ButtonComponent.ts

@@ -5,7 +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';
+import { StormSunderAudioMgr } from '../Manager/StormSunderAudioMgr';
 const { ccclass, property } = _decorator;
 
 /**
@@ -28,7 +28,7 @@ export class ButtonComponent extends Component {
     }
 
     private onClickHandler(type: TYPE_ITEM): void {
-        TakeGobletAudioMgr.playOneShot(TakeGobletAudioMgr.getMusicIdName(2), 1.0);
+        StormSunderAudioMgr.playOneShot(StormSunderAudioMgr.getMusicIdName(2), 1.0);
         let alerType = '';
         switch (type) {
             case TYPE_ITEM.FillUp:

+ 2 - 2
assets/module_storm_sunder/Script/Component/CocktailCup.ts

@@ -5,7 +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';
+import { StormSunderAudioMgr } from '../Manager/StormSunderAudioMgr';
 const { ccclass, property, executeInEditMode } = _decorator;
 
 //调酒杯状态 默认 接水
@@ -70,7 +70,7 @@ export class CocktailCup extends Component {
     //补满水
     public async fillUp() {
         if (!this.node) return;
-        TakeGobletAudioMgr.playOneShot(TakeGobletAudioMgr.getMusicIdName(5), 1.0);
+        StormSunderAudioMgr.playOneShot(StormSunderAudioMgr.getMusicIdName(5), 1.0);
         this.playAnimationByState(CocktailCupState.Full);
         this.fadeOut();
         await GameUtil.delay(0.5);

+ 5 - 5
assets/module_storm_sunder/Script/Component/OriginCup.ts

@@ -8,7 +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';
+import { StormSunderAudioMgr } from '../Manager/StormSunderAudioMgr';
 const { ccclass, property, executeInEditMode } = _decorator;
 
 //原浆杯状态 默认 抬起 倒水
@@ -51,7 +51,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);
+            StormSunderAudioMgr.playOneShot(StormSunderAudioMgr.getMusicIdName(3), 1.0);
             if (this.freezeActive) {
                 tgxUITips.show('Unable to operate \n in freezing conditions!');
                 return;
@@ -63,7 +63,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);
+            StormSunderAudioMgr.playOneShot(StormSunderAudioMgr.getMusicIdName(6), 1.0);
             const levelAction = this.node.parent?.parent?.getComponent(LevelAction)!;
 
             // 设置初始位置(屏幕左侧)
@@ -125,7 +125,7 @@ export class OriginCup extends Component {
 
     //解除冰冻
     unFreeze() {
-        TakeGobletAudioMgr.playOneShot(TakeGobletAudioMgr.getMusicIdName(9), 1.0);
+        StormSunderAudioMgr.playOneShot(StormSunderAudioMgr.getMusicIdName(9), 1.0);
         this.freezeCount++;
         this.freeze.children.forEach((freezeNode, i) => {
             freezeNode.getComponent(sp.Skeleton)!.setAnimation(0, `freeze_0${this.freezeCount}`, false);
@@ -138,7 +138,7 @@ export class OriginCup extends Component {
 
     /** 倒水动画*/
     pourWater() {
-        TakeGobletAudioMgr.playOneShot(TakeGobletAudioMgr.getMusicIdName(4), 1.0);
+        StormSunderAudioMgr.playOneShot(StormSunderAudioMgr.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 - 2
assets/module_storm_sunder/Script/Component/TempCup.ts

@@ -4,7 +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';
+import { StormSunderAudioMgr } from '../Manager/StormSunderAudioMgr';
 const { ccclass, property } = _decorator;
 
 //暂存杯状态 默认 接水 倒水
@@ -103,7 +103,7 @@ export class TempCup extends Component {
 
     /**暂存杯 倒水动画*/
     pour() {
-        TakeGobletAudioMgr.playOneShot(TakeGobletAudioMgr.getMusicIdName(4), 1.0);
+        StormSunderAudioMgr.playOneShot(StormSunderAudioMgr.getMusicIdName(4), 1.0);
         this.setSpineTimeScale(1.5);
         this.playAnimation(TempCupState.PourWater);
     }

+ 1 - 1
assets/module_storm_sunder/Script/Manager/TakeGobletAudioMgr.ts → assets/module_storm_sunder/Script/Manager/StormSunderAudioMgr.ts

@@ -6,7 +6,7 @@ import { MusicConfigModel } from '../Model/MusicConfigModel';
 
 const BundleName = ModuleDef.MODULE_STORM_SUNDER;
 
-export class TakeGobletAudioMgr {
+export class StormSunderAudioMgr {
 
     static _musicConfigModel: MusicConfigModel;