@cc-component/cc-core 1.5.7 → 1.5.9

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
- 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
- }
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
 
@@ -308,11 +308,11 @@ export class ResourceManager {
308
308
  return new Promise<T>((resolve, reject) => {
309
309
  bundle.load(path, type, (err, asset) => {
310
310
  if (err) {
311
- console.error(`${bundleName}-加载资源失败: ${path}`);
311
+ Logger.error(`${bundleName}-加载资源失败: ${path}`);
312
312
  resolve(null);
313
313
  return;
314
314
  }
315
- Logger.debug('--加载', path)
315
+ //Logger.debug('--加载', path)
316
316
  // 记录加载的资源
317
317
  ResourceManager.instance.trackAsset(path, asset, bundleName);
318
318
  ResourceManager.instance.LogAssets(bundleName)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cc-component/cc-core",
3
- "version": "1.5.7",
3
+ "version": "1.5.9",
4
4
  "engine": ">=3.8.6",
5
5
  "description": "系统组件添加常用扩展方法",
6
6
  "main": "index.ts",