小游戏剩余次数大于10时的问题
This commit is contained in:
parent
09527d58d9
commit
a1f6b2df6a
File diff suppressed because it is too large
Load Diff
@ -581,10 +581,21 @@ export class SlotBar extends Component {
|
||||
showLeftCount(leftCount: number) {
|
||||
if (leftCount >= 1) {
|
||||
let rfs = this.left_1.getChildByName('rfs');
|
||||
let leftCount_1 = this.leftCount.node.getChildByName('leftCount_1').getComponent(sp.Skeleton)
|
||||
rfs.getComponent(LocalizedSprite).updateSprite();
|
||||
this.left_1.getComponent(Layout).updateLayout();
|
||||
this.left_1.active = true;
|
||||
this.leftCount.setAnimation(0, `anim_${leftCount}`, true)
|
||||
if (leftCount >= 10) {
|
||||
let num1 = leftCount / 10
|
||||
let num2 = leftCount % 10
|
||||
leftCount_1.node.active = true
|
||||
this.leftCount.setAnimation(0, `anim_${num1}`, true)
|
||||
leftCount_1.setAnimation(0, `anim_${num2}`, true)
|
||||
} else {
|
||||
leftCount_1.node.active = false
|
||||
this.leftCount.setAnimation(0, `anim_${leftCount}`, true)
|
||||
|
||||
}
|
||||
this.left_2.active = false;
|
||||
} else {
|
||||
this.left_1.active = false;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user