feat(地图): 在MissionCardComp中添加Lock节点控制

添加Lock节点属性并初始化其状态为true,用于控制任务卡片的锁定状态
This commit is contained in:
panw
2026-01-05 11:14:54 +08:00
parent a6b7abea54
commit e96d64a454
2 changed files with 1081 additions and 1003 deletions

View File

@@ -32,6 +32,9 @@ export class MissionCardComp extends CCComp {
@property(Node)
btnClose: Node = null!
@property(Node)
Lock: Node = null!
card1_data:any = null!
card2_data:any = null!
card3_data:any = null!
@@ -47,7 +50,7 @@ export class MissionCardComp extends CCComp {
oops.message.on(GameEvent.TalentSelect, this.onTalentSelect, this);
oops.message.on(GameEvent.ShopOpen, this.onShopOpen, this);
}
onDestroy() {
oops.message.off(GameEvent.TalentSelect, this.onTalentSelect, this);
oops.message.off(GameEvent.ShopOpen, this.onShopOpen, this);
@@ -57,6 +60,7 @@ export class MissionCardComp extends CCComp {
start() {
// 初始隐藏或显示逻辑
this.node.active = false;
this.Lock.active = true;
this.resetCardStates();
}