云环境和本地调试 添加
This commit is contained in:
@@ -1,18 +1,13 @@
|
||||
import { _decorator, Component, Node, sp } from 'cc';
|
||||
import { _decorator, Component, Node } from 'cc';
|
||||
const { ccclass, property ,} = _decorator;
|
||||
|
||||
@ccclass('once')
|
||||
export class once extends Component {
|
||||
private spine!: sp.Skeleton;
|
||||
|
||||
start() {
|
||||
this.spine.setAnimation(0, "animation", true);
|
||||
}
|
||||
protected onLoad(): void {
|
||||
this.spine = this.node.getChildByName("skill").getComponent(sp.Skeleton)!;
|
||||
this.spine.setCompleteListener(trackEntry => {
|
||||
if(this.node.isValid) this.node.active = false;
|
||||
});
|
||||
|
||||
|
||||
}
|
||||
update(deltaTime: number) {
|
||||
|
||||
Reference in New Issue
Block a user