ui添加
This commit is contained in:
@@ -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()});
|
||||
|
||||
Reference in New Issue
Block a user