update
This commit is contained in:
@@ -0,0 +1,19 @@
|
||||
import { _decorator, Animation, Component, Node } from "cc";
|
||||
const { ccclass, property } = _decorator;
|
||||
|
||||
@ccclass("LoadingItem")
|
||||
export class LoadingItem extends Component {
|
||||
@property(Animation)
|
||||
animation: Animation;
|
||||
protected onEnable(): void {
|
||||
if (this.animation) {
|
||||
this.animation.play();
|
||||
}
|
||||
}
|
||||
|
||||
protected onDisable(): void {
|
||||
if (this.animation) {
|
||||
this.animation.pause();
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user