@cc-component/cc-core 1.1.6 → 1.1.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,14 +1,11 @@
|
|
|
1
1
|
import { _decorator, Component, Node, Size, UITransform, v2, Vec2 } from 'cc';
|
|
2
|
-
import { ViewSearch, vsearch } from '../lib/old/ViewSearch';
|
|
3
2
|
const { ccclass, property } = _decorator;
|
|
4
3
|
|
|
5
|
-
|
|
4
|
+
|
|
6
5
|
@ccclass('BaseBoxView')
|
|
7
6
|
export class BaseBoxView extends Component {
|
|
8
7
|
box_size: any = { width: 100, height: 100 };//获取碰撞盒大小
|
|
9
|
-
@vsearch(Node)
|
|
10
8
|
box_node: Node;
|
|
11
|
-
@vsearch(Node)
|
|
12
9
|
box_center: Node;
|
|
13
10
|
box_node_ut: UITransform;
|
|
14
11
|
|
|
@@ -24,16 +21,16 @@ export class BaseBoxView extends Component {
|
|
|
24
21
|
|
|
25
22
|
|
|
26
23
|
UpdateBox(target: Node) {
|
|
27
|
-
const data = CommonModule.Get_MapCenter().map_view.GetMapModel(0, 0)
|
|
28
|
-
target = data.node;
|
|
29
|
-
if (this.box_node) {
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
}
|
|
24
|
+
// const data = CommonModule.Get_MapCenter().map_view.GetMapModel(0, 0)
|
|
25
|
+
// target = data.node;
|
|
26
|
+
// if (this.box_node) {
|
|
27
|
+
// this.box_node.scale = target.scale;
|
|
28
|
+
// const targetUT = target.getComponent(UITransform);
|
|
29
|
+
// this.box_node_ut.anchorPoint = v2(0.5, 0);
|
|
30
|
+
// this.box_node_ut.contentSize = new Size(targetUT.contentSize.width, targetUT.contentSize.height);
|
|
31
|
+
// this.box_size.width = this.box_node_ut.width;
|
|
32
|
+
// this.box_size.height = this.box_node_ut.height;
|
|
33
|
+
// }
|
|
37
34
|
}
|
|
38
35
|
// Collision(target_enemy: BoxView) {
|
|
39
36
|
// const box1 = this.GetBox(this);
|
|
@@ -3,7 +3,6 @@ import { _decorator, CCString, Component, Enum, instantiate, Node, Prefab } from
|
|
|
3
3
|
import { ISceneParam } from '../interface/ISceneParam';
|
|
4
4
|
import { DEBUG } from 'cc/env';
|
|
5
5
|
import { ResourceManager } from './ResourceManager';
|
|
6
|
-
import { ProgessView } from './ProgessWindow';
|
|
7
6
|
import { AssetType, BundleConfig, BundleConfigName, GetAssetType } from '../config/CommonEnum';
|
|
8
7
|
import { LanguageData } from '../lib/language/LanguageData';
|
|
9
8
|
const { ccclass, property } = _decorator;
|
|
@@ -41,7 +40,6 @@ export abstract class BaseLoading extends Component {
|
|
|
41
40
|
const bundleName = BundleConfig[first?.bundleName] ?? BundleConfigName.home
|
|
42
41
|
MainModule.gui.setBundleName(bundleName)
|
|
43
42
|
this.setLanguage()
|
|
44
|
-
MainModule.RegisterModule(this.RegisterModule())
|
|
45
43
|
this.Init();
|
|
46
44
|
}
|
|
47
45
|
|
|
@@ -94,9 +92,6 @@ export abstract class BaseLoading extends Component {
|
|
|
94
92
|
// 抽象方法:子类实现自己的逻辑
|
|
95
93
|
abstract Finish(): Promise<void>; // 推荐加 async/await 支持
|
|
96
94
|
|
|
97
|
-
/**注册模块,返回你的模块 构造函数 */
|
|
98
|
-
abstract RegisterModule(): any
|
|
99
|
-
|
|
100
95
|
}
|
|
101
96
|
|
|
102
97
|
|