This commit is contained in:
2025-08-03 08:52:33 +08:00
parent 4daac778a0
commit eff5f21d04
24 changed files with 42773 additions and 10011 deletions

View File

@@ -311,6 +311,7 @@ export class MissionComp extends CCComp {
oops.message.dispatchEvent(GameEvent.LuckCardUsed,card)
}
show_lucky_gold(card:any){
this.node.getChildByName("luckybox").getComponent(Animation).play("luckyopen")
var path = "game/gui/lcard";
var prefab: Prefab = oops.res.get(path, Prefab)!;
var node = instantiate(prefab);
@@ -319,11 +320,14 @@ export class MissionComp extends CCComp {
node.parent = this.node
node.setPosition(v3(this.node.getChildByName("luckybox").position.x,this.node.getChildByName("luckybox").position.y));
let height=this.node.getComponent(UITransform).height
tween(node) .to(0.5, {
tween(node) .to(1, {
scale: v3(1,1,1),
position: v3(0, height-300),
}, {easing:"backOut"})
.start();
.start();
this.scheduleOnce(()=>{
this.node.getChildByName("luckybox").getComponent(Animation).play("lucky")
},1)
}
private cleanComponents() {
ecs.query(ecs.allOf(HeroViewComp)).forEach(entity => {entity.remove(HeroViewComp);entity.destroy()});