|
|
@@ -216,17 +216,19 @@ export default class Game extends cc.Component {
|
|
|
gData.gameData.init_coin = false;
|
|
|
|
|
|
if (gData.gameData.addHb > 0) {
|
|
|
- let add = Math.round(gData.gameData.addHb / 100);
|
|
|
- this.lbl_addHb.string = "+" + add.toString();
|
|
|
+ let add = Math.round(gData.gameData.addHb / 100);
|
|
|
gData.gameData.addHb = 0;
|
|
|
-
|
|
|
+ if(add > 0)
|
|
|
{
|
|
|
- cc.Tween.stopAllByTarget(this.node_addHb);
|
|
|
- this.node_addHb.active = true;
|
|
|
- this.node_addHb.scale = 0;
|
|
|
- cc.tween(this.node_addHb).to(0.1, { scale: 1 }).delay(1.5).call(() => {
|
|
|
- this.node_addHb.active = false;
|
|
|
- }).start();
|
|
|
+ this.lbl_addHb.string = "+" + add.toString();
|
|
|
+ {
|
|
|
+ cc.Tween.stopAllByTarget(this.node_addHb);
|
|
|
+ this.node_addHb.active = true;
|
|
|
+ this.node_addHb.scale = 0;
|
|
|
+ cc.tween(this.node_addHb).to(0.1, { scale: 1 }).delay(1.5).call(() => {
|
|
|
+ this.node_addHb.active = false;
|
|
|
+ }).start();
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
}
|