|
@@ -3,6 +3,7 @@ import { CupHeight, WaterColorHex, WaterColors } from '../TakeGobletGlobalInstan
|
|
import { Water } from './Water';
|
|
import { Water } from './Water';
|
|
import { EventDispatcher } from 'db://assets/core_tgx/easy_ui_framework/EventDispatcher';
|
|
import { EventDispatcher } from 'db://assets/core_tgx/easy_ui_framework/EventDispatcher';
|
|
import { GameEvent } from '../Enum/GameEvent';
|
|
import { GameEvent } from '../Enum/GameEvent';
|
|
|
|
+import { GameUtil } from '../GameUtil';
|
|
const { ccclass, property } = _decorator;
|
|
const { ccclass, property } = _decorator;
|
|
|
|
|
|
@ccclass('TempCup')
|
|
@ccclass('TempCup')
|
|
@@ -51,7 +52,8 @@ export class TempCup extends Component {
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
- fill(color: WaterColors) {
|
|
|
|
|
|
+ /**暂存杯 接水动画*/
|
|
|
|
+ async fill(color: WaterColors) {
|
|
if (this._isFull) return;
|
|
if (this._isFull) return;
|
|
|
|
|
|
const waterNode = this.waters.children[0];
|
|
const waterNode = this.waters.children[0];
|
|
@@ -67,6 +69,7 @@ export class TempCup extends Component {
|
|
this.colorB.setAnimation(0, 'pick_01', false);
|
|
this.colorB.setAnimation(0, 'pick_01', false);
|
|
this.cupSkeleton.setAnimation(0, 'pick_01', false);
|
|
this.cupSkeleton.setAnimation(0, 'pick_01', false);
|
|
this._isFull = true;
|
|
this._isFull = true;
|
|
|
|
+ await GameUtil.delay(0.5);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|