diff --git a/assets/resources/game/heros/hero.meta b/assets/resources/game/heros/hero.meta new file mode 100644 index 00000000..820968db --- /dev/null +++ b/assets/resources/game/heros/hero.meta @@ -0,0 +1,9 @@ +{ + "ver": "1.2.0", + "importer": "directory", + "imported": true, + "uuid": "9977e498-4276-46a2-af0d-e3d8473aca8b", + "files": [], + "subMetas": {}, + "userData": {} +} diff --git a/assets/resources/game/heros/hero/bf.png b/assets/resources/game/heros/hero/bf.png new file mode 100644 index 00000000..f49ea798 Binary files /dev/null and b/assets/resources/game/heros/hero/bf.png differ diff --git a/assets/resources/game/heros/hero/bf.png.meta b/assets/resources/game/heros/hero/bf.png.meta new file mode 100644 index 00000000..e3a0b85a --- /dev/null +++ b/assets/resources/game/heros/hero/bf.png.meta @@ -0,0 +1,134 @@ +{ + "ver": "1.0.26", + "importer": "image", + "imported": true, + "uuid": "f7dbac7e-73ec-4c47-8bfa-e037b69faad9", + "files": [ + ".json", + ".png" + ], + "subMetas": { + "6c48a": { + "importer": "texture", + "uuid": "f7dbac7e-73ec-4c47-8bfa-e037b69faad9@6c48a", + "displayName": "bf", + "id": "6c48a", + "name": "texture", + "userData": { + "wrapModeS": "clamp-to-edge", + "wrapModeT": "clamp-to-edge", + "minfilter": "linear", + "magfilter": "linear", + "mipfilter": "none", + "anisotropy": 0, + "isUuid": true, + "imageUuidOrDatabaseUri": "f7dbac7e-73ec-4c47-8bfa-e037b69faad9", + "visible": false + }, + "ver": "1.0.22", + "imported": true, + "files": [ + ".json" + ], + "subMetas": {} + }, + "f9941": { + "importer": "sprite-frame", + "uuid": "f7dbac7e-73ec-4c47-8bfa-e037b69faad9@f9941", + "displayName": "bf", + "id": "f9941", + "name": "spriteFrame", + "userData": { + "trimType": "auto", + "trimThreshold": 1, + "rotated": false, + "offsetX": 0, + "offsetY": 0, + "trimX": 3, + "trimY": 3, + "width": 90, + "height": 102, + "rawWidth": 96, + "rawHeight": 108, + "borderTop": 0, + "borderBottom": 0, + "borderLeft": 0, + "borderRight": 0, + "packable": true, + "pixelsToUnit": 100, + "pivotX": 0.5, + "pivotY": 0.5, + "meshType": 0, + "vertices": { + "rawPosition": [ + -45, + -51, + 0, + 45, + -51, + 0, + -45, + 51, + 0, + 45, + 51, + 0 + ], + "indexes": [ + 0, + 1, + 2, + 2, + 1, + 3 + ], + "uv": [ + 3, + 105, + 93, + 105, + 3, + 3, + 93, + 3 + ], + "nuv": [ + 0.03125, + 0.027777777777777776, + 0.96875, + 0.027777777777777776, + 0.03125, + 0.9722222222222222, + 0.96875, + 0.9722222222222222 + ], + "minPos": [ + -45, + -51, + 0 + ], + "maxPos": [ + 45, + 51, + 0 + ] + }, + "isUuid": true, + "imageUuidOrDatabaseUri": "f7dbac7e-73ec-4c47-8bfa-e037b69faad9@6c48a", + "atlasUuid": "" + }, + "ver": "1.0.12", + "imported": true, + "files": [ + ".json" + ], + "subMetas": {} + } + }, + "userData": { + "hasAlpha": true, + "type": "sprite-frame", + "fixAlphaTransparencyArtifacts": false, + "redirect": "f7dbac7e-73ec-4c47-8bfa-e037b69faad9@f9941" + } +} diff --git a/assets/resources/game/heros/hero/hero.png b/assets/resources/game/heros/hero/hero.png new file mode 100644 index 00000000..ab0a8abc Binary files /dev/null and b/assets/resources/game/heros/hero/hero.png differ diff --git a/assets/resources/game/heros/hero/hero.png.meta b/assets/resources/game/heros/hero/hero.png.meta new file mode 100644 index 00000000..0dbf9578 --- /dev/null +++ b/assets/resources/game/heros/hero/hero.png.meta @@ -0,0 +1,134 @@ +{ + "ver": "1.0.26", + "importer": "image", + "imported": true, + "uuid": "c05c3659-4264-42fb-87e8-f43e6422dd43", + "files": [ + ".json", + ".png" + ], + "subMetas": { + "6c48a": { + "importer": "texture", + "uuid": "c05c3659-4264-42fb-87e8-f43e6422dd43@6c48a", + "displayName": "hero", + "id": "6c48a", + "name": "texture", + "userData": { + "wrapModeS": "clamp-to-edge", + "wrapModeT": "clamp-to-edge", + "minfilter": "linear", + "magfilter": "linear", + "mipfilter": "none", + "anisotropy": 0, + "isUuid": true, + "imageUuidOrDatabaseUri": "c05c3659-4264-42fb-87e8-f43e6422dd43", + "visible": false + }, + "ver": "1.0.22", + "imported": true, + "files": [ + ".json" + ], + "subMetas": {} + }, + "f9941": { + "importer": "sprite-frame", + "uuid": "c05c3659-4264-42fb-87e8-f43e6422dd43@f9941", + "displayName": "hero", + "id": "f9941", + "name": "spriteFrame", + "userData": { + "trimType": "auto", + "trimThreshold": 1, + "rotated": false, + "offsetX": 0, + "offsetY": 0, + "trimX": 0, + "trimY": 0, + "width": 96, + "height": 108, + "rawWidth": 96, + "rawHeight": 108, + "borderTop": 0, + "borderBottom": 0, + "borderLeft": 0, + "borderRight": 0, + "packable": true, + "pixelsToUnit": 100, + "pivotX": 0.5, + "pivotY": 0.5, + "meshType": 0, + "vertices": { + "rawPosition": [ + -48, + -54, + 0, + 48, + -54, + 0, + -48, + 54, + 0, + 48, + 54, + 0 + ], + "indexes": [ + 0, + 1, + 2, + 2, + 1, + 3 + ], + "uv": [ + 0, + 108, + 96, + 108, + 0, + 0, + 96, + 0 + ], + "nuv": [ + 0, + 0, + 1, + 0, + 0, + 1, + 1, + 1 + ], + "minPos": [ + -48, + -54, + 0 + ], + "maxPos": [ + 48, + 54, + 0 + ] + }, + "isUuid": true, + "imageUuidOrDatabaseUri": "c05c3659-4264-42fb-87e8-f43e6422dd43@6c48a", + "atlasUuid": "" + }, + "ver": "1.0.12", + "imported": true, + "files": [ + ".json" + ], + "subMetas": {} + } + }, + "userData": { + "hasAlpha": true, + "type": "sprite-frame", + "fixAlphaTransparencyArtifacts": false, + "redirect": "c05c3659-4264-42fb-87e8-f43e6422dd43@f9941" + } +} diff --git a/assets/resources/game/heros/hero/lang.png b/assets/resources/game/heros/hero/lang.png new file mode 100644 index 00000000..1a3d0b02 Binary files /dev/null and b/assets/resources/game/heros/hero/lang.png differ diff --git a/assets/resources/game/heros/hero/lang.png.meta b/assets/resources/game/heros/hero/lang.png.meta new file mode 100644 index 00000000..021f5a02 --- /dev/null +++ b/assets/resources/game/heros/hero/lang.png.meta @@ -0,0 +1,134 @@ +{ + "ver": "1.0.26", + "importer": "image", + "imported": true, + "uuid": "94c32520-2d16-4a94-ab6b-94794e10711a", + "files": [ + ".json", + ".png" + ], + "subMetas": { + "6c48a": { + "importer": "texture", + "uuid": "94c32520-2d16-4a94-ab6b-94794e10711a@6c48a", + "displayName": "lang", + "id": "6c48a", + "name": "texture", + "userData": { + "wrapModeS": "clamp-to-edge", + "wrapModeT": "clamp-to-edge", + "minfilter": "linear", + "magfilter": "linear", + "mipfilter": "none", + "anisotropy": 0, + "isUuid": true, + "imageUuidOrDatabaseUri": "94c32520-2d16-4a94-ab6b-94794e10711a", + "visible": false + }, + "ver": "1.0.22", + "imported": true, + "files": [ + ".json" + ], + "subMetas": {} + }, + "f9941": { + "importer": "sprite-frame", + "uuid": "94c32520-2d16-4a94-ab6b-94794e10711a@f9941", + "displayName": "lang", + "id": "f9941", + "name": "spriteFrame", + "userData": { + "trimType": "auto", + "trimThreshold": 1, + "rotated": false, + "offsetX": 0, + "offsetY": 0, + "trimX": 0, + "trimY": 0, + "width": 96, + "height": 108, + "rawWidth": 96, + "rawHeight": 108, + "borderTop": 0, + "borderBottom": 0, + "borderLeft": 0, + "borderRight": 0, + "packable": true, + "pixelsToUnit": 100, + "pivotX": 0.5, + "pivotY": 0.5, + "meshType": 0, + "vertices": { + "rawPosition": [ + -48, + -54, + 0, + 48, + -54, + 0, + -48, + 54, + 0, + 48, + 54, + 0 + ], + "indexes": [ + 0, + 1, + 2, + 2, + 1, + 3 + ], + "uv": [ + 0, + 108, + 96, + 108, + 0, + 0, + 96, + 0 + ], + "nuv": [ + 0, + 0, + 1, + 0, + 0, + 1, + 1, + 1 + ], + "minPos": [ + -48, + -54, + 0 + ], + "maxPos": [ + 48, + 54, + 0 + ] + }, + "isUuid": true, + "imageUuidOrDatabaseUri": "94c32520-2d16-4a94-ab6b-94794e10711a@6c48a", + "atlasUuid": "" + }, + "ver": "1.0.12", + "imported": true, + "files": [ + ".json" + ], + "subMetas": {} + } + }, + "userData": { + "hasAlpha": true, + "type": "sprite-frame", + "fixAlphaTransparencyArtifacts": false, + "redirect": "94c32520-2d16-4a94-ab6b-94794e10711a@f9941" + } +} diff --git a/assets/resources/game/heros/hero/level.png b/assets/resources/game/heros/hero/level.png new file mode 100644 index 00000000..30188507 Binary files /dev/null and b/assets/resources/game/heros/hero/level.png differ diff --git a/assets/resources/game/heros/hero/level.png.meta b/assets/resources/game/heros/hero/level.png.meta new file mode 100644 index 00000000..9562d0a9 --- /dev/null +++ b/assets/resources/game/heros/hero/level.png.meta @@ -0,0 +1,134 @@ +{ + "ver": "1.0.26", + "importer": "image", + "imported": true, + "uuid": "689c4ea2-894d-42c8-a3c3-7c91d17a8197", + "files": [ + ".json", + ".png" + ], + "subMetas": { + "6c48a": { + "importer": "texture", + "uuid": "689c4ea2-894d-42c8-a3c3-7c91d17a8197@6c48a", + "displayName": "level", + "id": "6c48a", + "name": "texture", + "userData": { + "wrapModeS": "clamp-to-edge", + "wrapModeT": "clamp-to-edge", + "minfilter": "linear", + "magfilter": "linear", + "mipfilter": "none", + "anisotropy": 0, + "isUuid": true, + "imageUuidOrDatabaseUri": "689c4ea2-894d-42c8-a3c3-7c91d17a8197", + "visible": false + }, + "ver": "1.0.22", + "imported": true, + "files": [ + ".json" + ], + "subMetas": {} + }, + "f9941": { + "importer": "sprite-frame", + "uuid": "689c4ea2-894d-42c8-a3c3-7c91d17a8197@f9941", + "displayName": "level", + "id": "f9941", + "name": "spriteFrame", + "userData": { + "trimType": "auto", + "trimThreshold": 1, + "rotated": false, + "offsetX": 0, + "offsetY": 0, + "trimX": 0, + "trimY": 0, + "width": 26, + "height": 26, + "rawWidth": 26, + "rawHeight": 26, + "borderTop": 0, + "borderBottom": 0, + "borderLeft": 0, + "borderRight": 0, + "packable": true, + "pixelsToUnit": 100, + "pivotX": 0.5, + "pivotY": 0.5, + "meshType": 0, + "vertices": { + "rawPosition": [ + -13, + -13, + 0, + 13, + -13, + 0, + -13, + 13, + 0, + 13, + 13, + 0 + ], + "indexes": [ + 0, + 1, + 2, + 2, + 1, + 3 + ], + "uv": [ + 0, + 26, + 26, + 26, + 0, + 0, + 26, + 0 + ], + "nuv": [ + 0, + 0, + 1, + 0, + 0, + 1, + 1, + 1 + ], + "minPos": [ + -13, + -13, + 0 + ], + "maxPos": [ + 13, + 13, + 0 + ] + }, + "isUuid": true, + "imageUuidOrDatabaseUri": "689c4ea2-894d-42c8-a3c3-7c91d17a8197@6c48a", + "atlasUuid": "" + }, + "ver": "1.0.12", + "imported": true, + "files": [ + ".json" + ], + "subMetas": {} + } + }, + "userData": { + "hasAlpha": true, + "type": "sprite-frame", + "fixAlphaTransparencyArtifacts": false, + "redirect": "689c4ea2-894d-42c8-a3c3-7c91d17a8197@f9941" + } +} diff --git a/assets/resources/game/heros/hero/skeleton.atlas b/assets/resources/game/heros/hero/skeleton.atlas new file mode 100644 index 00000000..2f372b02 --- /dev/null +++ b/assets/resources/game/heros/hero/skeleton.atlas @@ -0,0 +1,20 @@ + +skeleton.png +size: 126,100 +format: RGBA8888 +filter: Linear,Linear +repeat: none +bb + rotate: true + xy: 2, 2 + size: 96, 108 + orig: 96, 108 + offset: 0, 0 + index: -1 +shadow + rotate: true + xy: 112, 66 + size: 32, 12 + orig: 32, 12 + offset: 0, 0 + index: -1 diff --git a/assets/resources/game/heros/hero/skeleton.atlas.meta b/assets/resources/game/heros/hero/skeleton.atlas.meta new file mode 100644 index 00000000..68e1011a --- /dev/null +++ b/assets/resources/game/heros/hero/skeleton.atlas.meta @@ -0,0 +1,12 @@ +{ + "ver": "1.0.1", + "importer": "*", + "imported": true, + "uuid": "c25902d8-36df-48f2-af71-6be1827463a0", + "files": [ + ".atlas", + ".json" + ], + "subMetas": {}, + "userData": {} +} diff --git a/assets/resources/game/heros/hero/skeleton.json b/assets/resources/game/heros/hero/skeleton.json new file mode 100644 index 00000000..1249278b --- /dev/null +++ b/assets/resources/game/heros/hero/skeleton.json @@ -0,0 +1,72 @@ +{ +"skeleton": { + "hash": "cNWCYqlhU+8lj44AhM2ebNGlYGc", + "spine": "3.8.99", + "x": -46.85, + "y": -6, + "width": 96, + "height": 117.8, + "images": "", + "audio": "" +}, +"bones": [ + { "name": "root" }, + { "name": "bone", "parent": "root" }, + { "name": "shandow", "parent": "root", "y": 2.91 } +], +"slots": [ + { "name": "shadow", "bone": "shandow", "attachment": "shadow" }, + { "name": "bb", "bone": "bone", "attachment": "bb" } +], +"skins": [ + { + "name": "default", + "attachments": { + "bb": { + "bb": { "x": 1.15, "y": 57.8, "width": 96, "height": 108 } + }, + "shadow": { + "shadow": { "scaleX": 2.3856, "width": 32, "height": 12 } + } + } + } +], +"animations": { + "atk": { + "bones": { + "root": { + "rotate": [ + {}, + { "time": 0.1333, "angle": -5.68 }, + { "time": 0.3333, "angle": -30.2 }, + { "time": 0.5 } + ], + "translate": [ + {}, + { "time": 0.1333, "x": 6 }, + { "time": 0.3333, "x": 21 }, + { "time": 0.5 } + ] + } + } + }, + "move": { + "bones": { + "shandow": { + "scale": [ + {}, + { "time": 0.5, "x": 1.099 }, + { "time": 1 } + ] + }, + "bone": { + "scale": [ + {}, + { "time": 0.5, "y": 0.96 }, + { "time": 1 } + ] + } + } + } +} +} \ No newline at end of file diff --git a/assets/resources/game/heros/hero/skeleton.json.meta b/assets/resources/game/heros/hero/skeleton.json.meta new file mode 100644 index 00000000..09b1e440 --- /dev/null +++ b/assets/resources/game/heros/hero/skeleton.json.meta @@ -0,0 +1,11 @@ +{ + "ver": "1.2.6", + "importer": "spine-data", + "imported": true, + "uuid": "4ba2de71-96df-42bd-b2df-7b67756e16e3", + "files": [ + ".json" + ], + "subMetas": {}, + "userData": {} +} diff --git a/assets/resources/game/heros/hero/skeleton.png b/assets/resources/game/heros/hero/skeleton.png new file mode 100644 index 00000000..dece05ed Binary files /dev/null and b/assets/resources/game/heros/hero/skeleton.png differ diff --git a/assets/resources/game/heros/hero/skeleton.png.meta b/assets/resources/game/heros/hero/skeleton.png.meta new file mode 100644 index 00000000..0d2bf2a5 --- /dev/null +++ b/assets/resources/game/heros/hero/skeleton.png.meta @@ -0,0 +1,134 @@ +{ + "ver": "1.0.26", + "importer": "image", + "imported": true, + "uuid": "7b9c6074-ab9e-4a86-9612-befdd799ae80", + "files": [ + ".json", + ".png" + ], + "subMetas": { + "6c48a": { + "importer": "texture", + "uuid": "7b9c6074-ab9e-4a86-9612-befdd799ae80@6c48a", + "displayName": "skeleton", + "id": "6c48a", + "name": "texture", + "userData": { + "wrapModeS": "clamp-to-edge", + "wrapModeT": "clamp-to-edge", + "minfilter": "linear", + "magfilter": "linear", + "mipfilter": "none", + "anisotropy": 0, + "isUuid": true, + "imageUuidOrDatabaseUri": "7b9c6074-ab9e-4a86-9612-befdd799ae80", + "visible": false + }, + "ver": "1.0.22", + "imported": true, + "files": [ + ".json" + ], + "subMetas": {} + }, + "f9941": { + "importer": "sprite-frame", + "uuid": "7b9c6074-ab9e-4a86-9612-befdd799ae80@f9941", + "displayName": "skeleton", + "id": "f9941", + "name": "spriteFrame", + "userData": { + "trimType": "auto", + "trimThreshold": 1, + "rotated": false, + "offsetX": 0, + "offsetY": 0, + "trimX": 2, + "trimY": 2, + "width": 122, + "height": 96, + "rawWidth": 126, + "rawHeight": 100, + "borderTop": 0, + "borderBottom": 0, + "borderLeft": 0, + "borderRight": 0, + "packable": true, + "pixelsToUnit": 100, + "pivotX": 0.5, + "pivotY": 0.5, + "meshType": 0, + "vertices": { + "rawPosition": [ + -61, + -48, + 0, + 61, + -48, + 0, + -61, + 48, + 0, + 61, + 48, + 0 + ], + "indexes": [ + 0, + 1, + 2, + 2, + 1, + 3 + ], + "uv": [ + 2, + 98, + 124, + 98, + 2, + 2, + 124, + 2 + ], + "nuv": [ + 0.015873015873015872, + 0.02, + 0.9841269841269841, + 0.02, + 0.015873015873015872, + 0.98, + 0.9841269841269841, + 0.98 + ], + "minPos": [ + -61, + -48, + 0 + ], + "maxPos": [ + 61, + 48, + 0 + ] + }, + "isUuid": true, + "imageUuidOrDatabaseUri": "7b9c6074-ab9e-4a86-9612-befdd799ae80@6c48a", + "atlasUuid": "" + }, + "ver": "1.0.12", + "imported": true, + "files": [ + ".json" + ], + "subMetas": {} + } + }, + "userData": { + "hasAlpha": true, + "type": "sprite-frame", + "fixAlphaTransparencyArtifacts": false, + "redirect": "7b9c6074-ab9e-4a86-9612-befdd799ae80@f9941" + } +} diff --git a/assets/resources/game/monster/hero.prefab b/assets/resources/game/monster/hero.prefab new file mode 100644 index 00000000..c2d559bd --- /dev/null +++ b/assets/resources/game/monster/hero.prefab @@ -0,0 +1,1261 @@ +[ + { + "__type__": "cc.Prefab", + "_name": "hero", + "_objFlags": 0, + "__editorExtras__": {}, + "_native": "", + "data": { + "__id__": 1 + }, + "optimizationPolicy": 0, + "persistent": false + }, + { + "__type__": "cc.Node", + "_name": "hero", + "_objFlags": 0, + "__editorExtras__": {}, + "_parent": null, + "_children": [ + { + "__id__": 2 + }, + { + "__id__": 8 + }, + { + "__id__": 33 + } + ], + "_active": true, + "_components": [ + { + "__id__": 47 + }, + { + "__id__": 49 + }, + { + "__id__": 51 + }, + { + "__id__": 53 + }, + { + "__id__": 55 + }, + { + "__id__": 57 + } + ], + "_prefab": { + "__id__": 59 + }, + "_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": 1, + "_euler": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_id": "" + }, + { + "__type__": "cc.Node", + "_name": "shader", + "_objFlags": 0, + "__editorExtras__": {}, + "_parent": { + "__id__": 1 + }, + "_children": [], + "_active": false, + "_components": [ + { + "__id__": 3 + }, + { + "__id__": 5 + } + ], + "_prefab": { + "__id__": 7 + }, + "_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": 1, + "_euler": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_id": "" + }, + { + "__type__": "cc.UITransform", + "_name": "", + "_objFlags": 0, + "__editorExtras__": {}, + "node": { + "__id__": 2 + }, + "_enabled": true, + "__prefab": { + "__id__": 4 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 165, + "height": 119 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_id": "" + }, + { + "__type__": "cc.CompPrefabInfo", + "fileId": "f7NISe7HdAD68SLfhnddy8" + }, + { + "__type__": "cc.Sprite", + "_name": "", + "_objFlags": 0, + "__editorExtras__": {}, + "node": { + "__id__": 2 + }, + "_enabled": true, + "__prefab": { + "__id__": 6 + }, + "_customMaterial": null, + "_srcBlendFactor": 2, + "_dstBlendFactor": 4, + "_color": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_spriteFrame": { + "__uuid__": "b1745dc0-d78b-4443-a4fc-746ff6749b39@f9941", + "__expectedType__": "cc.SpriteFrame" + }, + "_type": 0, + "_fillType": 0, + "_sizeMode": 0, + "_fillCenter": { + "__type__": "cc.Vec2", + "x": 0, + "y": 0 + }, + "_fillStart": 0, + "_fillRange": 0, + "_isTrimmedMode": true, + "_useGrayscale": false, + "_atlas": null, + "_id": "" + }, + { + "__type__": "cc.CompPrefabInfo", + "fileId": "e71ctEmpxFC4KlSYRZNz/a" + }, + { + "__type__": "cc.PrefabInfo", + "root": { + "__id__": 1 + }, + "asset": { + "__id__": 0 + }, + "fileId": "66VNgwnoRDmprg2mtbH825", + "instance": null, + "targetOverrides": null, + "nestedPrefabInstanceRoots": null + }, + { + "__type__": "cc.Node", + "_name": "avatar", + "_objFlags": 0, + "__editorExtras__": {}, + "_parent": { + "__id__": 1 + }, + "_children": [ + { + "__id__": 9 + } + ], + "_active": true, + "_components": [ + { + "__id__": 25 + }, + { + "__id__": 27 + }, + { + "__id__": 30 + } + ], + "_prefab": { + "__id__": 32 + }, + "_lpos": { + "__type__": "cc.Vec3", + "x": 0, + "y": -30.505, + "z": 0 + }, + "_lrot": { + "__type__": "cc.Quat", + "x": 0, + "y": 0, + "z": 0, + "w": 1 + }, + "_lscale": { + "__type__": "cc.Vec3", + "x": 0.7, + "y": 0.7, + "z": 1 + }, + "_mobility": 0, + "_layer": 1, + "_euler": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_id": "" + }, + { + "__type__": "cc.Node", + "_name": "TNode", + "_objFlags": 0, + "__editorExtras__": {}, + "_parent": { + "__id__": 8 + }, + "_children": [ + { + "__id__": 10 + }, + { + "__id__": 16 + } + ], + "_active": true, + "_components": [ + { + "__id__": 22 + } + ], + "_prefab": { + "__id__": 24 + }, + "_lpos": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_lrot": { + "__type__": "cc.Quat", + "x": 0, + "y": 0, + "z": 2.185569414336889e-8, + "w": 0.9999999999999996 + }, + "_lscale": { + "__type__": "cc.Vec3", + "x": 1, + "y": 1.0000000000000038, + "z": 1 + }, + "_mobility": 0, + "_layer": 1, + "_euler": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0.000002504478065487657 + }, + "_id": "" + }, + { + "__type__": "cc.Node", + "_name": "bb", + "_objFlags": 0, + "__editorExtras__": {}, + "_parent": { + "__id__": 9 + }, + "_children": [], + "_active": true, + "_components": [ + { + "__id__": 11 + }, + { + "__id__": 13 + } + ], + "_prefab": { + "__id__": 15 + }, + "_lpos": { + "__type__": "cc.Vec3", + "x": 0.393, + "y": 57.214, + "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": 1, + "_euler": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_id": "" + }, + { + "__type__": "cc.UITransform", + "_name": "", + "_objFlags": 0, + "__editorExtras__": {}, + "node": { + "__id__": 10 + }, + "_enabled": true, + "__prefab": { + "__id__": 12 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 96, + "height": 108 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_id": "" + }, + { + "__type__": "cc.CompPrefabInfo", + "fileId": "dcU5E7bLRFnbO/m/Ni5Sfj" + }, + { + "__type__": "cc.Sprite", + "_name": "", + "_objFlags": 0, + "__editorExtras__": {}, + "node": { + "__id__": 10 + }, + "_enabled": true, + "__prefab": { + "__id__": 14 + }, + "_customMaterial": null, + "_srcBlendFactor": 2, + "_dstBlendFactor": 4, + "_color": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_spriteFrame": { + "__uuid__": "94c32520-2d16-4a94-ab6b-94794e10711a@f9941", + "__expectedType__": "cc.SpriteFrame" + }, + "_type": 0, + "_fillType": 0, + "_sizeMode": 1, + "_fillCenter": { + "__type__": "cc.Vec2", + "x": 0, + "y": 0 + }, + "_fillStart": 0, + "_fillRange": 0, + "_isTrimmedMode": true, + "_useGrayscale": false, + "_atlas": null, + "_id": "" + }, + { + "__type__": "cc.CompPrefabInfo", + "fileId": "e7JFDGNTZMQIcBkDXfQ33g" + }, + { + "__type__": "cc.PrefabInfo", + "root": { + "__id__": 1 + }, + "asset": { + "__id__": 0 + }, + "fileId": "58gGWhtitLVKR9TkMsdXHe", + "instance": null, + "targetOverrides": null, + "nestedPrefabInstanceRoots": null + }, + { + "__type__": "cc.Node", + "_name": "bf", + "_objFlags": 0, + "__editorExtras__": {}, + "_parent": { + "__id__": 9 + }, + "_children": [], + "_active": true, + "_components": [ + { + "__id__": 17 + }, + { + "__id__": 19 + } + ], + "_prefab": { + "__id__": 21 + }, + "_lpos": { + "__type__": "cc.Vec3", + "x": 0.824, + "y": 57.584, + "z": 0 + }, + "_lrot": { + "__type__": "cc.Quat", + "x": 0, + "y": 0, + "z": 0, + "w": 1 + }, + "_lscale": { + "__type__": "cc.Vec3", + "x": 1.03, + "y": 1.03, + "z": 1 + }, + "_mobility": 0, + "_layer": 1, + "_euler": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_id": "" + }, + { + "__type__": "cc.UITransform", + "_name": "", + "_objFlags": 0, + "__editorExtras__": {}, + "node": { + "__id__": 16 + }, + "_enabled": true, + "__prefab": { + "__id__": 18 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 90, + "height": 102 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_id": "" + }, + { + "__type__": "cc.CompPrefabInfo", + "fileId": "89X5n5v/RNgIJVhP3O8hVh" + }, + { + "__type__": "cc.Sprite", + "_name": "", + "_objFlags": 0, + "__editorExtras__": {}, + "node": { + "__id__": 16 + }, + "_enabled": true, + "__prefab": { + "__id__": 20 + }, + "_customMaterial": null, + "_srcBlendFactor": 2, + "_dstBlendFactor": 4, + "_color": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_spriteFrame": { + "__uuid__": "f7dbac7e-73ec-4c47-8bfa-e037b69faad9@f9941", + "__expectedType__": "cc.SpriteFrame" + }, + "_type": 0, + "_fillType": 0, + "_sizeMode": 1, + "_fillCenter": { + "__type__": "cc.Vec2", + "x": 0, + "y": 0 + }, + "_fillStart": 0, + "_fillRange": 0, + "_isTrimmedMode": true, + "_useGrayscale": false, + "_atlas": null, + "_id": "" + }, + { + "__type__": "cc.CompPrefabInfo", + "fileId": "f55PGbxH1OLbGW88W/AXpy" + }, + { + "__type__": "cc.PrefabInfo", + "root": { + "__id__": 1 + }, + "asset": { + "__id__": 0 + }, + "fileId": "672SRCTPVG+oVxrq33F4dK", + "instance": null, + "targetOverrides": null, + "nestedPrefabInstanceRoots": null + }, + { + "__type__": "cc.UITransform", + "_name": "", + "_objFlags": 0, + "__editorExtras__": {}, + "node": { + "__id__": 9 + }, + "_enabled": true, + "__prefab": { + "__id__": 23 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 100, + "height": 100 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_id": "" + }, + { + "__type__": "cc.CompPrefabInfo", + "fileId": "8fFWkeDr5AaYKs8TtHfljd" + }, + { + "__type__": "cc.PrefabInfo", + "root": { + "__id__": 1 + }, + "asset": { + "__id__": 0 + }, + "fileId": "5f3pVfF0FPz6BzPApw1y12", + "instance": null, + "targetOverrides": null, + "nestedPrefabInstanceRoots": null + }, + { + "__type__": "cc.UITransform", + "_name": "", + "_objFlags": 0, + "__editorExtras__": {}, + "node": { + "__id__": 8 + }, + "_enabled": true, + "__prefab": { + "__id__": 26 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 96, + "height": 117.80000305175781 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.4880208174387614, + "y": 0.05093378475859443 + }, + "_id": "" + }, + { + "__type__": "cc.CompPrefabInfo", + "fileId": "2epemEawRGPpO3vKyuHHBL" + }, + { + "__type__": "sp.Skeleton", + "_name": "", + "_objFlags": 0, + "__editorExtras__": {}, + "node": { + "__id__": 8 + }, + "_enabled": true, + "__prefab": { + "__id__": 28 + }, + "_customMaterial": null, + "_srcBlendFactor": 2, + "_dstBlendFactor": 4, + "_color": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_skeletonData": { + "__uuid__": "4ba2de71-96df-42bd-b2df-7b67756e16e3", + "__expectedType__": "sp.SkeletonData" + }, + "defaultSkin": "", + "defaultAnimation": "", + "_premultipliedAlpha": false, + "_timeScale": 1, + "_preCacheMode": 1, + "_cacheMode": 1, + "_sockets": [ + { + "__id__": 29 + } + ], + "_useTint": false, + "_debugMesh": false, + "_debugBones": false, + "_debugSlots": false, + "_enableBatch": false, + "loop": true, + "_id": "" + }, + { + "__type__": "cc.CompPrefabInfo", + "fileId": "d6Qb8NhhhN1ascGn7UPZok" + }, + { + "__type__": "sp.Skeleton.SpineSocket", + "path": "root/bone", + "target": { + "__id__": 9 + } + }, + { + "__type__": "d3a79W3OpNBsL5WHT9mZqHd", + "_name": "", + "_objFlags": 0, + "__editorExtras__": {}, + "node": { + "__id__": 8 + }, + "_enabled": true, + "__prefab": { + "__id__": 31 + }, + "_id": "" + }, + { + "__type__": "cc.CompPrefabInfo", + "fileId": "69mhfaIZlB4rqXSUCD6dhL" + }, + { + "__type__": "cc.PrefabInfo", + "root": { + "__id__": 1 + }, + "asset": { + "__id__": 0 + }, + "fileId": "48a+Hx9oREoZ7vqKgprKhT", + "instance": null, + "targetOverrides": null, + "nestedPrefabInstanceRoots": null + }, + { + "__type__": "cc.Node", + "_name": "top", + "_objFlags": 0, + "__editorExtras__": {}, + "_parent": { + "__id__": 1 + }, + "_children": [ + { + "__id__": 34 + } + ], + "_active": true, + "_components": [ + { + "__id__": 42 + }, + { + "__id__": 44 + } + ], + "_prefab": { + "__id__": 46 + }, + "_lpos": { + "__type__": "cc.Vec3", + "x": 0, + "y": 60, + "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": 1, + "_euler": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_id": "" + }, + { + "__type__": "cc.Node", + "_name": "lab_name", + "_objFlags": 0, + "__editorExtras__": {}, + "_parent": { + "__id__": 33 + }, + "_children": [], + "_active": true, + "_components": [ + { + "__id__": 35 + }, + { + "__id__": 37 + }, + { + "__id__": 39 + } + ], + "_prefab": { + "__id__": 41 + }, + "_lpos": { + "__type__": "cc.Vec3", + "x": 0, + "y": 17.12, + "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": 1, + "_euler": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_id": "" + }, + { + "__type__": "cc.UITransform", + "_name": "", + "_objFlags": 0, + "__editorExtras__": {}, + "node": { + "__id__": 34 + }, + "_enabled": true, + "__prefab": { + "__id__": 36 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 90.6953125, + "height": 34.24 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_id": "" + }, + { + "__type__": "cc.CompPrefabInfo", + "fileId": "c68UOAlNhN171Umca6yVvF" + }, + { + "__type__": "cc.Label", + "_name": "", + "_objFlags": 0, + "__editorExtras__": {}, + "node": { + "__id__": 34 + }, + "_enabled": true, + "__prefab": { + "__id__": 38 + }, + "_customMaterial": null, + "_srcBlendFactor": 2, + "_dstBlendFactor": 4, + "_color": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_string": "monster", + "_horizontalAlign": 1, + "_verticalAlign": 1, + "_actualFontSize": 24, + "_fontSize": 24, + "_fontFamily": "Arial", + "_lineHeight": 24, + "_overflow": 0, + "_enableWrapText": true, + "_font": null, + "_isSystemFontUsed": true, + "_spacingX": 0, + "_isItalic": false, + "_isBold": false, + "_isUnderline": false, + "_underlineHeight": 2, + "_cacheMode": 1, + "_enableOutline": true, + "_outlineColor": { + "__type__": "cc.Color", + "r": 0, + "g": 0, + "b": 0, + "a": 255 + }, + "_outlineWidth": 2, + "_enableShadow": false, + "_shadowColor": { + "__type__": "cc.Color", + "r": 0, + "g": 0, + "b": 0, + "a": 255 + }, + "_shadowOffset": { + "__type__": "cc.Vec2", + "x": 2, + "y": 2 + }, + "_shadowBlur": 2, + "_id": "" + }, + { + "__type__": "cc.CompPrefabInfo", + "fileId": "2frm37uaJHQr0AEEaYyM82" + }, + { + "__type__": "cc.LabelOutline", + "_name": "", + "_objFlags": 0, + "__editorExtras__": {}, + "node": { + "__id__": 34 + }, + "_enabled": true, + "__prefab": { + "__id__": 40 + }, + "_id": "" + }, + { + "__type__": "cc.CompPrefabInfo", + "fileId": "aeeDsd9JVLMK0M/n2WTVl7" + }, + { + "__type__": "cc.PrefabInfo", + "root": { + "__id__": 1 + }, + "asset": { + "__id__": 0 + }, + "fileId": "31uZ7ewvdKoKWqTJ+narWR", + "instance": null, + "targetOverrides": null, + "nestedPrefabInstanceRoots": null + }, + { + "__type__": "cc.UITransform", + "_name": "", + "_objFlags": 0, + "__editorExtras__": {}, + "node": { + "__id__": 33 + }, + "_enabled": true, + "__prefab": { + "__id__": 43 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 0, + "height": 34.24 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0 + }, + "_id": "" + }, + { + "__type__": "cc.CompPrefabInfo", + "fileId": "234p72JXlGdp68uJcFfl0q" + }, + { + "__type__": "cc.Layout", + "_name": "", + "_objFlags": 0, + "__editorExtras__": {}, + "node": { + "__id__": 33 + }, + "_enabled": true, + "__prefab": { + "__id__": 45 + }, + "_resizeMode": 1, + "_layoutType": 2, + "_cellSize": { + "__type__": "cc.Size", + "width": 40, + "height": 40 + }, + "_startAxis": 0, + "_paddingLeft": 0, + "_paddingRight": 0, + "_paddingTop": 0, + "_paddingBottom": 0, + "_spacingX": 0, + "_spacingY": 0, + "_verticalDirection": 1, + "_horizontalDirection": 0, + "_constraint": 0, + "_constraintNum": 2, + "_affectedByScale": false, + "_isAlign": false, + "_id": "" + }, + { + "__type__": "cc.CompPrefabInfo", + "fileId": "a5G3mGGpNLDI2/5kZx17N8" + }, + { + "__type__": "cc.PrefabInfo", + "root": { + "__id__": 1 + }, + "asset": { + "__id__": 0 + }, + "fileId": "d6Y+tOem9EaKNOQr6QHMns", + "instance": null, + "targetOverrides": null, + "nestedPrefabInstanceRoots": null + }, + { + "__type__": "cc.UITransform", + "_name": "", + "_objFlags": 0, + "__editorExtras__": {}, + "node": { + "__id__": 1 + }, + "_enabled": false, + "__prefab": { + "__id__": 48 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 100, + "height": 100 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_id": "" + }, + { + "__type__": "cc.CompPrefabInfo", + "fileId": "14OhXRCixNOaApgow/hFbp" + }, + { + "__type__": "sp.Skeleton", + "_name": "", + "_objFlags": 0, + "__editorExtras__": {}, + "node": { + "__id__": 1 + }, + "_enabled": true, + "__prefab": { + "__id__": 50 + }, + "_customMaterial": null, + "_srcBlendFactor": 2, + "_dstBlendFactor": 4, + "_color": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_skeletonData": null, + "defaultSkin": "", + "defaultAnimation": "", + "_premultipliedAlpha": true, + "_timeScale": 1, + "_preCacheMode": -1, + "_cacheMode": 0, + "_sockets": [], + "_useTint": false, + "_debugMesh": false, + "_debugBones": false, + "_debugSlots": false, + "_enableBatch": false, + "loop": true, + "_id": "" + }, + { + "__type__": "cc.CompPrefabInfo", + "fileId": "3dWWGO2rFK4LL+PeQ7ANRn" + }, + { + "__type__": "482c2FsvvZJ+5BgN3d7gY+D", + "_name": "", + "_objFlags": 0, + "__editorExtras__": {}, + "node": { + "__id__": 1 + }, + "_enabled": true, + "__prefab": { + "__id__": 52 + }, + "animator": { + "__id__": 30 + }, + "_id": "" + }, + { + "__type__": "cc.CompPrefabInfo", + "fileId": "6cDIo6gXFNnbPNuWVAqhBD" + }, + { + "__type__": "dc1b7IQTVxHfIHFfWu0u4I/", + "_name": "", + "_objFlags": 0, + "__editorExtras__": {}, + "node": { + "__id__": 1 + }, + "_enabled": true, + "__prefab": { + "__id__": 54 + }, + "_id": "" + }, + { + "__type__": "cc.CompPrefabInfo", + "fileId": "88a6VdbQBB7YwXovYCN2Sy" + }, + { + "__type__": "cc.BoxCollider2D", + "_name": "", + "_objFlags": 0, + "__editorExtras__": {}, + "node": { + "__id__": 1 + }, + "_enabled": true, + "__prefab": { + "__id__": 56 + }, + "tag": 0, + "_group": 2, + "_density": 1, + "_sensor": false, + "_friction": 0.2, + "_restitution": 0, + "_offset": { + "__type__": "cc.Vec2", + "x": 2.2, + "y": 11.2 + }, + "_size": { + "__type__": "cc.Size", + "width": 71.4, + "height": 83.3 + }, + "_id": "" + }, + { + "__type__": "cc.CompPrefabInfo", + "fileId": "b2Dt9lJI9FyJCDezkDBPBl" + }, + { + "__type__": "cc.RigidBody2D", + "_name": "", + "_objFlags": 0, + "__editorExtras__": {}, + "node": { + "__id__": 1 + }, + "_enabled": true, + "__prefab": { + "__id__": 58 + }, + "enabledContactListener": true, + "bullet": true, + "awakeOnLoad": true, + "_group": 2, + "_type": 2, + "_allowSleep": false, + "_gravityScale": 1, + "_linearDamping": 0, + "_angularDamping": 0, + "_linearVelocity": { + "__type__": "cc.Vec2", + "x": 0, + "y": 0 + }, + "_angularVelocity": 0, + "_fixedRotation": false, + "_id": "" + }, + { + "__type__": "cc.CompPrefabInfo", + "fileId": "d8rVs6intBQ7lRU8Dw4zXV" + }, + { + "__type__": "cc.PrefabInfo", + "root": { + "__id__": 1 + }, + "asset": { + "__id__": 0 + }, + "fileId": "fdklpBwCBM/qJ4WFlQF3kT", + "instance": null, + "targetOverrides": null + } +] \ No newline at end of file diff --git a/assets/resources/game/monster/hero.prefab.meta b/assets/resources/game/monster/hero.prefab.meta new file mode 100644 index 00000000..477bd0ec --- /dev/null +++ b/assets/resources/game/monster/hero.prefab.meta @@ -0,0 +1,13 @@ +{ + "ver": "1.1.50", + "importer": "prefab", + "imported": true, + "uuid": "42a5e9a1-8664-4eee-ab17-56cb55b545b2", + "files": [ + ".json" + ], + "subMetas": {}, + "userData": { + "syncNodeName": "hero" + } +} diff --git a/assets/script/Main.ts b/assets/script/Main.ts index 62d7c158..42129193 100644 --- a/assets/script/Main.ts +++ b/assets/script/Main.ts @@ -24,14 +24,14 @@ export class Main extends Root { protected async run() { smc.initialize = ecs.getEntity(Initialize); smc.monsters = [ - {prefab_path:'niu',name:'m1',speed:110}, + {prefab_path:'hero',name:'lang',speed:110}, // {prefab_path:'niu',name:'m2',speed:80}, // {prefab_path:'niu',name:'m3',speed:40}, // {prefab_path:'niu',name:'m4',speed:80}, ] smc.heros = [ - {prefab_path:'niu',name:'war',speed:110}, - // {prefab_path:'niu',name:'magic',speed:60}, + // {prefab_path:'niu',name:'war',speed:110}, + {prefab_path:'hero',name:'hero',speed:60}, // {prefab_path:'niu',name:'heath',speed:60}, // {prefab_path:'niu',name:'war',speed:60}, ] diff --git a/assets/script/game/monster/Monster.ts b/assets/script/game/monster/Monster.ts index 237a6d34..956b7f59 100644 --- a/assets/script/game/monster/Monster.ts +++ b/assets/script/game/monster/Monster.ts @@ -5,7 +5,7 @@ * @LastEditors: dgflash * @LastEditTime: 2022-08-04 15:43:04 */ -import { instantiate, Node, Prefab, Vec3 ,tween, v3,Collider2D,Contact2DType,PhysicsSystem2D,IPhysics2DContact, animation,Label} from "cc"; +import { instantiate, Node, Prefab, Vec3 ,tween, v3,Collider2D,Contact2DType,PhysicsSystem2D,IPhysics2DContact, animation,Label,resources,SpriteFrame,Sprite} from "cc"; import { UICallbacks } from "../../../../extensions/oops-plugin-framework/assets/core/gui/layer/Defines"; import { oops } from "../../../../extensions/oops-plugin-framework/assets/core/Oops"; import { ecs } from "../../../../extensions/oops-plugin-framework/assets/libs/ecs/ECS"; @@ -46,6 +46,15 @@ export class Monster extends ecs.Entity { node.getChildByName("avatar").setScale(node.getChildByName("avatar").scale.x*camp, node.getChildByName("avatar").scale.y, node.getChildByName("avatar").scale.z); node.setPosition(pos) + console.log(node.getChildByName("avatar").getChildByName("TNode").getChildByName("bb").getComponent(Sprite)) + const url = 'game/heros/hero/'+name+'/spriteFrame'; + resources.load(url, SpriteFrame, (err: any, spriteFrame) => { + const sprite = node.getChildByName("avatar").getChildByName("TNode").getChildByName("bb").getComponent(Sprite); + + sprite.spriteFrame = spriteFrame; + }); + + var mv = node.getComponent(MonsterViewComp)!; mv.speed =mv.ospeed = speed; mv.hero_name= name; diff --git a/assets/script/game/monster/MonsterViewComp.ts b/assets/script/game/monster/MonsterViewComp.ts index 17ec2cd1..cca012a4 100644 --- a/assets/script/game/monster/MonsterViewComp.ts +++ b/assets/script/game/monster/MonsterViewComp.ts @@ -97,11 +97,11 @@ export class MonsterViewComp extends CCComp { this.as = this.getComponent(MonsterSpine); // console.log('hero load ent:',this); - PhysicsSystem2D.instance.debugDrawFlags = EPhysics2DDrawFlags.Aabb | - EPhysics2DDrawFlags.Pair | - EPhysics2DDrawFlags.CenterOfMass | - EPhysics2DDrawFlags.Joint | - EPhysics2DDrawFlags.Shape; + // PhysicsSystem2D.instance.debugDrawFlags = EPhysics2DDrawFlags.Aabb | + // EPhysics2DDrawFlags.Pair | + // EPhysics2DDrawFlags.CenterOfMass | + // EPhysics2DDrawFlags.Joint | + // EPhysics2DDrawFlags.Shape; } change_name(hero_name:string='hero',camp:number=1){ this.name=hero_name;