Merge branch 'new' of https://e.coding.net/walker_pan/heros/heros into new
This commit is contained in:
@@ -38,22 +38,25 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"__id__": 94
|
"__id__": 94
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"__id__": 114
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"_active": true,
|
"_active": true,
|
||||||
"_components": [
|
"_components": [
|
||||||
{
|
{
|
||||||
"__id__": 114
|
"__id__": 121
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"__id__": 116
|
"__id__": 123
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"__id__": 118
|
"__id__": 125
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"_prefab": {
|
"_prefab": {
|
||||||
"__id__": 120
|
"__id__": 127
|
||||||
},
|
},
|
||||||
"_lpos": {
|
"_lpos": {
|
||||||
"__type__": "cc.Vec3",
|
"__type__": "cc.Vec3",
|
||||||
@@ -209,7 +212,7 @@
|
|||||||
"_contentSize": {
|
"_contentSize": {
|
||||||
"__type__": "cc.Size",
|
"__type__": "cc.Size",
|
||||||
"width": 110,
|
"width": 110,
|
||||||
"height": 115
|
"height": 110
|
||||||
},
|
},
|
||||||
"_anchorPoint": {
|
"_anchorPoint": {
|
||||||
"__type__": "cc.Vec2",
|
"__type__": "cc.Vec2",
|
||||||
@@ -384,7 +387,7 @@
|
|||||||
"_contentSize": {
|
"_contentSize": {
|
||||||
"__type__": "cc.Size",
|
"__type__": "cc.Size",
|
||||||
"width": 86,
|
"width": 86,
|
||||||
"height": 91
|
"height": 86
|
||||||
},
|
},
|
||||||
"_anchorPoint": {
|
"_anchorPoint": {
|
||||||
"__type__": "cc.Vec2",
|
"__type__": "cc.Vec2",
|
||||||
@@ -506,7 +509,7 @@
|
|||||||
"_contentSize": {
|
"_contentSize": {
|
||||||
"__type__": "cc.Size",
|
"__type__": "cc.Size",
|
||||||
"width": 110,
|
"width": 110,
|
||||||
"height": 115
|
"height": 110
|
||||||
},
|
},
|
||||||
"_anchorPoint": {
|
"_anchorPoint": {
|
||||||
"__type__": "cc.Vec2",
|
"__type__": "cc.Vec2",
|
||||||
@@ -702,7 +705,7 @@
|
|||||||
"_contentSize": {
|
"_contentSize": {
|
||||||
"__type__": "cc.Size",
|
"__type__": "cc.Size",
|
||||||
"width": 110,
|
"width": 110,
|
||||||
"height": 115
|
"height": 110
|
||||||
},
|
},
|
||||||
"_anchorPoint": {
|
"_anchorPoint": {
|
||||||
"__type__": "cc.Vec2",
|
"__type__": "cc.Vec2",
|
||||||
@@ -732,8 +735,8 @@
|
|||||||
"_dstBlendFactor": 4,
|
"_dstBlendFactor": 4,
|
||||||
"_color": {
|
"_color": {
|
||||||
"__type__": "cc.Color",
|
"__type__": "cc.Color",
|
||||||
"r": 44,
|
"r": 17,
|
||||||
"g": 190,
|
"g": 123,
|
||||||
"b": 255,
|
"b": 255,
|
||||||
"a": 255
|
"a": 255
|
||||||
},
|
},
|
||||||
@@ -877,7 +880,7 @@
|
|||||||
"_contentSize": {
|
"_contentSize": {
|
||||||
"__type__": "cc.Size",
|
"__type__": "cc.Size",
|
||||||
"width": 86,
|
"width": 86,
|
||||||
"height": 91
|
"height": 86
|
||||||
},
|
},
|
||||||
"_anchorPoint": {
|
"_anchorPoint": {
|
||||||
"__type__": "cc.Vec2",
|
"__type__": "cc.Vec2",
|
||||||
@@ -907,9 +910,9 @@
|
|||||||
"_dstBlendFactor": 4,
|
"_dstBlendFactor": 4,
|
||||||
"_color": {
|
"_color": {
|
||||||
"__type__": "cc.Color",
|
"__type__": "cc.Color",
|
||||||
"r": 0,
|
"r": 17,
|
||||||
"g": 168,
|
"g": 50,
|
||||||
"b": 255,
|
"b": 135,
|
||||||
"a": 255
|
"a": 255
|
||||||
},
|
},
|
||||||
"_spriteFrame": {
|
"_spriteFrame": {
|
||||||
@@ -999,7 +1002,7 @@
|
|||||||
"_contentSize": {
|
"_contentSize": {
|
||||||
"__type__": "cc.Size",
|
"__type__": "cc.Size",
|
||||||
"width": 110,
|
"width": 110,
|
||||||
"height": 115
|
"height": 110
|
||||||
},
|
},
|
||||||
"_anchorPoint": {
|
"_anchorPoint": {
|
||||||
"__type__": "cc.Vec2",
|
"__type__": "cc.Vec2",
|
||||||
@@ -1195,7 +1198,7 @@
|
|||||||
"_contentSize": {
|
"_contentSize": {
|
||||||
"__type__": "cc.Size",
|
"__type__": "cc.Size",
|
||||||
"width": 110,
|
"width": 110,
|
||||||
"height": 115
|
"height": 110
|
||||||
},
|
},
|
||||||
"_anchorPoint": {
|
"_anchorPoint": {
|
||||||
"__type__": "cc.Vec2",
|
"__type__": "cc.Vec2",
|
||||||
@@ -1225,9 +1228,9 @@
|
|||||||
"_dstBlendFactor": 4,
|
"_dstBlendFactor": 4,
|
||||||
"_color": {
|
"_color": {
|
||||||
"__type__": "cc.Color",
|
"__type__": "cc.Color",
|
||||||
"r": 224,
|
"r": 241,
|
||||||
"g": 195,
|
"g": 154,
|
||||||
"b": 0,
|
"b": 2,
|
||||||
"a": 255
|
"a": 255
|
||||||
},
|
},
|
||||||
"_spriteFrame": {
|
"_spriteFrame": {
|
||||||
@@ -1370,7 +1373,7 @@
|
|||||||
"_contentSize": {
|
"_contentSize": {
|
||||||
"__type__": "cc.Size",
|
"__type__": "cc.Size",
|
||||||
"width": 86,
|
"width": 86,
|
||||||
"height": 91
|
"height": 86
|
||||||
},
|
},
|
||||||
"_anchorPoint": {
|
"_anchorPoint": {
|
||||||
"__type__": "cc.Vec2",
|
"__type__": "cc.Vec2",
|
||||||
@@ -1400,9 +1403,9 @@
|
|||||||
"_dstBlendFactor": 4,
|
"_dstBlendFactor": 4,
|
||||||
"_color": {
|
"_color": {
|
||||||
"__type__": "cc.Color",
|
"__type__": "cc.Color",
|
||||||
"r": 219,
|
"r": 142,
|
||||||
"g": 173,
|
"g": 49,
|
||||||
"b": 0,
|
"b": 16,
|
||||||
"a": 255
|
"a": 255
|
||||||
},
|
},
|
||||||
"_spriteFrame": {
|
"_spriteFrame": {
|
||||||
@@ -1492,7 +1495,7 @@
|
|||||||
"_contentSize": {
|
"_contentSize": {
|
||||||
"__type__": "cc.Size",
|
"__type__": "cc.Size",
|
||||||
"width": 110,
|
"width": 110,
|
||||||
"height": 115
|
"height": 110
|
||||||
},
|
},
|
||||||
"_anchorPoint": {
|
"_anchorPoint": {
|
||||||
"__type__": "cc.Vec2",
|
"__type__": "cc.Vec2",
|
||||||
@@ -1888,8 +1891,8 @@
|
|||||||
},
|
},
|
||||||
"_lpos": {
|
"_lpos": {
|
||||||
"__type__": "cc.Vec3",
|
"__type__": "cc.Vec3",
|
||||||
"x": 34.517,
|
"x": 40.798,
|
||||||
"y": -42.277,
|
"y": -37,
|
||||||
"z": 0
|
"z": 0
|
||||||
},
|
},
|
||||||
"_lrot": {
|
"_lrot": {
|
||||||
@@ -2047,8 +2050,8 @@
|
|||||||
},
|
},
|
||||||
"_lpos": {
|
"_lpos": {
|
||||||
"__type__": "cc.Vec3",
|
"__type__": "cc.Vec3",
|
||||||
"x": -39.118,
|
"x": -40.837,
|
||||||
"y": -44.831,
|
"y": -37,
|
||||||
"z": 0
|
"z": 0
|
||||||
},
|
},
|
||||||
"_lrot": {
|
"_lrot": {
|
||||||
@@ -2600,6 +2603,167 @@
|
|||||||
"targetOverrides": null,
|
"targetOverrides": null,
|
||||||
"nestedPrefabInstanceRoots": null
|
"nestedPrefabInstanceRoots": null
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"__type__": "cc.Node",
|
||||||
|
"_name": "btn",
|
||||||
|
"_objFlags": 0,
|
||||||
|
"__editorExtras__": {},
|
||||||
|
"_parent": {
|
||||||
|
"__id__": 1
|
||||||
|
},
|
||||||
|
"_children": [],
|
||||||
|
"_active": true,
|
||||||
|
"_components": [
|
||||||
|
{
|
||||||
|
"__id__": 115
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"__id__": 117
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"_prefab": {
|
||||||
|
"__id__": 120
|
||||||
|
},
|
||||||
|
"_lpos": {
|
||||||
|
"__type__": "cc.Vec3",
|
||||||
|
"x": 0,
|
||||||
|
"y": 0,
|
||||||
|
"z": 0
|
||||||
|
},
|
||||||
|
"_lrot": {
|
||||||
|
"__type__": "cc.Quat",
|
||||||
|
"x": 0,
|
||||||
|
"y": 0,
|
||||||
|
"z": 0,
|
||||||
|
"w": 1
|
||||||
|
},
|
||||||
|
"_lscale": {
|
||||||
|
"__type__": "cc.Vec3",
|
||||||
|
"x": 1,
|
||||||
|
"y": 1,
|
||||||
|
"z": 1
|
||||||
|
},
|
||||||
|
"_mobility": 0,
|
||||||
|
"_layer": 1073741824,
|
||||||
|
"_euler": {
|
||||||
|
"__type__": "cc.Vec3",
|
||||||
|
"x": 0,
|
||||||
|
"y": 0,
|
||||||
|
"z": 0
|
||||||
|
},
|
||||||
|
"_id": ""
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"__type__": "cc.UITransform",
|
||||||
|
"_name": "",
|
||||||
|
"_objFlags": 0,
|
||||||
|
"__editorExtras__": {},
|
||||||
|
"node": {
|
||||||
|
"__id__": 114
|
||||||
|
},
|
||||||
|
"_enabled": true,
|
||||||
|
"__prefab": {
|
||||||
|
"__id__": 116
|
||||||
|
},
|
||||||
|
"_contentSize": {
|
||||||
|
"__type__": "cc.Size",
|
||||||
|
"width": 100,
|
||||||
|
"height": 100
|
||||||
|
},
|
||||||
|
"_anchorPoint": {
|
||||||
|
"__type__": "cc.Vec2",
|
||||||
|
"x": 0.5,
|
||||||
|
"y": 0.5
|
||||||
|
},
|
||||||
|
"_id": ""
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"__type__": "cc.CompPrefabInfo",
|
||||||
|
"fileId": "85+YAl4NtJo6EY9xL02Qja"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"__type__": "cc.Button",
|
||||||
|
"_name": "",
|
||||||
|
"_objFlags": 0,
|
||||||
|
"__editorExtras__": {},
|
||||||
|
"node": {
|
||||||
|
"__id__": 114
|
||||||
|
},
|
||||||
|
"_enabled": true,
|
||||||
|
"__prefab": {
|
||||||
|
"__id__": 118
|
||||||
|
},
|
||||||
|
"clickEvents": [
|
||||||
|
{
|
||||||
|
"__id__": 119
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"_interactable": true,
|
||||||
|
"_transition": 3,
|
||||||
|
"_normalColor": {
|
||||||
|
"__type__": "cc.Color",
|
||||||
|
"r": 255,
|
||||||
|
"g": 255,
|
||||||
|
"b": 255,
|
||||||
|
"a": 255
|
||||||
|
},
|
||||||
|
"_hoverColor": {
|
||||||
|
"__type__": "cc.Color",
|
||||||
|
"r": 211,
|
||||||
|
"g": 211,
|
||||||
|
"b": 211,
|
||||||
|
"a": 255
|
||||||
|
},
|
||||||
|
"_pressedColor": {
|
||||||
|
"__type__": "cc.Color",
|
||||||
|
"r": 255,
|
||||||
|
"g": 255,
|
||||||
|
"b": 255,
|
||||||
|
"a": 255
|
||||||
|
},
|
||||||
|
"_disabledColor": {
|
||||||
|
"__type__": "cc.Color",
|
||||||
|
"r": 124,
|
||||||
|
"g": 124,
|
||||||
|
"b": 124,
|
||||||
|
"a": 255
|
||||||
|
},
|
||||||
|
"_normalSprite": null,
|
||||||
|
"_hoverSprite": null,
|
||||||
|
"_pressedSprite": null,
|
||||||
|
"_disabledSprite": null,
|
||||||
|
"_duration": 0.1,
|
||||||
|
"_zoomScale": 1.2,
|
||||||
|
"_target": null,
|
||||||
|
"_id": ""
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"__type__": "cc.CompPrefabInfo",
|
||||||
|
"fileId": "f8t1wMQYpHTZSD4ng7T/IA"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"__type__": "cc.ClickEvent",
|
||||||
|
"target": {
|
||||||
|
"__id__": 1
|
||||||
|
},
|
||||||
|
"component": "",
|
||||||
|
"_componentId": "dc8e3zoHO1Bq7v2cjEJd0Za",
|
||||||
|
"handler": "show_info",
|
||||||
|
"customEventData": ""
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"__type__": "cc.PrefabInfo",
|
||||||
|
"root": {
|
||||||
|
"__id__": 1
|
||||||
|
},
|
||||||
|
"asset": {
|
||||||
|
"__id__": 0
|
||||||
|
},
|
||||||
|
"fileId": "bbAnzgbZBPX4ofy4o42sL7",
|
||||||
|
"instance": null,
|
||||||
|
"targetOverrides": null,
|
||||||
|
"nestedPrefabInstanceRoots": null
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"__type__": "cc.UITransform",
|
"__type__": "cc.UITransform",
|
||||||
"_name": "",
|
"_name": "",
|
||||||
@@ -2610,7 +2774,7 @@
|
|||||||
},
|
},
|
||||||
"_enabled": true,
|
"_enabled": true,
|
||||||
"__prefab": {
|
"__prefab": {
|
||||||
"__id__": 115
|
"__id__": 122
|
||||||
},
|
},
|
||||||
"_contentSize": {
|
"_contentSize": {
|
||||||
"__type__": "cc.Size",
|
"__type__": "cc.Size",
|
||||||
@@ -2638,7 +2802,7 @@
|
|||||||
},
|
},
|
||||||
"_enabled": true,
|
"_enabled": true,
|
||||||
"__prefab": {
|
"__prefab": {
|
||||||
"__id__": 117
|
"__id__": 124
|
||||||
},
|
},
|
||||||
"_id": ""
|
"_id": ""
|
||||||
},
|
},
|
||||||
@@ -2656,7 +2820,7 @@
|
|||||||
},
|
},
|
||||||
"_enabled": true,
|
"_enabled": true,
|
||||||
"__prefab": {
|
"__prefab": {
|
||||||
"__id__": 119
|
"__id__": 126
|
||||||
},
|
},
|
||||||
"playOnLoad": true,
|
"playOnLoad": true,
|
||||||
"_clips": [
|
"_clips": [
|
||||||
|
|||||||
@@ -759,8 +759,8 @@
|
|||||||
"_dstBlendFactor": 4,
|
"_dstBlendFactor": 4,
|
||||||
"_color": {
|
"_color": {
|
||||||
"__type__": "cc.Color",
|
"__type__": "cc.Color",
|
||||||
"r": 44,
|
"r": 17,
|
||||||
"g": 190,
|
"g": 123,
|
||||||
"b": 255,
|
"b": 255,
|
||||||
"a": 255
|
"a": 255
|
||||||
},
|
},
|
||||||
@@ -934,9 +934,9 @@
|
|||||||
"_dstBlendFactor": 4,
|
"_dstBlendFactor": 4,
|
||||||
"_color": {
|
"_color": {
|
||||||
"__type__": "cc.Color",
|
"__type__": "cc.Color",
|
||||||
"r": 0,
|
"r": 17,
|
||||||
"g": 168,
|
"g": 50,
|
||||||
"b": 255,
|
"b": 135,
|
||||||
"a": 255
|
"a": 255
|
||||||
},
|
},
|
||||||
"_spriteFrame": {
|
"_spriteFrame": {
|
||||||
@@ -1113,7 +1113,7 @@
|
|||||||
"__id__": 55
|
"__id__": 55
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"_active": true,
|
"_active": false,
|
||||||
"_components": [
|
"_components": [
|
||||||
{
|
{
|
||||||
"__id__": 63
|
"__id__": 63
|
||||||
@@ -1252,9 +1252,9 @@
|
|||||||
"_dstBlendFactor": 4,
|
"_dstBlendFactor": 4,
|
||||||
"_color": {
|
"_color": {
|
||||||
"__type__": "cc.Color",
|
"__type__": "cc.Color",
|
||||||
"r": 224,
|
"r": 241,
|
||||||
"g": 195,
|
"g": 154,
|
||||||
"b": 0,
|
"b": 2,
|
||||||
"a": 255
|
"a": 255
|
||||||
},
|
},
|
||||||
"_spriteFrame": {
|
"_spriteFrame": {
|
||||||
@@ -1427,9 +1427,9 @@
|
|||||||
"_dstBlendFactor": 4,
|
"_dstBlendFactor": 4,
|
||||||
"_color": {
|
"_color": {
|
||||||
"__type__": "cc.Color",
|
"__type__": "cc.Color",
|
||||||
"r": 219,
|
"r": 142,
|
||||||
"g": 173,
|
"g": 49,
|
||||||
"b": 0,
|
"b": 16,
|
||||||
"a": 255
|
"a": 255
|
||||||
},
|
},
|
||||||
"_spriteFrame": {
|
"_spriteFrame": {
|
||||||
|
|||||||
@@ -738,8 +738,8 @@
|
|||||||
"_dstBlendFactor": 4,
|
"_dstBlendFactor": 4,
|
||||||
"_color": {
|
"_color": {
|
||||||
"__type__": "cc.Color",
|
"__type__": "cc.Color",
|
||||||
"r": 44,
|
"r": 17,
|
||||||
"g": 190,
|
"g": 123,
|
||||||
"b": 255,
|
"b": 255,
|
||||||
"a": 255
|
"a": 255
|
||||||
},
|
},
|
||||||
@@ -913,9 +913,9 @@
|
|||||||
"_dstBlendFactor": 4,
|
"_dstBlendFactor": 4,
|
||||||
"_color": {
|
"_color": {
|
||||||
"__type__": "cc.Color",
|
"__type__": "cc.Color",
|
||||||
"r": 0,
|
"r": 17,
|
||||||
"g": 168,
|
"g": 50,
|
||||||
"b": 255,
|
"b": 135,
|
||||||
"a": 255
|
"a": 255
|
||||||
},
|
},
|
||||||
"_spriteFrame": {
|
"_spriteFrame": {
|
||||||
@@ -1231,9 +1231,9 @@
|
|||||||
"_dstBlendFactor": 4,
|
"_dstBlendFactor": 4,
|
||||||
"_color": {
|
"_color": {
|
||||||
"__type__": "cc.Color",
|
"__type__": "cc.Color",
|
||||||
"r": 224,
|
"r": 241,
|
||||||
"g": 195,
|
"g": 154,
|
||||||
"b": 0,
|
"b": 2,
|
||||||
"a": 255
|
"a": 255
|
||||||
},
|
},
|
||||||
"_spriteFrame": {
|
"_spriteFrame": {
|
||||||
@@ -1406,9 +1406,9 @@
|
|||||||
"_dstBlendFactor": 4,
|
"_dstBlendFactor": 4,
|
||||||
"_color": {
|
"_color": {
|
||||||
"__type__": "cc.Color",
|
"__type__": "cc.Color",
|
||||||
"r": 219,
|
"r": 142,
|
||||||
"g": 173,
|
"g": 49,
|
||||||
"b": 0,
|
"b": 16,
|
||||||
"a": 255
|
"a": 255
|
||||||
},
|
},
|
||||||
"_spriteFrame": {
|
"_spriteFrame": {
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -54,11 +54,23 @@ export enum GameSet {
|
|||||||
HERO_NUM=3,
|
HERO_NUM=3,
|
||||||
}
|
}
|
||||||
export const ColorSet: { [key: string]: string } = {
|
export const ColorSet: { [key: string]: string } = {
|
||||||
RED: "ff364d",
|
RED: "FF364D",
|
||||||
|
RED1: "FC1702",
|
||||||
|
RED2: "7B0B05",
|
||||||
BLUE: "2CBEFF",
|
BLUE: "2CBEFF",
|
||||||
BLUE2: "00A8FF",
|
BLUE2: "00A8FF",
|
||||||
|
BLUE3: "117bff",
|
||||||
|
BLUE4: "113287",
|
||||||
YELLOW: "E0C300" ,
|
YELLOW: "E0C300" ,
|
||||||
YELLOW2: "DBAD00" ,
|
YELLOW2: "DBAD00" ,
|
||||||
|
YELLOW3: "F19A02",
|
||||||
|
YELLOW4: "8E3110",
|
||||||
GREEN: "83CE00",
|
GREEN: "83CE00",
|
||||||
GREEN2: "17A047",
|
GREEN2: "17A047",
|
||||||
|
GREEN3: "5ECC3C",
|
||||||
|
GREEN4: "014523",
|
||||||
|
PURPLE1: "B640EA",
|
||||||
|
PURPLE2: "621678",
|
||||||
|
ORIGIN1: "968369",
|
||||||
|
ORIGIN2: "483825",
|
||||||
};
|
};
|
||||||
@@ -19,7 +19,7 @@ export class HChipComp extends Component {
|
|||||||
|
|
||||||
}
|
}
|
||||||
show_info(){
|
show_info(){
|
||||||
if(this.node.parent.name=="reward"||this.node.parent.name=="item_info") return
|
if(this.node.parent.name=="item_info") return
|
||||||
oops.gui.open(UIID.ItemInfo, {uuid:this.h_uuid,type:2});
|
oops.gui.open(UIID.ItemInfo, {uuid:this.h_uuid,type:2});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -30,11 +30,11 @@ const { ccclass, property } = _decorator;
|
|||||||
@ccclass('HeroViewComp') // 定义为 Cocos Creator 组件
|
@ccclass('HeroViewComp') // 定义为 Cocos Creator 组件
|
||||||
@ecs.register('HeroView', false) // 定义为 ECS 组件
|
@ecs.register('HeroView', false) // 定义为 ECS 组件
|
||||||
export class HeroViewComp extends CCComp {
|
export class HeroViewComp extends CCComp {
|
||||||
BUFFCOMP:any=null!;
|
BUFFCOMP:BuffComp=null!
|
||||||
enemy_pos:Vec3=null!;
|
enemy_pos:Vec3=null!
|
||||||
enemy:any=null!;
|
// enemy:any=null!;
|
||||||
|
|
||||||
as: HeroSpine = null!;
|
as: HeroSpine = null!
|
||||||
anm_timer:Timer = new Timer(0.3);
|
anm_timer:Timer = new Timer(0.3);
|
||||||
anm_name="idle"
|
anm_name="idle"
|
||||||
status:String = "idle"
|
status:String = "idle"
|
||||||
|
|||||||
@@ -17,7 +17,7 @@ export class ItemComp extends CCComp {
|
|||||||
//todo 设定icon 显示
|
//todo 设定icon 显示
|
||||||
}
|
}
|
||||||
|
|
||||||
update_data(uuid:number,num:number){
|
update_data(uuid:number,num:number=0){
|
||||||
this.i_uuid=uuid;
|
this.i_uuid=uuid;
|
||||||
this.num=num;
|
this.num=num;
|
||||||
this.node.getChildByName("num").getComponent(Label).string = num.toString();
|
this.node.getChildByName("num").getComponent(Label).string = num.toString();
|
||||||
@@ -26,26 +26,18 @@ export class ItemComp extends CCComp {
|
|||||||
}
|
}
|
||||||
let url = "gui/items";
|
let url = "gui/items";
|
||||||
let pathName= Items[uuid].path;
|
let pathName= Items[uuid].path;
|
||||||
switch(Items[uuid].lv){
|
this.node.getChildByName("lv1").active = Items[uuid].lv==1;
|
||||||
case 1:
|
this.node.getChildByName("lv2").active = Items[uuid].lv==2;
|
||||||
this.node.getChildByName("lv1").active = true;
|
this.node.getChildByName("lv3").active = Items[uuid].lv==3;
|
||||||
break;
|
this.node.getChildByName("lv4").active = Items[uuid].lv==4;
|
||||||
case 2:
|
|
||||||
this.node.getChildByName("lv2").active = true;
|
|
||||||
break;
|
|
||||||
case 3:
|
|
||||||
this.node.getChildByName("lv3").active = true;
|
|
||||||
break;
|
|
||||||
case 4:
|
|
||||||
this.node.getChildByName("lv4").active = true;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
resources.load(url, SpriteAtlas, (err: any, atlas) => {
|
resources.load(url, SpriteAtlas, (err: any, atlas) => {
|
||||||
const sprite = this.node.getChildByName("icon").getComponent(Sprite);
|
const sprite = this.node.getChildByName("icon").getComponent(Sprite);
|
||||||
sprite.spriteFrame = atlas.getSpriteFrame(pathName);
|
sprite.spriteFrame = atlas.getSpriteFrame(pathName);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
show_info(){
|
show_info(){
|
||||||
|
if(this.node.parent.name=="item_info") return
|
||||||
oops.gui.open(UIID.ItemInfo, {uuid:this.i_uuid,type:0});
|
oops.gui.open(UIID.ItemInfo, {uuid:this.i_uuid,type:0});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -8,6 +8,7 @@ import { SkillSet } from "../common/config/SkillSet";
|
|||||||
import { HeroInfo, HeroSet } from "../common/config/heroSet";
|
import { HeroInfo, HeroSet } from "../common/config/heroSet";
|
||||||
import { Hero } from "../hero/Hero";
|
import { Hero } from "../hero/Hero";
|
||||||
import { HChipComp } from "../hero/HChipComp";
|
import { HChipComp } from "../hero/HChipComp";
|
||||||
|
import { ItemComp } from "./ItemComp";
|
||||||
const { ccclass, property } = _decorator;
|
const { ccclass, property } = _decorator;
|
||||||
|
|
||||||
/** 视图层对象 */
|
/** 视图层对象 */
|
||||||
@@ -23,31 +24,9 @@ export class ItemInfoComp extends CCComp {
|
|||||||
this.node.getChildByName("item").active = true;
|
this.node.getChildByName("item").active = true;
|
||||||
this.node.getChildByName("name").getComponent(Label).string=Items[args.uuid].name
|
this.node.getChildByName("name").getComponent(Label).string=Items[args.uuid].name
|
||||||
this.node.getChildByName("info").getComponent(Label).string=Items[args.uuid].info
|
this.node.getChildByName("info").getComponent(Label).string=Items[args.uuid].info
|
||||||
let url = "gui/items";
|
|
||||||
let pathName= Items[args.uuid].path;
|
|
||||||
this.node.getChildByName("item").getChildByName("lv1").active = false;
|
|
||||||
this.node.getChildByName("item").getChildByName("lv2").active = false;
|
|
||||||
this.node.getChildByName("item").getChildByName("lv3").active = false;
|
|
||||||
this.node.getChildByName("item").getChildByName("lv4").active = false;
|
|
||||||
|
|
||||||
switch(Items[args.uuid].lv){
|
let itemcom = this.node.getChildByName("item").getComponent(ItemComp);
|
||||||
case 1:
|
itemcom.update_data(args.uuid,args.num);
|
||||||
this.node.getChildByName("item").getChildByName("lv1").active = true;
|
|
||||||
break;
|
|
||||||
case 2:
|
|
||||||
this.node.getChildByName("item").getChildByName("lv2").active = true;
|
|
||||||
break;
|
|
||||||
case 3:
|
|
||||||
this.node.getChildByName("item").getChildByName("lv3").active = true;
|
|
||||||
break;
|
|
||||||
case 4:
|
|
||||||
this.node.getChildByName("item").getChildByName("lv4").active = true;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
resources.load(url, SpriteAtlas, (err: any, atlas) => {
|
|
||||||
const sprite = this.node.getChildByName("item").getChildByName("icon").getComponent(Sprite);
|
|
||||||
sprite.spriteFrame = atlas.getSpriteFrame(pathName);
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
if(args.type==1){ //技能碎片
|
if(args.type==1){ //技能碎片
|
||||||
this.node.getChildByName("skill").active = true;
|
this.node.getChildByName("skill").active = true;
|
||||||
@@ -60,12 +39,11 @@ export class ItemInfoComp extends CCComp {
|
|||||||
sprite.spriteFrame = atlas.getSpriteFrame(SkillSet[args.uuid].path);
|
sprite.spriteFrame = atlas.getSpriteFrame(SkillSet[args.uuid].path);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
if(args.type==2){ //英雄碎片
|
if(args.type==2){ //英雄碎片
|
||||||
this.node.getChildByName("hero").active = true;
|
this.node.getChildByName("hero").active = true;
|
||||||
this.node.getChildByName("name").getComponent(Label).string=HeroInfo[args.uuid].name+" 碎片"
|
this.node.getChildByName("name").getComponent(Label).string=HeroInfo[args.uuid].name+" 碎片"
|
||||||
this.node.getChildByName("info").getComponent(Label).string="「"+HeroInfo[args.uuid].name+"」碎片,用于英雄升阶,开宝箱获得"
|
this.node.getChildByName("info").getComponent(Label).string="「"+HeroInfo[args.uuid].name+"」碎片,用于强化英雄,怪物掉落和开宝箱抽卡获得"
|
||||||
let HChip=this.node.getChildByName("hero").getComponent(HChipComp);
|
let HChip=this.node.getChildByName("hero").getComponent(HChipComp);
|
||||||
HChip.update_data(args.uuid)
|
HChip.update_data(args.uuid)
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
import { _decorator, Animation, Component, Node } from 'cc';
|
import { _decorator, Animation, Component, Node, sp } from 'cc';
|
||||||
import { SkillCom } from './SkillCom';
|
import { SkillCom } from './SkillCom';
|
||||||
import { SkillSet } from '../common/config/SkillSet';
|
import { SkillSet } from '../common/config/SkillSet';
|
||||||
import { ecs } from 'db://oops-framework/libs/ecs/ECS';
|
import { ecs } from 'db://oops-framework/libs/ecs/ECS';
|
||||||
|
|||||||
Reference in New Issue
Block a user