去掉了item+ 小强化 动画

This commit is contained in:
2025-08-01 23:32:39 +08:00
parent 3c349f4195
commit 9d0fdfc0f8
17 changed files with 3128 additions and 9467 deletions

View File

@@ -0,0 +1,32 @@
import { _decorator, Animation, Component, Node, tween, v3 } from 'cc';
const { ccclass, property } = _decorator;
@ccclass('LuckCardComp')
export class LuckCardComp extends Component {
timer:number=3;
start() {
this.timer=2
console.log("[LuckCardComp]:start")
}
update(deltaTime: number) {
this.timer-=deltaTime
if(this.timer<=0){
let anim=this.node.getComponent(Animation)
if(anim) anim.play("luckcardend")
this.do_destroy()
this.timer=2
}
}
do_destroy(){
tween(this.node)
.to(0.2, {
scale: v3(2,2,0),
}, {onComplete:()=>{
this.node.destroy()
}})
.start();
}
}