dd
This commit is contained in:
BIN
assets/resources/gui/gui/UI-16.png
Normal file
BIN
assets/resources/gui/gui/UI-16.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 1.2 KiB |
134
assets/resources/gui/gui/UI-16.png.meta
Normal file
134
assets/resources/gui/gui/UI-16.png.meta
Normal file
@@ -0,0 +1,134 @@
|
||||
{
|
||||
"ver": "1.0.26",
|
||||
"importer": "image",
|
||||
"imported": true,
|
||||
"uuid": "eac8f388-79c5-438f-9602-d9bdac7a5d12",
|
||||
"files": [
|
||||
".json",
|
||||
".png"
|
||||
],
|
||||
"subMetas": {
|
||||
"6c48a": {
|
||||
"importer": "texture",
|
||||
"uuid": "eac8f388-79c5-438f-9602-d9bdac7a5d12@6c48a",
|
||||
"displayName": "UI-16",
|
||||
"id": "6c48a",
|
||||
"name": "texture",
|
||||
"userData": {
|
||||
"wrapModeS": "clamp-to-edge",
|
||||
"wrapModeT": "clamp-to-edge",
|
||||
"minfilter": "linear",
|
||||
"magfilter": "linear",
|
||||
"mipfilter": "none",
|
||||
"anisotropy": 0,
|
||||
"isUuid": true,
|
||||
"imageUuidOrDatabaseUri": "eac8f388-79c5-438f-9602-d9bdac7a5d12",
|
||||
"visible": false
|
||||
},
|
||||
"ver": "1.0.22",
|
||||
"imported": true,
|
||||
"files": [
|
||||
".json"
|
||||
],
|
||||
"subMetas": {}
|
||||
},
|
||||
"f9941": {
|
||||
"importer": "sprite-frame",
|
||||
"uuid": "eac8f388-79c5-438f-9602-d9bdac7a5d12@f9941",
|
||||
"displayName": "UI-16",
|
||||
"id": "f9941",
|
||||
"name": "spriteFrame",
|
||||
"userData": {
|
||||
"trimType": "auto",
|
||||
"trimThreshold": 1,
|
||||
"rotated": false,
|
||||
"offsetX": 0,
|
||||
"offsetY": 0,
|
||||
"trimX": 0,
|
||||
"trimY": 0,
|
||||
"width": 197,
|
||||
"height": 22,
|
||||
"rawWidth": 197,
|
||||
"rawHeight": 22,
|
||||
"borderTop": 0,
|
||||
"borderBottom": 0,
|
||||
"borderLeft": 4,
|
||||
"borderRight": 3,
|
||||
"packable": true,
|
||||
"pixelsToUnit": 100,
|
||||
"pivotX": 0.5,
|
||||
"pivotY": 0.5,
|
||||
"meshType": 0,
|
||||
"vertices": {
|
||||
"rawPosition": [
|
||||
-98.5,
|
||||
-11,
|
||||
0,
|
||||
98.5,
|
||||
-11,
|
||||
0,
|
||||
-98.5,
|
||||
11,
|
||||
0,
|
||||
98.5,
|
||||
11,
|
||||
0
|
||||
],
|
||||
"indexes": [
|
||||
0,
|
||||
1,
|
||||
2,
|
||||
2,
|
||||
1,
|
||||
3
|
||||
],
|
||||
"uv": [
|
||||
0,
|
||||
22,
|
||||
197,
|
||||
22,
|
||||
0,
|
||||
0,
|
||||
197,
|
||||
0
|
||||
],
|
||||
"nuv": [
|
||||
0,
|
||||
0,
|
||||
1,
|
||||
0,
|
||||
0,
|
||||
1,
|
||||
1,
|
||||
1
|
||||
],
|
||||
"minPos": [
|
||||
-98.5,
|
||||
-11,
|
||||
0
|
||||
],
|
||||
"maxPos": [
|
||||
98.5,
|
||||
11,
|
||||
0
|
||||
]
|
||||
},
|
||||
"isUuid": true,
|
||||
"imageUuidOrDatabaseUri": "eac8f388-79c5-438f-9602-d9bdac7a5d12@6c48a",
|
||||
"atlasUuid": ""
|
||||
},
|
||||
"ver": "1.0.12",
|
||||
"imported": true,
|
||||
"files": [
|
||||
".json"
|
||||
],
|
||||
"subMetas": {}
|
||||
}
|
||||
},
|
||||
"userData": {
|
||||
"hasAlpha": true,
|
||||
"type": "sprite-frame",
|
||||
"fixAlphaTransparencyArtifacts": false,
|
||||
"redirect": "eac8f388-79c5-438f-9602-d9bdac7a5d12@f9941"
|
||||
}
|
||||
}
|
||||
BIN
assets/resources/gui/gui/UI-17.png
Normal file
BIN
assets/resources/gui/gui/UI-17.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 1.6 KiB |
134
assets/resources/gui/gui/UI-17.png.meta
Normal file
134
assets/resources/gui/gui/UI-17.png.meta
Normal file
@@ -0,0 +1,134 @@
|
||||
{
|
||||
"ver": "1.0.26",
|
||||
"importer": "image",
|
||||
"imported": true,
|
||||
"uuid": "9716cf6d-cc08-452b-8c72-13d63c89aac2",
|
||||
"files": [
|
||||
".json",
|
||||
".png"
|
||||
],
|
||||
"subMetas": {
|
||||
"6c48a": {
|
||||
"importer": "texture",
|
||||
"uuid": "9716cf6d-cc08-452b-8c72-13d63c89aac2@6c48a",
|
||||
"displayName": "UI-17",
|
||||
"id": "6c48a",
|
||||
"name": "texture",
|
||||
"userData": {
|
||||
"wrapModeS": "clamp-to-edge",
|
||||
"wrapModeT": "clamp-to-edge",
|
||||
"minfilter": "linear",
|
||||
"magfilter": "linear",
|
||||
"mipfilter": "none",
|
||||
"anisotropy": 0,
|
||||
"isUuid": true,
|
||||
"imageUuidOrDatabaseUri": "9716cf6d-cc08-452b-8c72-13d63c89aac2",
|
||||
"visible": false
|
||||
},
|
||||
"ver": "1.0.22",
|
||||
"imported": true,
|
||||
"files": [
|
||||
".json"
|
||||
],
|
||||
"subMetas": {}
|
||||
},
|
||||
"f9941": {
|
||||
"importer": "sprite-frame",
|
||||
"uuid": "9716cf6d-cc08-452b-8c72-13d63c89aac2@f9941",
|
||||
"displayName": "UI-17",
|
||||
"id": "f9941",
|
||||
"name": "spriteFrame",
|
||||
"userData": {
|
||||
"trimType": "auto",
|
||||
"trimThreshold": 1,
|
||||
"rotated": false,
|
||||
"offsetX": 0,
|
||||
"offsetY": 0,
|
||||
"trimX": 0,
|
||||
"trimY": 0,
|
||||
"width": 191,
|
||||
"height": 16,
|
||||
"rawWidth": 191,
|
||||
"rawHeight": 16,
|
||||
"borderTop": 0,
|
||||
"borderBottom": 0,
|
||||
"borderLeft": 0,
|
||||
"borderRight": 0,
|
||||
"packable": true,
|
||||
"pixelsToUnit": 100,
|
||||
"pivotX": 0.5,
|
||||
"pivotY": 0.5,
|
||||
"meshType": 0,
|
||||
"vertices": {
|
||||
"rawPosition": [
|
||||
-95.5,
|
||||
-8,
|
||||
0,
|
||||
95.5,
|
||||
-8,
|
||||
0,
|
||||
-95.5,
|
||||
8,
|
||||
0,
|
||||
95.5,
|
||||
8,
|
||||
0
|
||||
],
|
||||
"indexes": [
|
||||
0,
|
||||
1,
|
||||
2,
|
||||
2,
|
||||
1,
|
||||
3
|
||||
],
|
||||
"uv": [
|
||||
0,
|
||||
16,
|
||||
191,
|
||||
16,
|
||||
0,
|
||||
0,
|
||||
191,
|
||||
0
|
||||
],
|
||||
"nuv": [
|
||||
0,
|
||||
0,
|
||||
1,
|
||||
0,
|
||||
0,
|
||||
1,
|
||||
1,
|
||||
1
|
||||
],
|
||||
"minPos": [
|
||||
-95.5,
|
||||
-8,
|
||||
0
|
||||
],
|
||||
"maxPos": [
|
||||
95.5,
|
||||
8,
|
||||
0
|
||||
]
|
||||
},
|
||||
"isUuid": true,
|
||||
"imageUuidOrDatabaseUri": "9716cf6d-cc08-452b-8c72-13d63c89aac2@6c48a",
|
||||
"atlasUuid": ""
|
||||
},
|
||||
"ver": "1.0.12",
|
||||
"imported": true,
|
||||
"files": [
|
||||
".json"
|
||||
],
|
||||
"subMetas": {}
|
||||
}
|
||||
},
|
||||
"userData": {
|
||||
"hasAlpha": true,
|
||||
"type": "sprite-frame",
|
||||
"fixAlphaTransparencyArtifacts": false,
|
||||
"redirect": "9716cf6d-cc08-452b-8c72-13d63c89aac2@f9941"
|
||||
}
|
||||
}
|
||||
@@ -50,10 +50,10 @@
|
||||
"height": 220,
|
||||
"rawWidth": 220,
|
||||
"rawHeight": 220,
|
||||
"borderTop": 0,
|
||||
"borderBottom": 0,
|
||||
"borderLeft": 0,
|
||||
"borderRight": 0,
|
||||
"borderTop": 32,
|
||||
"borderBottom": 32,
|
||||
"borderLeft": 32,
|
||||
"borderRight": 32,
|
||||
"packable": true,
|
||||
"pixelsToUnit": 100,
|
||||
"pivotX": 0.5,
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -38,7 +38,7 @@ export class SingletonModuleComp extends ecs.Comp {
|
||||
/** 下级经验 */
|
||||
speed : 0,
|
||||
hp: {
|
||||
min:30,
|
||||
min:20,
|
||||
max:30
|
||||
},
|
||||
power: {
|
||||
@@ -49,6 +49,11 @@ export class SingletonModuleComp extends ecs.Comp {
|
||||
min: 0,
|
||||
max: 10
|
||||
},
|
||||
shuaxin: {
|
||||
min: 0,
|
||||
max: 20,
|
||||
speed:1,
|
||||
},
|
||||
|
||||
};
|
||||
vmAdd() {
|
||||
|
||||
@@ -28,9 +28,10 @@ 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');
|
||||
// console.log('on_monster_load');
|
||||
}
|
||||
reset(): void {
|
||||
|
||||
@@ -43,16 +44,20 @@ export class MapViewComp extends CCComp {
|
||||
|
||||
/** 转场 */
|
||||
protected update(dt: number): void {
|
||||
if (this.timer.update(dt)) {
|
||||
// console.log('每2秒触发一次');
|
||||
this.addHero();
|
||||
}
|
||||
|
||||
this.shuaxin(dt)
|
||||
}
|
||||
|
||||
private mapLoaded() {
|
||||
|
||||
}
|
||||
|
||||
shuaxin(dt: number) {
|
||||
smc.vm_data.shuaxin.min += smc.vm_data.shuaxin.speed*dt;
|
||||
if (smc.vm_data.shuaxin.min >= smc.vm_data.shuaxin.max) {
|
||||
smc.vm_data.shuaxin.min = 0;
|
||||
this.addHero();
|
||||
}
|
||||
}
|
||||
/** 添加玩家 */
|
||||
private addHero() {
|
||||
this.scene.node.active = true
|
||||
|
||||
Reference in New Issue
Block a user