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