fix: score not update when game over on cheese mode
parent
72cd72724e
commit
fdcac05655
|
@ -8,6 +8,7 @@
|
||||||
],
|
],
|
||||||
"subMetas": {},
|
"subMetas": {},
|
||||||
"userData": {
|
"userData": {
|
||||||
"syncNodeName": "CumulativeBooster"
|
"syncNodeName": "CumulativeBooster",
|
||||||
|
"persistent": false
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -89,6 +89,7 @@ export class CumulativeBar extends Component {
|
||||||
private _goal = false;
|
private _goal = false;
|
||||||
private _timer = 0;
|
private _timer = 0;
|
||||||
private _multiplier = 1;
|
private _multiplier = 1;
|
||||||
|
private _comboComplete = false;
|
||||||
private _currentValuePosition = new Vec3();
|
private _currentValuePosition = new Vec3();
|
||||||
private _center = new Vec3();
|
private _center = new Vec3();
|
||||||
|
|
||||||
|
@ -164,10 +165,10 @@ export class CumulativeBar extends Component {
|
||||||
break;
|
break;
|
||||||
case ScoreType.Goal:
|
case ScoreType.Goal:
|
||||||
if (this._currentValue == 0) {
|
if (this._currentValue == 0) {
|
||||||
SoundManager.instance.playSfx(this._goalSound, 2);
|
SoundManager.instance.playSfx(this._goalSound, 3);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
SoundManager.instance.playSfx(this._cheeseModeGoalSound, 2);
|
SoundManager.instance.playSfx(this._cheeseModeGoalSound, 3);
|
||||||
this._multiplier = 0;
|
this._multiplier = 0;
|
||||||
this._goal = true;
|
this._goal = true;
|
||||||
let items = Math.ceil(this._currentValue / 10);
|
let items = Math.ceil(this._currentValue / 10);
|
||||||
|
@ -182,8 +183,21 @@ export class CumulativeBar extends Component {
|
||||||
private async playCollectEffect(items: number, score: number) {
|
private async playCollectEffect(items: number, score: number) {
|
||||||
const time = 0.04;
|
const time = 0.04;
|
||||||
const offset = new Vec3();
|
const offset = new Vec3();
|
||||||
|
this._comboComplete = false;
|
||||||
|
GameManager.instance.addScoreWithWaiting(
|
||||||
|
Math.round(score),
|
||||||
|
ScoreType.Combo,
|
||||||
|
this.node.getWorldPosition(),
|
||||||
|
() => this._comboComplete,
|
||||||
|
{
|
||||||
|
scaleMin: 2,
|
||||||
|
scaleMax: 4,
|
||||||
|
duration: 0.8,
|
||||||
|
},
|
||||||
|
);
|
||||||
|
|
||||||
for (let i = 0; i < items; i++) {
|
while (items > 0) {
|
||||||
|
items--;
|
||||||
const obj = this._starPool.get(this._scoreUI);
|
const obj = this._starPool.get(this._scoreUI);
|
||||||
Vec3.random(offset, 30);
|
Vec3.random(offset, 30);
|
||||||
offset.y = 0;
|
offset.y = 0;
|
||||||
|
@ -203,14 +217,10 @@ export class CumulativeBar extends Component {
|
||||||
.start();
|
.start();
|
||||||
await Utilities.delay(time);
|
await Utilities.delay(time);
|
||||||
}
|
}
|
||||||
await Utilities.waitUntil(() => this._starPool.countActive == 0);
|
await Utilities.waitUntil(() => this._starPool.countActive == 0, 0.1);
|
||||||
|
this._comboComplete = true;
|
||||||
this._soundFx.playSound();
|
this._soundFx.playSound();
|
||||||
GameManager.instance.addScore(Math.round(score), ScoreType.Combo, this.node.getWorldPosition(), {
|
await Utilities.delay(0.8);
|
||||||
scaleMin: 2,
|
|
||||||
scaleMax: 4,
|
|
||||||
duration: 1,
|
|
||||||
});
|
|
||||||
await Utilities.delay(1);
|
|
||||||
this.calcReward(score);
|
this.calcReward(score);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -227,7 +237,7 @@ export class CumulativeBar extends Component {
|
||||||
const fx = selectReward.pool.get(ParticleSystem, GameManager.instance.topContainer);
|
const fx = selectReward.pool.get(ParticleSystem, GameManager.instance.topContainer);
|
||||||
fx.node.setWorldPosition(this.node.worldPosition);
|
fx.node.setWorldPosition(this.node.worldPosition);
|
||||||
SoundManager.instance.playSfx(selectReward.sound);
|
SoundManager.instance.playSfx(selectReward.sound);
|
||||||
await Utilities.waitUntil(() => fx.isStopped);
|
await Utilities.waitUntil(() => fx.isStopped, 0.1);
|
||||||
selectReward.pool.release(fx);
|
selectReward.pool.release(fx);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -11,6 +11,7 @@ import {
|
||||||
EPhysics2DDrawFlags,
|
EPhysics2DDrawFlags,
|
||||||
PhysicsSystem2D,
|
PhysicsSystem2D,
|
||||||
SpriteFrame,
|
SpriteFrame,
|
||||||
|
Color,
|
||||||
} from 'cc';
|
} from 'cc';
|
||||||
import ObjectPool from '../Pool/ObjectPool';
|
import ObjectPool from '../Pool/ObjectPool';
|
||||||
import { Ball } from '../GamePlay/Ball';
|
import { Ball } from '../GamePlay/Ball';
|
||||||
|
@ -25,6 +26,7 @@ import TimeConfig from '../Enum/TimeConfig';
|
||||||
import BEConnector from '../API/BEConnector';
|
import BEConnector from '../API/BEConnector';
|
||||||
import BoosterType from '../Enum/BoosterType';
|
import BoosterType from '../Enum/BoosterType';
|
||||||
import Singleton from '../Singleton';
|
import Singleton from '../Singleton';
|
||||||
|
import { StickerManager } from './StickerManager';
|
||||||
const { ccclass, property } = _decorator;
|
const { ccclass, property } = _decorator;
|
||||||
|
|
||||||
window.addEventListener('message', (data) => {
|
window.addEventListener('message', (data) => {
|
||||||
|
@ -92,6 +94,11 @@ export class GameManager extends Singleton<GameManager>() {
|
||||||
private _isMultiBall = false;
|
private _isMultiBall = false;
|
||||||
private _warningTime = false;
|
private _warningTime = false;
|
||||||
private _currentBallInGame = 0;
|
private _currentBallInGame = 0;
|
||||||
|
private _isWaitingUpdateScore = false;
|
||||||
|
|
||||||
|
public get isWaitingUpdateScore() {
|
||||||
|
return this._isWaitingUpdateScore;
|
||||||
|
}
|
||||||
|
|
||||||
public get topContainer() {
|
public get topContainer() {
|
||||||
return this._topContainer;
|
return this._topContainer;
|
||||||
|
@ -123,7 +130,6 @@ export class GameManager extends Singleton<GameManager>() {
|
||||||
|
|
||||||
protected update(dt: number): void {
|
protected update(dt: number): void {
|
||||||
if (this._gameState != GameState.Playing) return;
|
if (this._gameState != GameState.Playing) return;
|
||||||
|
|
||||||
for (let i = 0; i < this._boostersActive.length; i++) {
|
for (let i = 0; i < this._boostersActive.length; i++) {
|
||||||
const booster = this._boostersActive[i];
|
const booster = this._boostersActive[i];
|
||||||
booster.runningTime += dt;
|
booster.runningTime += dt;
|
||||||
|
@ -167,16 +173,37 @@ export class GameManager extends Singleton<GameManager>() {
|
||||||
score: number,
|
score: number,
|
||||||
type: ScoreType,
|
type: ScoreType,
|
||||||
position: Vec3,
|
position: Vec3,
|
||||||
|
opts?: { scaleMin?: number; scaleMax?: number; duration?: number },
|
||||||
|
) {
|
||||||
|
this._score += score;
|
||||||
|
const floatingScore = this._FloatingScorePool.get(FloatingText, this._topContainer);
|
||||||
|
floatingScore.show(
|
||||||
|
`+${score}`,
|
||||||
|
position,
|
||||||
|
score >= 100 ? opts?.scaleMax || 1 : opts?.scaleMin || 1,
|
||||||
|
opts?.duration || 1,
|
||||||
|
);
|
||||||
|
EventManger.instance.emit(GameEvent.Score, [this._score, score, type, position]);
|
||||||
|
}
|
||||||
|
|
||||||
|
public async addScoreWithWaiting(
|
||||||
|
score: number,
|
||||||
|
type: ScoreType,
|
||||||
|
position: Vec3,
|
||||||
|
predicate: () => boolean,
|
||||||
opts: { scaleMin: number; scaleMax: number; duration: number },
|
opts: { scaleMin: number; scaleMax: number; duration: number },
|
||||||
) {
|
) {
|
||||||
|
this._isWaitingUpdateScore = true;
|
||||||
|
await Utilities.waitUntil(predicate);
|
||||||
this._score += score;
|
this._score += score;
|
||||||
const floatingScore = this._FloatingScorePool.get(FloatingText, this._topContainer);
|
const floatingScore = this._FloatingScorePool.get(FloatingText, this._topContainer);
|
||||||
floatingScore.show(`+${score}`, position, score >= 100 ? opts.scaleMax : opts.scaleMin, opts.duration);
|
floatingScore.show(`+${score}`, position, score >= 100 ? opts.scaleMax : opts.scaleMin, opts.duration);
|
||||||
EventManger.instance.emit(GameEvent.Score, [this._score, score, type, position]);
|
EventManger.instance.emit(GameEvent.Score, [this._score, score, type, position]);
|
||||||
|
this._isWaitingUpdateScore = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
private async countTime() {
|
private async countTime() {
|
||||||
while (this.gameState == GameState.Playing) {
|
while (this._gameState == GameState.Playing) {
|
||||||
this._timer--;
|
this._timer--;
|
||||||
if (this._timer <= 0) {
|
if (this._timer <= 0) {
|
||||||
this._timer = 0;
|
this._timer = 0;
|
||||||
|
@ -274,10 +301,11 @@ export class GameManager extends Singleton<GameManager>() {
|
||||||
EventManger.instance.emit(GameEvent.TimeUpdate, this._timer);
|
EventManger.instance.emit(GameEvent.TimeUpdate, this._timer);
|
||||||
}
|
}
|
||||||
|
|
||||||
public gameOver() {
|
public async gameOver() {
|
||||||
this._ballPool.releaseAll();
|
this._ballPool.releaseAll();
|
||||||
this.DisableAllBooster();
|
this.DisableAllBooster();
|
||||||
SoundManager.instance.playBGM(this._gameOverMusic);
|
SoundManager.instance.playBGM(this._gameOverMusic);
|
||||||
|
StickerManager.instance.showLabel('TIME UP!!!', { color: new Color('#ed3a18'), outLineColor: Color.WHITE });
|
||||||
BEConnector.instance.gameScore = this.score;
|
BEConnector.instance.gameScore = this.score;
|
||||||
if (this.isReplayed) {
|
if (this.isReplayed) {
|
||||||
this.changeGameState(GameState.End);
|
this.changeGameState(GameState.End);
|
||||||
|
|
|
@ -1,4 +1,17 @@
|
||||||
import { _decorator, CCString, Component, Node, Sprite, SpriteFrame, tween, Vec3 } from 'cc';
|
import {
|
||||||
|
_decorator,
|
||||||
|
CCString,
|
||||||
|
Color,
|
||||||
|
Component,
|
||||||
|
Label,
|
||||||
|
LabelOutline,
|
||||||
|
Node,
|
||||||
|
Sprite,
|
||||||
|
SpriteFrame,
|
||||||
|
Tween,
|
||||||
|
tween,
|
||||||
|
Vec3,
|
||||||
|
} from 'cc';
|
||||||
import Singleton from '../Singleton';
|
import Singleton from '../Singleton';
|
||||||
const { ccclass, property } = _decorator;
|
const { ccclass, property } = _decorator;
|
||||||
|
|
||||||
|
@ -14,11 +27,14 @@ class Sticker {
|
||||||
export class StickerManager extends Singleton<StickerManager>() {
|
export class StickerManager extends Singleton<StickerManager>() {
|
||||||
@property({ type: Node, visible: true })
|
@property({ type: Node, visible: true })
|
||||||
private _popup: Node;
|
private _popup: Node;
|
||||||
|
@property({ type: Label, visible: true })
|
||||||
|
private _label: Label;
|
||||||
@property({ type: Sticker, visible: true })
|
@property({ type: Sticker, visible: true })
|
||||||
private _stickers: Sticker[] = [];
|
private _stickers: Sticker[] = [];
|
||||||
|
|
||||||
protected start(): void {
|
protected start(): void {
|
||||||
this._popup.setScale(Vec3.ZERO);
|
this._popup.setScale(Vec3.ZERO);
|
||||||
|
this._label.string = '';
|
||||||
}
|
}
|
||||||
|
|
||||||
public Show(stickerName: string, position: Vec3 = Vec3.ZERO) {
|
public Show(stickerName: string, position: Vec3 = Vec3.ZERO) {
|
||||||
|
@ -32,4 +48,28 @@ export class StickerManager extends Singleton<StickerManager>() {
|
||||||
.to(0.2, { scale: Vec3.ZERO }, { easing: 'backIn' })
|
.to(0.2, { scale: Vec3.ZERO }, { easing: 'backIn' })
|
||||||
.start();
|
.start();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public showLabel(string: string, opts?: { color?: Color; outLineColor?: Color; position?: Vec3 }) {
|
||||||
|
this._label.string = string;
|
||||||
|
this._label.color = opts?.color || new Color('#FFFF00');
|
||||||
|
this._label.node.setPosition(opts?.position || Vec3.ZERO);
|
||||||
|
this._label.getComponent(LabelOutline).color = opts?.outLineColor || new Color('#FF6600');
|
||||||
|
|
||||||
|
Tween.stopAllByTarget(this._label.node);
|
||||||
|
tween(this._label.node)
|
||||||
|
.set({ scale: Vec3.ZERO })
|
||||||
|
.to(0.2, { scale: Vec3.ONE }, { easing: 'backOut' })
|
||||||
|
.delay(1)
|
||||||
|
.to(
|
||||||
|
0.1,
|
||||||
|
{ scale: Vec3.ZERO },
|
||||||
|
{
|
||||||
|
onComplete: () => {
|
||||||
|
this._label.string = '';
|
||||||
|
},
|
||||||
|
easing: 'backIn',
|
||||||
|
},
|
||||||
|
)
|
||||||
|
.start();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -147,7 +147,19 @@ export class GameOverPanel extends Component {
|
||||||
)
|
)
|
||||||
.call(() => this._pool.release(obj))
|
.call(() => this._pool.release(obj))
|
||||||
.call(async () => {
|
.call(async () => {
|
||||||
if (i == items - 1) {
|
Tween.stopAllByTarget(this.yourScore.node);
|
||||||
|
this.yourScore.string = score.toString();
|
||||||
|
tween(this.yourScore.node)
|
||||||
|
.to(duration / 6, { scale: new Vec3(1.3, 1.3) })
|
||||||
|
.to(duration / 6, { scale: new Vec3(1, 1) })
|
||||||
|
.start();
|
||||||
|
})
|
||||||
|
.start();
|
||||||
|
SoundManager.instance.playSfx(this._soundCollectCoinFx);
|
||||||
|
await Utilities.delay(duration / 3);
|
||||||
|
}
|
||||||
|
|
||||||
|
await Utilities.waitUntil(() => this._pool.countActive == 0, 0.1);
|
||||||
this.yourScore.string = totalScore.toString();
|
this.yourScore.string = totalScore.toString();
|
||||||
Tween.stopAllByTarget(this.yourScore.node);
|
Tween.stopAllByTarget(this.yourScore.node);
|
||||||
tween(this.yourScore.node)
|
tween(this.yourScore.node)
|
||||||
|
@ -155,23 +167,9 @@ export class GameOverPanel extends Component {
|
||||||
.to(0.3, { scale: new Vec3(1.8, 1.8) }, { easing: 'backIn' })
|
.to(0.3, { scale: new Vec3(1.8, 1.8) }, { easing: 'backIn' })
|
||||||
.to(0.3, { scale: new Vec3(1, 1) }, { easing: 'backOut' })
|
.to(0.3, { scale: new Vec3(1, 1) }, { easing: 'backOut' })
|
||||||
.start();
|
.start();
|
||||||
if (this._end) {
|
if (!this._end) return;
|
||||||
await Utilities.delay(1);
|
await Utilities.delay(1);
|
||||||
BEConnector.instance.postScoreToServer();
|
BEConnector.instance.postScoreToServer();
|
||||||
}
|
}
|
||||||
} else {
|
|
||||||
Tween.stopAllByTarget(this.yourScore.node);
|
|
||||||
this.yourScore.string = score.toString();
|
|
||||||
tween(this.yourScore.node)
|
|
||||||
.to(duration / 6, { scale: new Vec3(1.3, 1.3) })
|
|
||||||
.to(duration / 6, { scale: new Vec3(1, 1) })
|
|
||||||
.start();
|
|
||||||
}
|
|
||||||
})
|
|
||||||
.start();
|
|
||||||
SoundManager.instance.playSfx(this._soundCollectCoinFx);
|
|
||||||
await Utilities.delay(duration / 3);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -80,8 +80,8 @@ export class TutorialController extends Component {
|
||||||
|
|
||||||
tween(this._tapL)
|
tween(this._tapL)
|
||||||
.call(() => this._tapLEffect.clear())
|
.call(() => this._tapLEffect.clear())
|
||||||
.by(0.5, { position: new Vec3(0, 50), scale: new Vec3(-0.1, -0.1) }, { easing: 'quintOut' })
|
.to(0.5, { position: new Vec3(-470, -500), scale: new Vec3(0.9, 0.9) }, { easing: 'quintOut' })
|
||||||
.by(0.5, { position: new Vec3(0, -50), scale: new Vec3(0.1, 0.1) }, { easing: 'sineOut' })
|
.to(0.5, { position: new Vec3(-470, -550), scale: Vec3.ONE }, { easing: 'sineOut' })
|
||||||
.call(() => this._tapLEffect.play())
|
.call(() => this._tapLEffect.play())
|
||||||
.union()
|
.union()
|
||||||
.repeatForever()
|
.repeatForever()
|
||||||
|
@ -89,8 +89,8 @@ export class TutorialController extends Component {
|
||||||
await Utilities.delay(0.5);
|
await Utilities.delay(0.5);
|
||||||
tween(this._tapR)
|
tween(this._tapR)
|
||||||
.call(() => this._tapREffect.clear())
|
.call(() => this._tapREffect.clear())
|
||||||
.by(0.5, { position: new Vec3(0, 50), scale: new Vec3(-0.1, -0.1) }, { easing: 'quintOut' })
|
.to(0.5, { position: new Vec3(470, -500), scale: new Vec3(0.9, 0.9) }, { easing: 'quintOut' })
|
||||||
.by(0.5, { position: new Vec3(0, -50), scale: new Vec3(0.1, 0.1) }, { easing: 'sineOut' })
|
.to(0.5, { position: new Vec3(470, -550), scale: Vec3.ONE }, { easing: 'sineOut' })
|
||||||
.call(() => this._tapREffect.play())
|
.call(() => this._tapREffect.play())
|
||||||
.union()
|
.union()
|
||||||
.repeatForever()
|
.repeatForever()
|
||||||
|
@ -103,6 +103,8 @@ export class TutorialController extends Component {
|
||||||
Tween.stopAllByTarget(this._tapR);
|
Tween.stopAllByTarget(this._tapR);
|
||||||
this._timer = 0;
|
this._timer = 0;
|
||||||
this._showed = false;
|
this._showed = false;
|
||||||
|
this._tapLEffect.stop();
|
||||||
|
this._tapREffect.stop();
|
||||||
this._tapL.active = false;
|
this._tapL.active = false;
|
||||||
this._tapR.active = false;
|
this._tapR.active = false;
|
||||||
}
|
}
|
||||||
|
|
|
@ -15,8 +15,6 @@ export class UIController extends Component {
|
||||||
private _scoreLabel: Label;
|
private _scoreLabel: Label;
|
||||||
@property({ type: Label, visible: true })
|
@property({ type: Label, visible: true })
|
||||||
private _ticketLabel: Label;
|
private _ticketLabel: Label;
|
||||||
@property({ type: Label, visible: true })
|
|
||||||
private _eventLabel: Label;
|
|
||||||
|
|
||||||
@property({ type: ParticleSystem, visible: true })
|
@property({ type: ParticleSystem, visible: true })
|
||||||
private _buffFx: ParticleSystem;
|
private _buffFx: ParticleSystem;
|
||||||
|
@ -35,7 +33,6 @@ export class UIController extends Component {
|
||||||
EventManger.instance.on(GameEvent.MultiBall, this.onMultiBall, this);
|
EventManger.instance.on(GameEvent.MultiBall, this.onMultiBall, this);
|
||||||
EventManger.instance.on(GameEvent.BoosterActive, this.onBoosterActive, this);
|
EventManger.instance.on(GameEvent.BoosterActive, this.onBoosterActive, this);
|
||||||
EventManger.instance.on(GameEvent.BoosterDisable, this.onBoosterDisable, this);
|
EventManger.instance.on(GameEvent.BoosterDisable, this.onBoosterDisable, this);
|
||||||
this._eventLabel.string = '';
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private async onScore(score: number, points: number, type: ScoreType) {
|
private async onScore(score: number, points: number, type: ScoreType) {
|
||||||
|
@ -49,30 +46,6 @@ export class UIController extends Component {
|
||||||
StickerManager.instance.Show('BallOut');
|
StickerManager.instance.Show('BallOut');
|
||||||
}
|
}
|
||||||
|
|
||||||
private showEventLabel(string: string, color?: Color, outLineColor?: Color) {
|
|
||||||
this._eventLabel.string = string;
|
|
||||||
this._eventLabel.color = color || new Color('#FFFF00');
|
|
||||||
|
|
||||||
this._eventLabel.getComponent(LabelOutline).color = outLineColor || new Color('#FF6600');
|
|
||||||
|
|
||||||
Tween.stopAllByTarget(this._eventLabel.node);
|
|
||||||
tween(this._eventLabel.node)
|
|
||||||
.set({ scale: Vec3.ZERO })
|
|
||||||
.to(0.2, { scale: Vec3.ONE }, { easing: 'backOut' })
|
|
||||||
.delay(1)
|
|
||||||
.to(
|
|
||||||
0.1,
|
|
||||||
{ scale: Vec3.ZERO },
|
|
||||||
{
|
|
||||||
onComplete: () => {
|
|
||||||
this._eventLabel.string = '';
|
|
||||||
},
|
|
||||||
easing: 'backIn',
|
|
||||||
},
|
|
||||||
)
|
|
||||||
.start();
|
|
||||||
}
|
|
||||||
|
|
||||||
private async onGameStateChange(state: GameState) {
|
private async onGameStateChange(state: GameState) {
|
||||||
switch (state) {
|
switch (state) {
|
||||||
case GameState.Init:
|
case GameState.Init:
|
||||||
|
@ -90,14 +63,13 @@ export class UIController extends Component {
|
||||||
|
|
||||||
break;
|
break;
|
||||||
case GameState.GameOver:
|
case GameState.GameOver:
|
||||||
this.showEventLabel('TIME UP!!!', new Color('#ed3a18'), Color.WHITE);
|
|
||||||
await Utilities.delay(1.2);
|
|
||||||
this._buffFx.stop();
|
this._buffFx.stop();
|
||||||
|
await Utilities.waitUntil(() => !GameManager.instance.isWaitingUpdateScore);
|
||||||
|
await Utilities.delay(2);
|
||||||
this._overPanel.active = true;
|
this._overPanel.active = true;
|
||||||
break;
|
break;
|
||||||
case GameState.End:
|
case GameState.End:
|
||||||
this.showEventLabel('TIME UP!!!', new Color('#ed3a18'), Color.WHITE);
|
await Utilities.delay(2);
|
||||||
await Utilities.delay(1.2);
|
|
||||||
this._overPanel.active = true;
|
this._overPanel.active = true;
|
||||||
break;
|
break;
|
||||||
case GameState.Relive:
|
case GameState.Relive:
|
||||||
|
@ -110,13 +82,16 @@ export class UIController extends Component {
|
||||||
|
|
||||||
private onMultiBall(active: boolean) {
|
private onMultiBall(active: boolean) {
|
||||||
if (active) {
|
if (active) {
|
||||||
this.showEventLabel('MULTI BALL!!!');
|
StickerManager.instance.showLabel('MULTI BALL!!!');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public onBoosterActive() {
|
public onBoosterActive() {
|
||||||
this._buffFx.play();
|
this._buffFx.play();
|
||||||
this.showEventLabel('CHEESE!!!', new Color('#ffb517'), new Color('#ec830a'));
|
StickerManager.instance.showLabel('CHEESE!!!', {
|
||||||
|
color: new Color('#ffb517'),
|
||||||
|
outLineColor: new Color('#ec830a'),
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
public onBoosterDisable() {
|
public onBoosterDisable() {
|
||||||
|
|
Loading…
Reference in New Issue