This commit is contained in:
2024-08-07 17:22:25 +08:00
parent c19a6b5316
commit 0b2fb0030a
7 changed files with 1894 additions and 1199 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 114 B

View File

@@ -0,0 +1,134 @@
{
"ver": "1.0.26",
"importer": "image",
"imported": true,
"uuid": "ae2de04e-e5d2-462e-890d-1d1341c4f70a",
"files": [
".json",
".png"
],
"subMetas": {
"6c48a": {
"importer": "texture",
"uuid": "ae2de04e-e5d2-462e-890d-1d1341c4f70a@6c48a",
"displayName": "UI-02",
"id": "6c48a",
"name": "texture",
"userData": {
"wrapModeS": "clamp-to-edge",
"wrapModeT": "clamp-to-edge",
"minfilter": "linear",
"magfilter": "linear",
"mipfilter": "none",
"anisotropy": 0,
"isUuid": true,
"imageUuidOrDatabaseUri": "ae2de04e-e5d2-462e-890d-1d1341c4f70a",
"visible": false
},
"ver": "1.0.22",
"imported": true,
"files": [
".json"
],
"subMetas": {}
},
"f9941": {
"importer": "sprite-frame",
"uuid": "ae2de04e-e5d2-462e-890d-1d1341c4f70a@f9941",
"displayName": "UI-02",
"id": "f9941",
"name": "spriteFrame",
"userData": {
"trimType": "auto",
"trimThreshold": 1,
"rotated": false,
"offsetX": 0,
"offsetY": 0,
"trimX": 0,
"trimY": 0,
"width": 105,
"height": 10,
"rawWidth": 105,
"rawHeight": 10,
"borderTop": 0,
"borderBottom": 0,
"borderLeft": 0,
"borderRight": 0,
"packable": true,
"pixelsToUnit": 100,
"pivotX": 0.5,
"pivotY": 0.5,
"meshType": 0,
"vertices": {
"rawPosition": [
-52.5,
-5,
0,
52.5,
-5,
0,
-52.5,
5,
0,
52.5,
5,
0
],
"indexes": [
0,
1,
2,
2,
1,
3
],
"uv": [
0,
10,
105,
10,
0,
0,
105,
0
],
"nuv": [
0,
0,
1,
0,
0,
1,
1,
1
],
"minPos": [
-52.5,
-5,
0
],
"maxPos": [
52.5,
5,
0
]
},
"isUuid": true,
"imageUuidOrDatabaseUri": "ae2de04e-e5d2-462e-890d-1d1341c4f70a@6c48a",
"atlasUuid": ""
},
"ver": "1.0.12",
"imported": true,
"files": [
".json"
],
"subMetas": {}
}
},
"userData": {
"hasAlpha": true,
"type": "sprite-frame",
"fixAlphaTransparencyArtifacts": false,
"redirect": "ae2de04e-e5d2-462e-890d-1d1341c4f70a@f9941"
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 231 B

View File

@@ -0,0 +1,134 @@
{
"ver": "1.0.26",
"importer": "image",
"imported": true,
"uuid": "0f012cca-4741-4d33-85c6-55e9e8183a67",
"files": [
".json",
".png"
],
"subMetas": {
"6c48a": {
"importer": "texture",
"uuid": "0f012cca-4741-4d33-85c6-55e9e8183a67@6c48a",
"displayName": "UI-03",
"id": "6c48a",
"name": "texture",
"userData": {
"wrapModeS": "clamp-to-edge",
"wrapModeT": "clamp-to-edge",
"minfilter": "linear",
"magfilter": "linear",
"mipfilter": "none",
"anisotropy": 0,
"isUuid": true,
"imageUuidOrDatabaseUri": "0f012cca-4741-4d33-85c6-55e9e8183a67",
"visible": false
},
"ver": "1.0.22",
"imported": true,
"files": [
".json"
],
"subMetas": {}
},
"f9941": {
"importer": "sprite-frame",
"uuid": "0f012cca-4741-4d33-85c6-55e9e8183a67@f9941",
"displayName": "UI-03",
"id": "f9941",
"name": "spriteFrame",
"userData": {
"trimType": "auto",
"trimThreshold": 1,
"rotated": false,
"offsetX": 0,
"offsetY": 0,
"trimX": 0,
"trimY": 0,
"width": 111,
"height": 16,
"rawWidth": 111,
"rawHeight": 16,
"borderTop": 0,
"borderBottom": 0,
"borderLeft": 0,
"borderRight": 0,
"packable": true,
"pixelsToUnit": 100,
"pivotX": 0.5,
"pivotY": 0.5,
"meshType": 0,
"vertices": {
"rawPosition": [
-55.5,
-8,
0,
55.5,
-8,
0,
-55.5,
8,
0,
55.5,
8,
0
],
"indexes": [
0,
1,
2,
2,
1,
3
],
"uv": [
0,
16,
111,
16,
0,
0,
111,
0
],
"nuv": [
0,
0,
1,
0,
0,
1,
1,
1
],
"minPos": [
-55.5,
-8,
0
],
"maxPos": [
55.5,
8,
0
]
},
"isUuid": true,
"imageUuidOrDatabaseUri": "0f012cca-4741-4d33-85c6-55e9e8183a67@6c48a",
"atlasUuid": ""
},
"ver": "1.0.12",
"imported": true,
"files": [
".json"
],
"subMetas": {}
}
},
"userData": {
"hasAlpha": true,
"type": "sprite-frame",
"fixAlphaTransparencyArtifacts": false,
"redirect": "0f012cca-4741-4d33-85c6-55e9e8183a67@f9941"
}
}

File diff suppressed because it is too large Load Diff

View File

@@ -54,6 +54,11 @@ export class SingletonModuleComp extends ecs.Comp {
max: 20,
speed:1,
},
gold_add: {
min: 0,
max: 10,
speed:2,
},
};
vmAdd() {

View File

@@ -28,7 +28,6 @@ export class MapViewComp extends CCComp {
onLoad(){
// 监听全局事件
oops.message.on("monster_load", this.onMonsterLoaded, this);
this.addHero();
}
private onMonsterLoaded(event: string, args: any) {
// console.log('on_monster_load');
@@ -46,10 +45,21 @@ export class MapViewComp extends CCComp {
protected update(dt: number): void {
this.shuaxin(dt)
this.gold_add(dt)
}
private mapLoaded() {
}
gold_add(dt: number) {
smc.vm_data.gold_add.min += smc.vm_data.gold_add.speed*dt;
if (smc.vm_data.gold_add.min >= smc.vm_data.gold_add.max) {
smc.vm_data.gold_add.min = 0;
if (smc.vm_data.gold.min < smc.vm_data.gold.max) {
smc.vm_data.gold.min = smc.vm_data.gold.min + 1
}
}
}
shuaxin(dt: number) {
smc.vm_data.shuaxin.min += smc.vm_data.shuaxin.speed*dt;