|
@@ -396,6 +396,11 @@ cc.Class({
|
|
let propNode = cc.instantiate(this.propPrefab)
|
|
let propNode = cc.instantiate(this.propPrefab)
|
|
this.propScript = propNode.getComponent('LevelHomePropItem')
|
|
this.propScript = propNode.getComponent('LevelHomePropItem')
|
|
this.propWrap.addChild(propNode);
|
|
this.propWrap.addChild(propNode);
|
|
|
|
+ this.hideProp();
|
|
|
|
+ },
|
|
|
|
+
|
|
|
|
+ hideProp() {
|
|
|
|
+ this.isHasProp = false;
|
|
this.propScript.node.position = cc.v2(150, -108);
|
|
this.propScript.node.position = cc.v2(150, -108);
|
|
this.propScript.node.active = false;
|
|
this.propScript.node.active = false;
|
|
this.propScript.isPlay = false;
|
|
this.propScript.isPlay = false;
|
|
@@ -407,12 +412,10 @@ cc.Class({
|
|
if (!this.isHasProp) {
|
|
if (!this.isHasProp) {
|
|
this.isHasProp = true;
|
|
this.isHasProp = true;
|
|
this.propScript.init(this.buildingInfo.buildingId, propData, (showFrame, showText) => {
|
|
this.propScript.init(this.buildingInfo.buildingId, propData, (showFrame, showText) => {
|
|
- this.isHasProp = false;
|
|
|
|
// 显示领取动画
|
|
// 显示领取动画
|
|
this.parent.showActGift(showFrame, showText)
|
|
this.parent.showActGift(showFrame, showText)
|
|
|
|
|
|
- this.propScript.node.active = false;
|
|
|
|
- this.propScript.node.position = cc.v2(150, -108);
|
|
|
|
|
|
+ this.hideProp();
|
|
});
|
|
});
|
|
if (isPlayAnimation) {
|
|
if (isPlayAnimation) {
|
|
this.propScript.showAnimation();
|
|
this.propScript.showAnimation();
|
|
@@ -676,6 +679,7 @@ cc.Class({
|
|
this.totalRate = 0;
|
|
this.totalRate = 0;
|
|
this.lockNode.active = true;
|
|
this.lockNode.active = true;
|
|
this.costLabel.string = 0;
|
|
this.costLabel.string = 0;
|
|
|
|
+ this.hideProp();
|
|
|
|
|
|
this.unLockBuildName.string = `<b><color=#ffffff>${buildingInfo.name}</c></b>`;
|
|
this.unLockBuildName.string = `<b><color=#ffffff>${buildingInfo.name}</c></b>`;
|
|
this.unlockRichText.string = `<img src='alert_coin'/><b><color=#ffffff> ${DWTool.coinParse(buildingInfo.unlockScore)}</c><b/>`;
|
|
this.unlockRichText.string = `<img src='alert_coin'/><b><color=#ffffff> ${DWTool.coinParse(buildingInfo.unlockScore)}</c><b/>`;
|