消消方块阵换皮表情
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

28 lines
689 B

import { _decorator, Component, Label, Node, tween, Vec3 } from 'cc';
const { ccclass, property } = _decorator;
@ccclass('CoinFly')
export class CoinFly extends Component {
protected onLoad(): void {
}
flyAni(endPos:Vec3, callfunc = null){
tween(this.node)
.by(0.5, { y:50 }, { easing: 'backOut' })
.by(0.5, { y:-50 }, { easing: 'backOut' })
.delay(0.3)
.to(0.1+Math.random() * 0.1, { worldPosition: endPos })
.call(() => {
if(callfunc){
callfunc()
}
gg.res.putNode(this.node)
})
.start();
}
}