|
@@ -8,7 +8,7 @@ import { OriginArea } from './OriginArea';
|
|
import { LevelManager } from '../Manager/LevelMgr';
|
|
import { LevelManager } from '../Manager/LevelMgr';
|
|
import { tgxUITips } from 'db://assets/core_tgx/tgx';
|
|
import { tgxUITips } from 'db://assets/core_tgx/tgx';
|
|
import { GameUtil } from '../GameUtil';
|
|
import { GameUtil } from '../GameUtil';
|
|
-import { TakeGobletAudioMgr } from '../Manager/TakeGobletAudioMgr';
|
|
|
|
|
|
+import { StormSunderAudioMgr } from '../Manager/StormSunderAudioMgr';
|
|
const { ccclass, property, executeInEditMode } = _decorator;
|
|
const { ccclass, property, executeInEditMode } = _decorator;
|
|
|
|
|
|
//原浆杯状态 默认 抬起 倒水
|
|
//原浆杯状态 默认 抬起 倒水
|
|
@@ -51,7 +51,7 @@ export class OriginCup extends Component {
|
|
this.cupSkeleton = this.node.getChildByName('Cup')?.getComponent(sp.Skeleton)!;
|
|
this.cupSkeleton = this.node.getChildByName('Cup')?.getComponent(sp.Skeleton)!;
|
|
|
|
|
|
this.node.on(Node.EventType.TOUCH_END, () => {
|
|
this.node.on(Node.EventType.TOUCH_END, () => {
|
|
- TakeGobletAudioMgr.playOneShot(TakeGobletAudioMgr.getMusicIdName(3), 1.0);
|
|
|
|
|
|
+ StormSunderAudioMgr.playOneShot(StormSunderAudioMgr.getMusicIdName(3), 1.0);
|
|
if (this.freezeActive) {
|
|
if (this.freezeActive) {
|
|
tgxUITips.show('Unable to operate \n in freezing conditions!');
|
|
tgxUITips.show('Unable to operate \n in freezing conditions!');
|
|
return;
|
|
return;
|
|
@@ -63,7 +63,7 @@ export class OriginCup extends Component {
|
|
async spawnNewOriginCup(height: CupHeight, targetPos: Vec3, colors: WaterColors[]): Promise<void> {
|
|
async spawnNewOriginCup(height: CupHeight, targetPos: Vec3, colors: WaterColors[]): Promise<void> {
|
|
return new Promise((resolve) => {
|
|
return new Promise((resolve) => {
|
|
if (!this.node) return;
|
|
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)!;
|
|
const levelAction = this.node.parent?.parent?.getComponent(LevelAction)!;
|
|
|
|
|
|
// 设置初始位置(屏幕左侧)
|
|
// 设置初始位置(屏幕左侧)
|
|
@@ -125,7 +125,7 @@ export class OriginCup extends Component {
|
|
|
|
|
|
//解除冰冻
|
|
//解除冰冻
|
|
unFreeze() {
|
|
unFreeze() {
|
|
- TakeGobletAudioMgr.playOneShot(TakeGobletAudioMgr.getMusicIdName(9), 1.0);
|
|
|
|
|
|
+ StormSunderAudioMgr.playOneShot(StormSunderAudioMgr.getMusicIdName(9), 1.0);
|
|
this.freezeCount++;
|
|
this.freezeCount++;
|
|
this.freeze.children.forEach((freezeNode, i) => {
|
|
this.freeze.children.forEach((freezeNode, i) => {
|
|
freezeNode.getComponent(sp.Skeleton)!.setAnimation(0, `freeze_0${this.freezeCount}`, false);
|
|
freezeNode.getComponent(sp.Skeleton)!.setAnimation(0, `freeze_0${this.freezeCount}`, false);
|
|
@@ -138,7 +138,7 @@ export class OriginCup extends Component {
|
|
|
|
|
|
/** 倒水动画*/
|
|
/** 倒水动画*/
|
|
pourWater() {
|
|
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 activeWaters = this.waters.children.filter(n => n.active);
|
|
const topIndex = this.waters.children.length - activeWaters.length;
|
|
const topIndex = this.waters.children.length - activeWaters.length;
|
|
if (activeWaters.length >= 0) {
|
|
if (activeWaters.length >= 0) {
|