|
@@ -251,6 +251,7 @@ cc.Class({
|
|
GameEvent.off(GameNotificationKey.ResidentArtist, this);
|
|
GameEvent.off(GameNotificationKey.ResidentArtist, this);
|
|
GameEvent.off(GameNotificationKey.RefreshLevelHomeArtistList, this);
|
|
GameEvent.off(GameNotificationKey.RefreshLevelHomeArtistList, this);
|
|
GameEvent.off(GameNotificationKey.LevelHomeItemBuildingAllFull, this);
|
|
GameEvent.off(GameNotificationKey.LevelHomeItemBuildingAllFull, this);
|
|
|
|
+ GameEvent.off(GameNotificationKey.ReceiveLevelHomeItemPropUpdate, this);
|
|
},
|
|
},
|
|
|
|
|
|
setEventListener() {
|
|
setEventListener() {
|
|
@@ -325,6 +326,13 @@ cc.Class({
|
|
this.pickupCoinWithNoIncom(this.coinArray[i], showAnim);
|
|
this.pickupCoinWithNoIncom(this.coinArray[i], showAnim);
|
|
}
|
|
}
|
|
})
|
|
})
|
|
|
|
+
|
|
|
|
+ GameEvent.on(GameNotificationKey.ReceiveLevelHomeItemPropUpdate, this, (buildingItem) => {
|
|
|
|
+
|
|
|
|
+ if (buildingItem.buildingId != this.buildingInfo.buildingId) { return; }
|
|
|
|
+ console.log(buildingItem);
|
|
|
|
+ this.showProp(buildingItem.item);
|
|
|
|
+ });
|
|
},
|
|
},
|
|
|
|
|
|
// 解锁建筑事件
|
|
// 解锁建筑事件
|
|
@@ -398,10 +406,12 @@ 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.propScript = null;
|
|
|
|
this.isHasProp = false;
|
|
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);
|
|
});
|
|
});
|
|
if (isPlayAnimation) {
|
|
if (isPlayAnimation) {
|
|
this.propScript.showAnimation();
|
|
this.propScript.showAnimation();
|