@cc-component/cc-core 1.5.7 → 1.5.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -1,44 +1,44 @@
|
|
|
1
|
-
import { _decorator, Component, find, Label, Node, Tween, tween, v3 } from 'cc';
|
|
2
|
-
const { ccclass, property } = _decorator;
|
|
3
|
-
|
|
4
|
-
@ccclass('LoadingWindow')
|
|
5
|
-
export class LoadingWindow extends Component {
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
}
|
|
1
|
+
// import { _decorator, Component, find, Label, Node, Tween, tween, v3 } from 'cc';
|
|
2
|
+
// const { ccclass, property } = _decorator;
|
|
3
|
+
|
|
4
|
+
// @ccclass('LoadingWindow')
|
|
5
|
+
// export class LoadingWindow extends Component {
|
|
6
|
+
|
|
7
|
+
// message: Label;
|
|
8
|
+
// loadingSpin: Node
|
|
9
|
+
// loadingSpin2: Node
|
|
10
|
+
|
|
11
|
+
// protected onLoad(): void {
|
|
12
|
+
// this.InitView()
|
|
13
|
+
// }
|
|
14
|
+
// InitView() {
|
|
15
|
+
// this.message = find("root/Label", this.node).getComponent(Label);
|
|
16
|
+
// this.loadingSpin = find("root/loadingSpin", this.node)
|
|
17
|
+
// this.loadingSpin2 = find("root/Loading Wheel", this.node)
|
|
18
|
+
// this.Show("")
|
|
19
|
+
// this.node.active = false
|
|
20
|
+
// }
|
|
21
|
+
|
|
22
|
+
// Show(message: string) {
|
|
23
|
+
// this.node.active = true;
|
|
24
|
+
// this.StartAnim()
|
|
25
|
+
// this.message.string = message === "" ? "加载中 请稍等..." : message;
|
|
26
|
+
// }
|
|
27
|
+
|
|
28
|
+
// Hide() {
|
|
29
|
+
// Tween.stopAllByTarget(this.node)
|
|
30
|
+
// this.node.active = false;
|
|
31
|
+
// }
|
|
32
|
+
|
|
33
|
+
|
|
34
|
+
// StartAnim() {
|
|
35
|
+
// Tween.stopAllByTarget(this.node)
|
|
36
|
+
// tween(this.loadingSpin)
|
|
37
|
+
// .repeatForever(
|
|
38
|
+
// tween().by(1, { eulerAngles: v3(0, 0, -360) }) // 每次旋转360度
|
|
39
|
+
// )
|
|
40
|
+
// .start();
|
|
41
|
+
// }
|
|
42
|
+
|
|
43
|
+
// }
|
|
44
44
|
|