| 123456789101112131415161718192021222324 |
- import { UIViewID } from '@scripts/define/UIDefine';
- import { UICloseReason } from '@scripts/framework/ui/UILayer';
- import { UIView } from '@scripts/framework/ui/UIView';
- import { _decorator, Component, Node, Tween, tween } from 'cc';
- const { ccclass, property } = _decorator;
- @ccclass('LoadingView')
- export class LoadingView extends UIView {
- readonly viewId = UIViewID.LoadingView;
- @property(Node)
- circleNode: Node = null;
- protected onOpen(_params: unknown): void | Promise<void> {
- Tween.stopAllByTarget(this.circleNode);
- tween(this.circleNode).by(0.5, { angle: 50 }).repeatForever().start();
- }
- protected onClose(_reason: UICloseReason): void | Promise<void> {
- Tween.stopAllByTarget(this.circleNode);
- }
- }
|