|
@@ -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) {
|