Files
18xchat/assets/Scripts/chat18x/uiitems/LoadingItem.ts
T
2025-09-11 12:31:10 +08:00

20 lines
417 B
TypeScript

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();
}
}
}