进度初始化时,使用统一的更新显示的方法

This commit is contained in:
zhl 2019-02-26 17:28:18 +08:00
parent aed66eb00f
commit e736b930d1
2 changed files with 3 additions and 2 deletions

View File

@ -27,7 +27,7 @@ cc.Class({
type: cc.Node type: cc.Node
}, },
popTitles: [], popTitles: [],
currentVal: 1000, currentVal: 1024,
margin: 170, margin: 170,
pointArr: [], pointArr: [],
cubeArr: [] cubeArr: []

View File

@ -79,8 +79,9 @@ cc.Class({
onLoad() { onLoad() {
this.loginStatusLabel.node.active = false; this.loginStatusLabel.node.active = false;
var processBar = cc.instantiate(this.processBarPrefab); var processBar = cc.instantiate(this.processBarPrefab);
processBar.getComponent('progressBar').currentVal = 50000; // processBar.getComponent('progressBar').currentVal = 50000;
this.part1.addChild(processBar); this.part1.addChild(processBar);
processBar.getComponent('progressBar').updateShow(50000);
var puzzle = cc.instantiate(this.puzzlePrefab); var puzzle = cc.instantiate(this.puzzlePrefab);
this.part2.addChild(puzzle); this.part2.addChild(puzzle);
var tip = cc.instantiate(this.tipPrefab); var tip = cc.instantiate(this.tipPrefab);