重做 局内经验的利用,加攻 加血,特殊技能,todo:先完成物品设定

This commit is contained in:
2024-11-25 00:02:07 +08:00
parent 5a268cc8f2
commit 2d4d564c1f
31 changed files with 5212 additions and 6212 deletions

View File

@@ -0,0 +1,9 @@
{
"ver": "1.2.0",
"importer": "directory",
"imported": true,
"uuid": "4d1a9382-0a99-4c52-9f52-d0867ebf0f12",
"files": [],
"subMetas": {},
"userData": {}
}

View File

@@ -0,0 +1,561 @@
[
{
"__type__": "cc.Prefab",
"_name": "item",
"_objFlags": 0,
"__editorExtras__": {},
"_native": "",
"data": {
"__id__": 1
},
"optimizationPolicy": 0,
"persistent": false
},
{
"__type__": "cc.Node",
"_name": "item",
"_objFlags": 0,
"__editorExtras__": {},
"_parent": null,
"_children": [
{
"__id__": 2
},
{
"__id__": 8
},
{
"__id__": 14
}
],
"_active": true,
"_components": [
{
"__id__": 20
},
{
"__id__": 22
}
],
"_prefab": {
"__id__": 24
},
"_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.Node",
"_name": "bg",
"_objFlags": 0,
"__editorExtras__": {},
"_parent": {
"__id__": 1
},
"_children": [],
"_active": true,
"_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": 1073741824,
"_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": 128,
"height": 130
},
"_anchorPoint": {
"__type__": "cc.Vec2",
"x": 0.5,
"y": 0.5
},
"_id": ""
},
{
"__type__": "cc.CompPrefabInfo",
"fileId": "08/hD4/ZlOkZoJDDjU95Xj"
},
{
"__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__": "f87f53f9-2fba-4a5b-968a-79a593311ab2@b03fe",
"__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": "e6ZZ/ngyBLE5TAa6uoynsh"
},
{
"__type__": "cc.PrefabInfo",
"root": {
"__id__": 1
},
"asset": {
"__id__": 0
},
"fileId": "0dLGvtUJJGQplUEIoE7XXw",
"instance": null,
"targetOverrides": null,
"nestedPrefabInstanceRoots": null
},
{
"__type__": "cc.Node",
"_name": "icon",
"_objFlags": 0,
"__editorExtras__": {},
"_parent": {
"__id__": 1
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 9
},
{
"__id__": 11
}
],
"_prefab": {
"__id__": 13
},
"_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__": 8
},
"_enabled": true,
"__prefab": {
"__id__": 10
},
"_contentSize": {
"__type__": "cc.Size",
"width": 100,
"height": 80
},
"_anchorPoint": {
"__type__": "cc.Vec2",
"x": 0.5,
"y": 0.5
},
"_id": ""
},
{
"__type__": "cc.CompPrefabInfo",
"fileId": "51tobGXK5GZrXW3D4sTQql"
},
{
"__type__": "cc.Sprite",
"_name": "",
"_objFlags": 0,
"__editorExtras__": {},
"node": {
"__id__": 8
},
"_enabled": true,
"__prefab": {
"__id__": 12
},
"_customMaterial": null,
"_srcBlendFactor": 2,
"_dstBlendFactor": 4,
"_color": {
"__type__": "cc.Color",
"r": 147,
"g": 153,
"b": 122,
"a": 255
},
"_spriteFrame": {
"__uuid__": "7b0e7263-3b25-4fec-8935-abdd67c4b86d@87926",
"__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": "bcFOmAjrZGSJ7YaDS9vORF"
},
{
"__type__": "cc.PrefabInfo",
"root": {
"__id__": 1
},
"asset": {
"__id__": 0
},
"fileId": "c5SVMybnRAR4HoIGOlG0SF",
"instance": null,
"targetOverrides": null,
"nestedPrefabInstanceRoots": null
},
{
"__type__": "cc.Node",
"_name": "num",
"_objFlags": 0,
"__editorExtras__": {},
"_parent": {
"__id__": 1
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 15
},
{
"__id__": 17
}
],
"_prefab": {
"__id__": 19
},
"_lpos": {
"__type__": "cc.Vec3",
"x": 14.988,
"y": -34.972,
"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__": 14
},
"_enabled": true,
"__prefab": {
"__id__": 16
},
"_contentSize": {
"__type__": "cc.Size",
"width": 90,
"height": 56.4
},
"_anchorPoint": {
"__type__": "cc.Vec2",
"x": 0.5,
"y": 0.5
},
"_id": ""
},
{
"__type__": "cc.CompPrefabInfo",
"fileId": "81SMffAS9PNqslRdyen4BR"
},
{
"__type__": "cc.Label",
"_name": "",
"_objFlags": 0,
"__editorExtras__": {},
"node": {
"__id__": 14
},
"_enabled": true,
"__prefab": {
"__id__": 18
},
"_customMaterial": null,
"_srcBlendFactor": 2,
"_dstBlendFactor": 4,
"_color": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 255
},
"_string": "99999",
"_horizontalAlign": 1,
"_verticalAlign": 1,
"_actualFontSize": 31,
"_fontSize": 30,
"_fontFamily": "Arial",
"_lineHeight": 30,
"_overflow": 2,
"_enableWrapText": true,
"_font": null,
"_isSystemFontUsed": true,
"_spacingX": 0,
"_isItalic": false,
"_isBold": false,
"_isUnderline": false,
"_underlineHeight": 2,
"_cacheMode": 0,
"_enableOutline": true,
"_outlineColor": {
"__type__": "cc.Color",
"r": 0,
"g": 0,
"b": 0,
"a": 255
},
"_outlineWidth": 3,
"_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": "64kGiRb6lK5L7/ncZplLMZ"
},
{
"__type__": "cc.PrefabInfo",
"root": {
"__id__": 1
},
"asset": {
"__id__": 0
},
"fileId": "a0r58OZEBFnZJPySGwmYEb",
"instance": null,
"targetOverrides": null,
"nestedPrefabInstanceRoots": null
},
{
"__type__": "cc.UITransform",
"_name": "",
"_objFlags": 0,
"__editorExtras__": {},
"node": {
"__id__": 1
},
"_enabled": true,
"__prefab": {
"__id__": 21
},
"_contentSize": {
"__type__": "cc.Size",
"width": 100,
"height": 100
},
"_anchorPoint": {
"__type__": "cc.Vec2",
"x": 0.5,
"y": 0.5
},
"_id": ""
},
{
"__type__": "cc.CompPrefabInfo",
"fileId": "53rR9JSr5FAoUbwo0ZB5s8"
},
{
"__type__": "b3d7bQfUYVKCraQiXgA4mTv",
"_name": "",
"_objFlags": 0,
"__editorExtras__": {},
"node": {
"__id__": 1
},
"_enabled": true,
"__prefab": {
"__id__": 23
},
"_id": ""
},
{
"__type__": "cc.CompPrefabInfo",
"fileId": "a3fT984fVMY6kPqXqb9G8d"
},
{
"__type__": "cc.PrefabInfo",
"root": {
"__id__": 1
},
"asset": {
"__id__": 0
},
"fileId": "c46/YsCPVOJYA4mWEpNYRx",
"instance": null,
"targetOverrides": null
}
]

View File

@@ -0,0 +1,13 @@
{
"ver": "1.1.50",
"importer": "prefab",
"imported": true,
"uuid": "a8eef812-551a-46fc-9dc2-b5b544e00d36",
"files": [
".json"
],
"subMetas": {},
"userData": {
"syncNodeName": "item"
}
}

View File

@@ -2,7 +2,7 @@
"ver": "1.1.50",
"importer": "prefab",
"imported": true,
"uuid": "990bf7b1-39b3-4221-9ace-051006735228",
"uuid": "db911dbb-a055-41f8-ba26-706b423a3a52",
"files": [
".json"
],

View File

@@ -4,273 +4,228 @@
<dict>
<key>frames</key>
<dict>
<key>6101.png</key>
<key>card1.png</key>
<dict>
<key>aliases</key>
<array/>
<key>spriteOffset</key>
<string>{0,-2}</string>
<string>{0,0}</string>
<key>spriteSize</key>
<string>{25,69}</string>
<string>{200,114}</string>
<key>spriteSourceSize</key>
<string>{75,75}</string>
<string>{200,114}</string>
<key>textureRect</key>
<string>{{1,1},{25,69}}</string>
<string>{{202,1},{200,114}}</string>
<key>textureRotated</key>
<true/>
</dict>
<key>6102.png</key>
<key>card2.png</key>
<dict>
<key>aliases</key>
<array/>
<key>spriteOffset</key>
<string>{0,-1}</string>
<string>{0,0}</string>
<key>spriteSize</key>
<string>{45,73}</string>
<string>{200,114}</string>
<key>spriteSourceSize</key>
<string>{75,75}</string>
<string>{200,114}</string>
<key>textureRect</key>
<string>{{44,437},{45,73}}</string>
<string>{{318,1},{200,114}}</string>
<key>textureRotated</key>
<true/>
</dict>
<key>6103.png</key>
<key>common_icon_booster.png</key>
<dict>
<key>aliases</key>
<array/>
<key>spriteOffset</key>
<string>{0,-2}</string>
<string>{0,1}</string>
<key>spriteSize</key>
<string>{41,71}</string>
<string>{60,62}</string>
<key>spriteSourceSize</key>
<string>{75,75}</string>
<string>{64,64}</string>
<key>textureRect</key>
<string>{{1,403},{41,71}}</string>
<string>{{434,1},{60,62}}</string>
<key>textureRotated</key>
<false/>
</dict>
<key>6210.png</key>
<key>common_icon_clover.png</key>
<dict>
<key>aliases</key>
<array/>
<key>spriteOffset</key>
<string>{0,-2}</string>
<string>{0,0}</string>
<key>spriteSize</key>
<string>{51,57}</string>
<string>{56,62}</string>
<key>spriteSourceSize</key>
<string>{75,75}</string>
<string>{64,64}</string>
<key>textureRect</key>
<string>{{72,1},{51,57}}</string>
<string>{{434,65},{56,62}}</string>
<key>textureRotated</key>
<false/>
</dict>
<key>6211.png</key>
<key>common_icon_diamond_blue.png</key>
<dict>
<key>aliases</key>
<array/>
<key>spriteOffset</key>
<string>{0,-2}</string>
<key>spriteSize</key>
<string>{51,59}</string>
<string>{56,50}</string>
<key>spriteSourceSize</key>
<string>{75,75}</string>
<string>{64,64}</string>
<key>textureRect</key>
<string>{{1,28},{51,59}}</string>
<string>{{266,203},{56,50}}</string>
<key>textureRotated</key>
<false/>
</dict>
<key>common_icon_diamond_green.png</key>
<dict>
<key>aliases</key>
<array/>
<key>spriteOffset</key>
<string>{0,-2}</string>
<key>spriteSize</key>
<string>{56,50}</string>
<key>spriteSourceSize</key>
<string>{64,64}</string>
<key>textureRect</key>
<string>{{324,203},{56,50}}</string>
<key>textureRotated</key>
<false/>
</dict>
<key>common_icon_diamond_purple.png</key>
<dict>
<key>aliases</key>
<array/>
<key>spriteOffset</key>
<string>{0,-2}</string>
<key>spriteSize</key>
<string>{56,50}</string>
<key>spriteSourceSize</key>
<string>{64,64}</string>
<key>textureRect</key>
<string>{{382,203},{56,50}}</string>
<key>textureRotated</key>
<false/>
</dict>
<key>common_icon_gem_blue.png</key>
<dict>
<key>aliases</key>
<array/>
<key>spriteOffset</key>
<string>{0,0}</string>
<key>spriteSize</key>
<string>{50,56}</string>
<key>spriteSourceSize</key>
<string>{64,64}</string>
<key>textureRect</key>
<string>{{434,129},{50,56}}</string>
<key>textureRotated</key>
<false/>
</dict>
<key>common_icon_gem_green.png</key>
<dict>
<key>aliases</key>
<array/>
<key>spriteOffset</key>
<string>{0,0}</string>
<key>spriteSize</key>
<string>{50,56}</string>
<key>spriteSourceSize</key>
<string>{64,64}</string>
<key>textureRect</key>
<string>{{440,187},{50,56}}</string>
<key>textureRotated</key>
<false/>
</dict>
<key>common_icon_gem_hexagon_blue.png</key>
<dict>
<key>aliases</key>
<array/>
<key>spriteOffset</key>
<string>{0,0}</string>
<key>spriteSize</key>
<string>{48,56}</string>
<key>spriteSourceSize</key>
<string>{64,64}</string>
<key>textureRect</key>
<string>{{492,65},{48,56}}</string>
<key>textureRotated</key>
<false/>
</dict>
<key>common_icon_gem_hexagon_green.png</key>
<dict>
<key>aliases</key>
<array/>
<key>spriteOffset</key>
<string>{0,0}</string>
<key>spriteSize</key>
<string>{48,56}</string>
<key>spriteSourceSize</key>
<string>{64,64}</string>
<key>textureRect</key>
<string>{{496,1},{48,56}}</string>
<key>textureRotated</key>
<false/>
</dict>
<key>common_icon_gem_hexagon_purple.png</key>
<dict>
<key>aliases</key>
<array/>
<key>spriteOffset</key>
<string>{0,0}</string>
<key>spriteSize</key>
<string>{48,56}</string>
<key>spriteSourceSize</key>
<string>{64,64}</string>
<key>textureRect</key>
<string>{{492,187},{48,56}}</string>
<key>textureRotated</key>
<false/>
</dict>
<key>common_icon_gem_purple.png</key>
<dict>
<key>aliases</key>
<array/>
<key>spriteOffset</key>
<string>{0,0}</string>
<key>spriteSize</key>
<string>{50,56}</string>
<key>spriteSourceSize</key>
<string>{64,64}</string>
<key>textureRect</key>
<string>{{486,129},{50,56}}</string>
<key>textureRotated</key>
<false/>
</dict>
<key>common_icon_mana.png</key>
<dict>
<key>aliases</key>
<array/>
<key>spriteOffset</key>
<string>{0,0}</string>
<key>spriteSize</key>
<string>{50,62}</string>
<key>spriteSourceSize</key>
<string>{64,64}</string>
<key>textureRect</key>
<string>{{202,203},{50,62}}</string>
<key>textureRotated</key>
<true/>
</dict>
<key>6212.png</key>
<key>icon.png</key>
<dict>
<key>aliases</key>
<array/>
<key>spriteOffset</key>
<string>{0,-2}</string>
<string>{0,0}</string>
<key>spriteSize</key>
<string>{53,57}</string>
<string>{250,199}</string>
<key>spriteSourceSize</key>
<string>{75,75}</string>
<string>{250,199}</string>
<key>textureRect</key>
<string>{{62,272},{53,57}}</string>
<key>textureRotated</key>
<true/>
</dict>
<key>6213.png</key>
<dict>
<key>aliases</key>
<array/>
<key>spriteOffset</key>
<string>{0,-2}</string>
<key>spriteSize</key>
<string>{51,57}</string>
<key>spriteSourceSize</key>
<string>{75,75}</string>
<key>textureRect</key>
<string>{{62,60},{51,57}}</string>
<key>textureRotated</key>
<true/>
</dict>
<key>6214.png</key>
<dict>
<key>aliases</key>
<array/>
<key>spriteOffset</key>
<string>{0,-2}</string>
<key>spriteSize</key>
<string>{51,59}</string>
<key>spriteSourceSize</key>
<string>{75,75}</string>
<key>textureRect</key>
<string>{{1,81},{51,59}}</string>
<key>textureRotated</key>
<true/>
</dict>
<key>6215.png</key>
<dict>
<key>aliases</key>
<array/>
<key>spriteOffset</key>
<string>{0,-2}</string>
<key>spriteSize</key>
<string>{53,57}</string>
<key>spriteSourceSize</key>
<string>{75,75}</string>
<key>textureRect</key>
<string>{{1,293},{53,57}}</string>
<key>textureRotated</key>
<true/>
</dict>
<key>6216.png</key>
<dict>
<key>aliases</key>
<array/>
<key>spriteOffset</key>
<string>{0,-2}</string>
<key>spriteSize</key>
<string>{51,57}</string>
<key>spriteSourceSize</key>
<string>{75,75}</string>
<key>textureRect</key>
<string>{{62,113},{51,57}}</string>
<key>textureRotated</key>
<true/>
</dict>
<key>6217.png</key>
<dict>
<key>aliases</key>
<array/>
<key>spriteOffset</key>
<string>{0,-2}</string>
<key>spriteSize</key>
<string>{51,59}</string>
<key>spriteSourceSize</key>
<string>{75,75}</string>
<key>textureRect</key>
<string>{{1,134},{51,59}}</string>
<key>textureRotated</key>
<true/>
</dict>
<key>6218.png</key>
<dict>
<key>aliases</key>
<array/>
<key>spriteOffset</key>
<string>{0,-2}</string>
<key>spriteSize</key>
<string>{53,57}</string>
<key>spriteSourceSize</key>
<string>{75,75}</string>
<key>textureRect</key>
<string>{{60,327},{53,57}}</string>
<key>textureRotated</key>
<true/>
</dict>
<key>6219.png</key>
<dict>
<key>aliases</key>
<array/>
<key>spriteOffset</key>
<string>{0,-2}</string>
<key>spriteSize</key>
<string>{51,57}</string>
<key>spriteSourceSize</key>
<string>{75,75}</string>
<key>textureRect</key>
<string>{{62,166},{51,57}}</string>
<key>textureRotated</key>
<true/>
</dict>
<key>6220.png</key>
<dict>
<key>aliases</key>
<array/>
<key>spriteOffset</key>
<string>{0,-2}</string>
<key>spriteSize</key>
<string>{51,59}</string>
<key>spriteSourceSize</key>
<string>{75,75}</string>
<key>textureRect</key>
<string>{{1,187},{51,59}}</string>
<key>textureRotated</key>
<true/>
</dict>
<key>6221.png</key>
<dict>
<key>aliases</key>
<array/>
<key>spriteOffset</key>
<string>{0,-2}</string>
<key>spriteSize</key>
<string>{53,57}</string>
<key>spriteSourceSize</key>
<string>{75,75}</string>
<key>textureRect</key>
<string>{{1,348},{53,57}}</string>
<key>textureRotated</key>
<true/>
</dict>
<key>6222.png</key>
<dict>
<key>aliases</key>
<array/>
<key>spriteOffset</key>
<string>{0,-2}</string>
<key>spriteSize</key>
<string>{51,57}</string>
<key>spriteSourceSize</key>
<string>{75,75}</string>
<key>textureRect</key>
<string>{{62,219},{51,57}}</string>
<key>textureRotated</key>
<true/>
</dict>
<key>6223.png</key>
<dict>
<key>aliases</key>
<array/>
<key>spriteOffset</key>
<string>{0,-2}</string>
<key>spriteSize</key>
<string>{51,59}</string>
<key>spriteSourceSize</key>
<string>{75,75}</string>
<key>textureRect</key>
<string>{{1,240},{51,59}}</string>
<key>textureRotated</key>
<true/>
</dict>
<key>6224.png</key>
<dict>
<key>aliases</key>
<array/>
<key>spriteOffset</key>
<string>{0,-2}</string>
<key>spriteSize</key>
<string>{53,57}</string>
<key>spriteSourceSize</key>
<string>{75,75}</string>
<key>textureRect</key>
<string>{{60,382},{53,57}}</string>
<string>{{1,1},{250,199}}</string>
<key>textureRotated</key>
<true/>
</dict>
@@ -286,9 +241,9 @@
<key>realTextureFileName</key>
<string>items.png</string>
<key>size</key>
<string>{124,483}</string>
<string>{545,254}</string>
<key>smartupdate</key>
<string>$TexturePacker:SmartUpdate:671011b65ec4fb11756d352be9e08b7c:cae8805e011529edb8d3fc80a324ae96:9b2c40378ce3448cae3ca053079d3001$</string>
<string>$TexturePacker:SmartUpdate:e0bc99444925f1687583176ee981135f:4bfad5a9460c06869bd8de745d5baa53:9b2c40378ce3448cae3ca053079d3001$</string>
<key>textureFileName</key>
<string>items.png</string>
</dict>

File diff suppressed because it is too large Load Diff

Binary file not shown.

Before

Width:  |  Height:  |  Size: 21 KiB

After

Width:  |  Height:  |  Size: 65 KiB

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@@ -168,7 +168,7 @@ export class BossViewComp extends CCComp {
update(dt: number){
if(smc.vm_data.game_over||smc.vm_data.game_pause){
if(smc.vmdata.game_over||smc.vmdata.game_pause){
return
}
if (this.timer.update(dt)) {

View File

@@ -51,8 +51,8 @@ export class Role extends ecs.Entity {
}
hero_init(uuid:number=1001,node:Node,pos:Vec3=v3(0,0,0)){
var rv = node.getComponent(RoleViewComp)!;
let role=smc.vm_data.role;
let role_talent= smc.vm_data.talent
let role=smc.vmdata.role;
let role_talent= smc.vmdata.talent
let talents=Talents;
rv.hero_uuid=uuid;
rv.speed =rv.ospeed = role.speed;

View File

@@ -112,7 +112,7 @@ export class RoleViewComp extends CCComp {
// this.orginalFlashMaterial = this.sprite.getRenderMaterial(0);
// 注册单个碰撞体的回调函数
let collider = this.getComponent(Collider2D);
smc.vm_data.role.atk_time=smc.vm_data.role.atk_cd;
smc.vmdata.role.atk_time=smc.vmdata.role.atk_cd;
collider.group = this.box_group;
if (collider) {
collider.on(Contact2DType.BEGIN_CONTACT, this.onBeginContact, this);
@@ -177,7 +177,7 @@ export class RoleViewComp extends CCComp {
update(dt: number){
if(!smc.vm_data.mission.play||smc.vm_data.pause){
if(!smc.vmdata.mission.play||smc.vmdata.pause){
return
}
if (this.timer.update(dt)) {
@@ -187,7 +187,7 @@ export class RoleViewComp extends CCComp {
this.check_buff_atks(dt)
this.in_shield(dt);
this.in_stop(dt);
smc.vm_data.role.atk_time -= dt;
smc.vmdata.role.atk_time -= dt;
this.in_atk();
this.skill_cds(dt);
this.move(dt);
@@ -323,16 +323,16 @@ export class RoleViewComp extends CCComp {
}
}
in_atk() {
if(smc.vm_data.role.atk_time <= 0 ){
if(smc.vmdata.role.atk_time <= 0 ){
if(this.is_atking){
smc.vm_data.role.atk_time = smc.vm_data.role.atk_cd;
console.log("atk_cd:"+smc.vm_data.role.atk_cd);
smc.vmdata.role.atk_time = smc.vmdata.role.atk_cd;
console.log("atk_cd:"+smc.vmdata.role.atk_cd);
this.as.atk();
this.scheduleOnce(()=>{
this.shoot(this.skill,0,30);
},0.4)
}
// smc.vm_data.role.atk_time = 0;
// smc.vmdata.role.atk_time = 0;
// this.as.atk();
// this.scheduleOnce(()=>{
// this.shoot(this.skill,-30,45);
@@ -373,7 +373,7 @@ export class RoleViewComp extends CCComp {
this.dead();
this.is_dead = true;
this.ent.remove(MoveToComp)
smc.vm_data.game_over = true;
smc.vmdata.game_over = true;
setTimeout(() => {
this.ent.destroy();
}, 15);

View File

@@ -19,7 +19,7 @@ export class TalentComp extends CCComp {
let cost =this.node.getChildByName("cost")
let lv =this.node.getChildByName("lv")
let talent= Talents[this.t_uuid]
let role_talents = smc.vm_data.talent[talent.uuid]
let role_talents = smc.vmdata.talent[talent.uuid]
cost.getComponent(Label).string = (talent.cost*(1+role_talents.lv)).toString()
name.getComponent(Label).string = talent.name
info.getComponent(Label).string = talent.info

View File

@@ -58,7 +58,7 @@ export class SingletonModuleComp extends ecs.Comp {
heros_dead:any = []
hero_pos:any=[]
enemy_pos:any =[]
vm_data: any = {
vmdata: any = {
name : "纸片精灵大乱斗",
game_over:false,
game_pause:false,
@@ -71,14 +71,35 @@ export class SingletonModuleComp extends ecs.Comp {
victory:0,
once:6, //每波刷新怪物数量
total:1, //总怪物数
a_exp:0, //近战经验
b_exp:0, //远程经验石
c_exp:0, //辅助经验石
d_exp:0, //特殊经验石
ma_exp:0, //敌方近战经验
mb_exp:0, //敌方远程经验石
mc_exp:0, //敌方辅助经验石
md_exp:0, //敌方特殊经验石
a_exp:0, //攻击经验
a_up_exp:10,
a_up:5, //每次增加的ap量
ap:0,
h_exp:0, //生命值经验
h_up_exp:10,
h_up:5, //每次增加的hp量
hp:0,
s_exp:0, //场地技能经验
s_up_exp:10,
s_up:5,
d_exp:0, //特殊经验
d_up_exp:10,
d_up:5,
ma_exp:0, //敌方攻击经验
ma_up_exp:10,
ma_up:5,
map:0,
mh_exp:0, //敌方生命经验
mh_up_exp:10,
mh_up:5,
mhp:0,
ms_exp:0, //敌方场地技能经验
ms_up_exp:10,
ms_up:5,
md_exp:0, //敌方特殊经验
md_up_exp:10,
md_up:5,
reward_num:0, //怪物死亡数
reward_gold:0,
reward_exp:0,
@@ -119,12 +140,12 @@ export class SingletonModuleComp extends ecs.Comp {
}
};
vmAdd() {
VM.add(this.vm_data, "data");
VM.add(this.vmdata, "data");
}
reset() {
for (var key in this.vm_data) {
delete this.vm_data[key];
for (var key in this.vmdata) {
delete this.vmdata[key];
}
}
}

View File

@@ -6,21 +6,20 @@ type:
*/
export const Items={
1001:{uuid: 1001,path: "1001",type: 1,r_num:10,name: "近战经验卷轴",info:"提升普通近战英雄等级", },
1002:{uuid: 1002,path: "1001",type: 1,r_num:10,name: "远程经验卷轴",info:"提升普通远程英雄等级", },
1003:{uuid: 1003,path: "1001",type: 1,r_num:10,name: "辅助经验卷轴",info:"提升普通辅助英雄等级", },
1004:{uuid: 1004,path: "1001",type: 1,r_num:10,name: "<传说>近战经验卷轴",info:"提升<传说>近战英雄等级", },
1005:{uuid: 1005,path: "1001",type: 1,r_num:10,name: "<传说>远程经验卷轴",info:"提升<传说>远程英雄等级", },
1006:{uuid: 1006,path: "1001",type: 1,r_num:10,name: "<传说>辅助经验卷轴",info:"提升<传说>辅助英雄等级", },
1007:{uuid: 1007,path: "1001",type: 1,r_num:1,name: "近战英雄原石",info:"普通近战英雄升星", },
1008:{uuid: 1008,path: "1001",type: 1,r_num:1,name: "远程英雄原石",info:"普通远程英雄升星", },
1009:{uuid: 1009,path: "1001",type: 1,r_num:1,name: "辅助英雄原石",info:"普通辅助英雄升星", },
1010:{uuid: 1010,path: "1001",type: 1,r_num:1,name: "<传说>近战英雄原石",info:"<传说>近战英雄升星", },
1011:{uuid: 1011,path: "1001",type: 1,r_num:1,name: "<传说>远程英雄原石",info:"<传说>远程英雄升星", },
1012:{uuid: 1012,path: "1001",type: 1,r_num:1,name: "<传说>辅助英雄原石",info:"<传说>辅助英雄升星", },
1013:{uuid: 1013,path: "1001",type: 1,r_num:1,name: "英雄召唤券",info:"普通英雄召唤券,无法召唤传说英雄", },
1014:{uuid: 1014,path: "1001",type: 1,r_num:1,name: "<高级>英雄召唤券",info:"<高级>英雄召唤券,召唤传说英雄机率提升", },
1015:{uuid: 1015,path: "1001",type: 1,r_num:1,name: "<传说>英雄召唤券",info:"<传说>英雄召唤券,召唤传说英雄机率大幅提升", },
1001:{uuid: 1001,path: "1001",type: 1,r_num:10,name: "近战卷轴",info:"提升普通近战英雄等级", },
1002:{uuid: 1002,path: "1001",type: 1,r_num:10,name: "远程卷轴",info:"提升普通远程英雄等级", },
1003:{uuid: 1003,path: "1001",type: 1,r_num:10,name: "辅助卷轴",info:"提升普通辅助英雄等级", },
1004:{uuid: 1004,path: "1001",type: 1,r_num:10,name: "<传说>近战卷轴",info:"提升<传说>近战英雄等级", },
1005:{uuid: 1005,path: "1001",type: 1,r_num:10,name: "<传说>远程卷轴",info:"提升<传说>远程英雄等级", },
1006:{uuid: 1006,path: "1001",type: 1,r_num:10,name: "<传说>辅助卷轴",info:"提升<传说>辅助英雄等级", },
1007:{uuid: 1007,path: "1001",type: 1,r_num:1,name: "近战原石",info:"普通近战英雄升星", },
1008:{uuid: 1008,path: "1001",type: 1,r_num:1,name: "远程原石",info:"普通远程英雄升星", },
1009:{uuid: 1009,path: "1001",type: 1,r_num:1,name: "辅助原石",info:"普通辅助英雄升星", },
1010:{uuid: 1010,path: "1001",type: 1,r_num:1,name: "<传说>近战原石",info:"<传说>近战英雄升星", },
1011:{uuid: 1011,path: "1001",type: 1,r_num:1,name: "<传说>远程原石",info:"<传说>远程英雄升星", },
1012:{uuid: 1012,path: "1001",type: 1,r_num:1,name: "<传说>辅助原石",info:"<传说>辅助英雄升星", },
1013:{uuid: 1013,path: "1001",type: 1,r_num:1,name: "召唤券",info:"普通召唤券,无法召唤传说英雄", },
1014:{uuid: 1014,path: "1001",type: 1,r_num:1,name: "<高级>召唤券",info:"<高级>英雄召唤券,召唤传说英雄机率提升", },
1015:{uuid: 1015,path: "1001",type: 1,r_num:1,name: "<传说>召唤券",info:"<传说>英雄召唤券,召唤传说英雄机率大幅提升", },
}

View File

@@ -71,8 +71,8 @@ export class Hero extends ecs.Entity {
var hv = node.getComponent(HeroViewComp)!;
// console.log("hero_init",buff)
let HInf= smc.heros[uuid] // 角色数据
let talent= smc.vm_data.talent
let hero =smc.vm_data.heros[uuid]
let talent= smc.vmdata.talent
let hero =smc.vmdata.heros[uuid]
let talents=Talents;
hv.scale = scale;
hv.box_group = box_group;

View File

@@ -205,7 +205,7 @@ export class HeroViewComp extends CCComp {
onPostSolve (selfCollider: Collider2D, otherCollider: Collider2D) {
}
update(dt: number){
if(!smc.vm_data.mission.play||smc.vm_data.pause) return
if(!smc.vmdata.mission.play||smc.vmdata.pause) return
if(this.is_dead) {
if(!this.in_grave()) this.to_grave()
return
@@ -279,7 +279,7 @@ export class HeroViewComp extends CCComp {
}
}
move(dt: number){
if(this.stop_cd > 0||smc.vm_data.mission.is_victory||smc.vm_data.mission.is_defeat){
if(this.stop_cd > 0||smc.vmdata.mission.is_victory||smc.vmdata.mission.is_defeat){
this.status_change("idle")
return
}
@@ -436,14 +436,14 @@ export class HeroViewComp extends CCComp {
}
exp_add(exp:number){
if(this.box_group==BoxSet.HERO){
if(this.type == 1)smc.vm_data.mission.a_exp +=exp
if(this.type == 2)smc.vm_data.mission.b_exp +=exp
if(this.type == 3)smc.vm_data.mission.c_exp +=exp
if(this.type == 1)smc.vmdata.mission.a_exp +=exp
if(this.type == 2)smc.vmdata.mission.h_exp +=exp
if(this.type == 3)smc.vmdata.mission.s_exp +=exp
}
if(this.box_group==BoxSet.MONSTER){
if(this.type == 1)smc.vm_data.mission.ma_exp +=exp
if(this.type == 2)smc.vm_data.mission.mb_exp +=exp
if(this.type == 3)smc.vm_data.mission.mc_exp +=exp
if(this.type == 1)smc.vmdata.mission.ma_exp +=exp
if(this.type == 2)smc.vmdata.mission.mh_exp +=exp
if(this.type == 3)smc.vmdata.mission.ms_exp +=exp
}
}
//使用max_skill

View File

@@ -157,13 +157,13 @@ export class CardControllerComp extends CCComp {
// console.log("show_info",uuid)
let node =this.node.getChildByName("item_box")
if(type == 2){
smc.vm_data.item_box.info = smc.sitems[uuid].info
smc.vm_data.item_box.name = smc.sitems[uuid].name
smc.vm_data.item_box.skillcd = smc.sitems[uuid].cd
smc.vm_data.item_box.skillsd = smc.sitems[uuid].sd
smc.vm_data.item_box.atk = smc.sitems[uuid].atk
smc.vm_data.item_box.hp = smc.sitems[uuid].hp
smc.vm_data.item_box.shield = smc.sitems[uuid].shield
smc.vmdata.item_box.info = smc.sitems[uuid].info
smc.vmdata.item_box.name = smc.sitems[uuid].name
smc.vmdata.item_box.skillcd = smc.sitems[uuid].cd
smc.vmdata.item_box.skillsd = smc.sitems[uuid].sd
smc.vmdata.item_box.atk = smc.sitems[uuid].atk
smc.vmdata.item_box.hp = smc.sitems[uuid].hp
smc.vmdata.item_box.shield = smc.sitems[uuid].shield
node.active=true
if(smc.sitems[uuid].shield > 0){
node.getChildByName("data").getChildByName("shield").active=true
@@ -185,23 +185,23 @@ export class CardControllerComp extends CCComp {
node.getChildByName("data").getChildByName("hp").active=false
}
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;
smc.vmdata.shuaxin.min += smc.vmdata.shuaxin.speed*dt;
if (smc.vmdata.shuaxin.min >= smc.vmdata.shuaxin.max) {
smc.vmdata.shuaxin.min = 0;
this.load_cards()
}
}
// cards_update(){
// if(smc.vm_data.gold.min >= smc.vm_data.cards.up_cost){
// smc.vm_data.gold.min -= smc.vm_data.cards.up_cost;
// smc.vm_data.cards.level += 1;
// smc.vm_data.gold.max +=2;
// smc.vm_data.cards.up_cost += 2
// if(smc.vm_data.cards.level >= smc.vm_data.cards.level_max){
// smc.vm_data.cards.level = smc.vm_data.cards.level_max;
// smc.vm_data.cards.up_cost = 11
// if(smc.vmdata.gold.min >= smc.vmdata.cards.up_cost){
// smc.vmdata.gold.min -= smc.vmdata.cards.up_cost;
// smc.vmdata.cards.level += 1;
// smc.vmdata.gold.max +=2;
// smc.vmdata.cards.up_cost += 2
// if(smc.vmdata.cards.level >= smc.vmdata.cards.level_max){
// smc.vmdata.cards.level = smc.vmdata.cards.level_max;
// smc.vmdata.cards.up_cost = 11
// }
// console.log("card _level:"+this.card_level+"cost:"+smc.vm_data.cards.up_cost)
// console.log("card _level:"+this.card_level+"cost:"+smc.vmdata.cards.up_cost)
// }else{
// oops.gui.toast("金币不够");
// }
@@ -210,23 +210,23 @@ export class CardControllerComp extends CCComp {
if (this.in_load) {
return
}
if((smc.vm_data.shuaxin.max-smc.vm_data.shuaxin.min) < 0.5 ){
if((smc.vmdata.shuaxin.max-smc.vmdata.shuaxin.min) < 0.5 ){
oops.gui.toast("马上就要刷新了")
return
}
if(smc.vm_data.shuaxin.min < 0.5){
if(smc.vmdata.shuaxin.min < 0.5){
oops.gui.toast("不要刷新太快哦")
return
}
if (smc.vm_data.gold.min < smc.vm_data.cards.ref_cost) {
if (smc.vmdata.gold.min < smc.vmdata.cards.ref_cost) {
oops.gui.toast("金币不足")
return
}
smc.vm_data.gold.min -= smc.vm_data.cards.ref_cost;
smc.vmdata.gold.min -= smc.vmdata.cards.ref_cost;
this.load_cards()
smc.vm_data.shuaxin.min = -5
if(smc.vm_data.shuaxin.min <=0 ){
smc.vm_data.shuaxin.min = 0
smc.vmdata.shuaxin.min = -5
if(smc.vmdata.shuaxin.min <=0 ){
smc.vmdata.shuaxin.min = 0
}
}
@@ -323,7 +323,7 @@ export class CardControllerComp extends CCComp {
// console.log("card_index:",index,"card_alive:",this.cards[index].alive)
return;
};
if(smc.vm_data.gold.min >= this.cards[index].cost){
if(smc.vmdata.gold.min >= this.cards[index].cost){
this.cards[index].alive=false
this.do_use_card(index)
}else{
@@ -333,7 +333,7 @@ export class CardControllerComp extends CCComp {
}
do_use_card(index:number){
this.cards[index].alive=false
smc.vm_data.gold.min -= this.cards[index].cost;
smc.vmdata.gold.min -= this.cards[index].cost;
oops.message.dispatchEvent("do_add_hero", { uuid: this.cards[index].uuid });
// switch (this.cards[index].type) {
// case 1:
@@ -350,7 +350,7 @@ export class CardControllerComp extends CCComp {
}
do_reward(){
smc.vm_data.game_pause = true;
smc.vmdata.game_pause = true;
this.reward_lv+=1
this.rewards_set=RewardSet[this.reward_lv]
let i=RandomManager.instance.getRandomInt(0,this.rewards_set.length-1, 1)
@@ -395,17 +395,17 @@ export class CardControllerComp extends CCComp {
}
colse_reward(value:number){
this.node.getChildByName('rewards').active = false;
smc.vm_data.game_pause = false;
smc.vmdata.game_pause = false;
let reward=this.rewards[value]
if(reward.type==1){
if(reward.atk > 0){
smc.vm_data.mission.hero.atk += reward.atk / 100
smc.vmdata.mission.hero.atk += reward.atk / 100
}
if(reward.atk_cd > 0){
smc.vm_data.mission.hero.atk_cd -= reward.atk_cd/100
smc.vmdata.mission.hero.atk_cd -= reward.atk_cd/100
}
if(reward.hp > 0){
smc.vm_data.mission.hero.hp += reward.hp / 100;
smc.vmdata.mission.hero.hp += reward.hp / 100;
this.add_hero_hp_max(reward.hp / 100)
}
}
@@ -430,7 +430,7 @@ export class CardControllerComp extends CCComp {
}
}
protected update(dt: number): void {
if(smc.vm_data.game_over||smc.vm_data.game_pause){
if(smc.vmdata.game_over||smc.vmdata.game_pause){
return
}
this.shuaxin(dt)
@@ -442,10 +442,10 @@ export class CardControllerComp extends CCComp {
}
gold_add(dt: number) {
smc.vm_data.gold.time += dt;
if (smc.vm_data.gold.time >= smc.vm_data.gold.cd) {
smc.vm_data.gold.min += 1;
smc.vm_data.gold.time = 0;
smc.vmdata.gold.time += dt;
if (smc.vmdata.gold.time >= smc.vmdata.gold.cd) {
smc.vmdata.gold.min += 1;
smc.vmdata.gold.time = 0;
}
}
/** 视图对象通过 ecs.Entity.remove(ControllerComp) 删除组件是触发组件处理自定义释放逻辑 */

View File

@@ -35,13 +35,13 @@ export class CardControllerComp extends CCComp {
// console.log("show_info",uuid)
let node =this.node.getChildByName("item_box")
if(type == 2){
smc.vm_data.item_box.info = smc.sitems[uuid].info
smc.vm_data.item_box.name = smc.sitems[uuid].name
smc.vm_data.item_box.skillcd = smc.sitems[uuid].cd
smc.vm_data.item_box.skillsd = smc.sitems[uuid].sd
smc.vm_data.item_box.atk = smc.sitems[uuid].atk
smc.vm_data.item_box.hp = smc.sitems[uuid].hp
smc.vm_data.item_box.shield = smc.sitems[uuid].shield
smc.vmdata.item_box.info = smc.sitems[uuid].info
smc.vmdata.item_box.name = smc.sitems[uuid].name
smc.vmdata.item_box.skillcd = smc.sitems[uuid].cd
smc.vmdata.item_box.skillsd = smc.sitems[uuid].sd
smc.vmdata.item_box.atk = smc.sitems[uuid].atk
smc.vmdata.item_box.hp = smc.sitems[uuid].hp
smc.vmdata.item_box.shield = smc.sitems[uuid].shield
node.active=true
if(smc.sitems[uuid].shield > 0){
node.getChildByName("data").getChildByName("shield").active=true
@@ -53,7 +53,7 @@ export class CardControllerComp extends CCComp {
}
protected update(dt: number): void {
if(smc.vm_data.game_over||smc.vm_data.game_pause){
if(smc.vmdata.game_over||smc.vmdata.game_pause){
return
}
@@ -74,7 +74,7 @@ export class CardControllerComp extends CCComp {
this.node.getChildByName("bar").active=false;
this.node.getChildByName("mission_home").active=false
this.node.getChildByName("mission").active=true
smc.vm_data.mission.play = true;
smc.vmdata.mission.play = true;
// oops.message.dispatchEvent("mission_start")
}
to_home(){

View File

@@ -7,22 +7,12 @@ import { HCardComp } from "./HCardComp";
/** HCard 模块 */
@ecs.register(`HCard`)
export class HCard extends ecs.Entity {
/** ---------- 数据层 ---------- */
// HCardModel!: HCardModelComp;
/** ---------- 业务层 ---------- */
// HCardBll!: HCardBllComp;
/** ---------- 视图层 ---------- */
// HCardView!: HCardViewComp;
/** 实始添加的数据层组件 */
protected init() {
// this.addComponents<ecs.Comp>();
}
load(uuid:number=1001,index:number=-1,parent:any) {
let box_group= 0
var path = "gui/element/hcard";
var prefab: Prefab = oops.res.get(path, Prefab)!;
var node = instantiate(prefab);

View File

@@ -0,0 +1,30 @@
import { instantiate, Prefab } from "cc";
import { ecs } from "../../../../extensions/oops-plugin-framework/assets/libs/ecs/ECS";
import { oops } from "../../../../extensions/oops-plugin-framework/assets/core/Oops";
import { ItemComp } from "./ItemComp";
/** Item 模块 */
@ecs.register(`Item`)
export class Item extends ecs.Entity {
protected init() {
// this.addComponents<ecs.Comp>();
}
load(uuid:number=1001,num:number=0,praent:any=null) {
var path = "game/gui/item";
var prefab: Prefab = oops.res.get(path, Prefab)!;
var node = instantiate(prefab);
node.parent = praent
let iv = node.getComponent(ItemComp)!;
iv.i_uuid = uuid
iv.num=num
this.add(iv)
}
/** 模块资源释放 */
destroy() {
super.destroy();
}
}
/** Item 模块业务逻辑系统组件,如无业务逻辑处理可删除此对象 */

View File

@@ -0,0 +1,9 @@
{
"ver": "4.0.23",
"importer": "typescript",
"imported": true,
"uuid": "6d44969e-0c5d-4ef2-8919-e9c18b012dec",
"files": [],
"subMetas": {},
"userData": {}
}

View File

@@ -0,0 +1,24 @@
import { _decorator, Label } from "cc";
import { ecs } from "../../../../extensions/oops-plugin-framework/assets/libs/ecs/ECS";
import { CCComp } from "../../../../extensions/oops-plugin-framework/assets/module/common/CCComp";
const { ccclass, property } = _decorator;
/** 视图层对象 */
@ccclass('ItemComp')
@ecs.register('ItemComp', false)
export class ItemComp extends CCComp {
i_uuid:number = 0;
num:number = 0;
start() {
this.node.getChildByName("num").getComponent(Label).string = this.num.toString();
//todo 设定icon 显示
}
/** 视图对象通过 ecs.Entity.remove(ModuleViewComp) 删除组件是触发组件处理自定义释放逻辑 */
reset() {
this.node.destroy();
}
}

View File

@@ -0,0 +1,9 @@
{
"ver": "4.0.23",
"importer": "typescript",
"imported": true,
"uuid": "b3d7b41f-5185-4a0a-b690-897800e264ef",
"files": [],
"subMetas": {},
"userData": {}
}

View File

@@ -61,7 +61,7 @@ export class MissionComp extends CCComp {
}
protected update(dt: number): void {
if(!smc.vm_data.mission.play||smc.vm_data.pause){
if(!smc.vmdata.mission.play||smc.vmdata.pause){
return
}
if(this.fight_start){
@@ -69,10 +69,9 @@ export class MissionComp extends CCComp {
}
this.count_hero_pos()
this.count_mon_pos()
this.check_exp()
this.check_m_exp()
this.check_buff()
// if (this.game_timer.update(dt)) {
// smc.vm_data.game.g_time += 1;
// smc.vmdata.game.g_time += 1;
// }
// this.shuaxin(dt)
}
@@ -83,27 +82,27 @@ export class MissionComp extends CCComp {
console.log("mission_start:",this.mon_list)
//局内数据初始化
this.fight_start=false
smc.vm_data.mission.is_victory=false
smc.vm_data.mission.is_defeat=false
smc.vm_data.mission.a_exp=0 //近战经验
smc.vm_data.mission.b_exp=0 //远程经验
smc.vm_data.mission.c_exp=0 //辅助经验
smc.vm_data.mission.ma_exp=0 //敌方近战经验
smc.vm_data.mission.mb_exp=0 //敌方远程经验
smc.vm_data.mission.mc_exp=0 //敌方辅助经验
smc.vmdata.mission.is_victory=false
smc.vmdata.mission.is_defeat=false
smc.vmdata.mission.a_exp=0 //近战经验
smc.vmdata.mission.h_exp=0 //远程经验
smc.vmdata.mission.s_exp=0 //辅助经验
smc.vmdata.mission.ma_exp=0 //敌方近战经验
smc.vmdata.mission.mh_exp=0 //敌方远程经验
smc.vmdata.mission.ms_exp=0 //敌方辅助经验
this.msk={ on :false, uuid:1001,type:1,lv: 1}
this.mmsk={ on :false, uuid:1001,type:1,lv: 1}
this.node.getChildByName("exp").getChildByName("a_exp").active = true
this.node.getChildByName("exp").getChildByName("b_exp").active = true
this.node.getChildByName("exp").getChildByName("c_exp").active = true
this.node.getChildByName("mexp").getChildByName("a_exp").active = true
this.node.getChildByName("mexp").getChildByName("b_exp").active = true
this.node.getChildByName("mexp").getChildByName("c_exp").active = true
this.node.getChildByName("exp").getChildByName("ap").active = true
this.node.getChildByName("exp").getChildByName("hp").active = true
this.node.getChildByName("exp").getChildByName("mskill").active = true
this.node.getChildByName("mexp").getChildByName("ap").active = true
this.node.getChildByName("mexp").getChildByName("hp").active = true
this.node.getChildByName("mexp").getChildByName("mskill").active = true
this.mon_refresh()
this.heros_call()
}
mission_end(){
smc.vm_data.mission.play=false
smc.vmdata.mission.play=false
let heros:any= this.get_heros();;
let monsters:any= this.get_mons();
let hcards:any= ecs.query(ecs.allOf(HCardComp));
@@ -131,128 +130,56 @@ export class MissionComp extends CCComp {
monsters[i].HeroView.ent.destroy()
}
}
check_buff(){
if(smc.vmdata.mission.a_exp >= smc.vmdata.mission.a_up_exp){
smc.vmdata.mission.ap+=smc.vmdata.mission.a_up
smc.vmdata.mission.a_exp-=smc.vmdata.mission.a_up_exp
this.node.getChildByName("exp").getChildByName("ap").setScale(1.2,1)
this.scheduleOnce(function(){
this.node.getChildByName("exp").getChildByName("ap").setScale(1,1)
},0.1)
}
if(smc.vmdata.mission.h_exp >= smc.vmdata.mission.h_up_exp){
smc.vmdata.mission.hp+=smc.vmdata.mission.h_up
smc.vmdata.mission.h_exp-=smc.vmdata.mission.h_up_exp
this.node.getChildByName("exp").getChildByName("hp").setScale(1.2,1)
this.scheduleOnce(function(){
this.node.getChildByName("exp").getChildByName("hp").setScale(1,1)
},0.1)
}
if(smc.vmdata.mission.ma_exp >= smc.vmdata.mission.ma_up_exp){
smc.vmdata.mission.map+=smc.vmdata.mission.ma_up
smc.vmdata.mission.ma_exp-=smc.vmdata.mission.ma_up_exp
this.node.getChildByName("mexp").getChildByName("ap").setScale(1.2,1)
this.scheduleOnce(function(){
this.node.getChildByName("mexp").getChildByName("ap").setScale(1,1)
},0.1)
}
if(smc.vmdata.mission.mh_exp >= smc.vmdata.mission.mh_up_exp){
smc.vmdata.mission.mhp+=smc.vmdata.mission.mh_up
smc.vmdata.mission.mh_exp-=smc.vmdata.mission.mh_up_exp
this.node.getChildByName("mexp").getChildByName("hp").setScale(1.2,1)
this.scheduleOnce(function(){
this.node.getChildByName("mexp").getChildByName("hp").setScale(1,1)
},0.1)
}
}
exp_move(ap: number,bp: number,cp: number){
let a_pos=v3(ap,this.node.getChildByName("exp").getChildByName("a_exp").position.y)
let b_pos=v3(bp,this.node.getChildByName("exp").getChildByName("b_exp").position.y)
let c_pos=v3(cp,this.node.getChildByName("exp").getChildByName("c_exp").position.y)
tween(this.node.getChildByName("exp").getChildByName("a_exp")).to(0.5,{position:a_pos}).start()
tween(this.node.getChildByName("exp").getChildByName("b_exp")).to(0.5,{position:b_pos}).start()
tween(this.node.getChildByName("exp").getChildByName("c_exp")).to(0.5,{position:c_pos}).start()
}
mexp_move(ap: number,bp: number,cp: number){
let a_pos=v3(ap,this.node.getChildByName("mexp").getChildByName("a_exp").position.y)
let b_pos=v3(bp,this.node.getChildByName("mexp").getChildByName("b_exp").position.y)
let c_pos=v3(cp,this.node.getChildByName("mexp").getChildByName("c_exp").position.y)
tween(this.node.getChildByName("mexp").getChildByName("a_exp")).to(0.5,{position:a_pos}).start()
tween(this.node.getChildByName("mexp").getChildByName("b_exp")).to(0.5,{position:b_pos}).start()
tween(this.node.getChildByName("mexp").getChildByName("c_exp")).to(0.5,{position:c_pos}).start()
}
check_exp(){
if(!this.msk.on){
if(smc.vm_data.mission.a_exp >= MSkillset.confirm_exp){
this.msk.type = 1
this.msk.on = true
this.select_msk(1)
this.exp_move(30,-100,-100)
}
if(smc.vm_data.mission.b_exp >= MSkillset.confirm_exp){
this.msk.type = 2
this.msk.on = true
this.select_msk(2)
this.exp_move(-100,30,-100)
}
if(smc.vm_data.mission.c_exp >= MSkillset.confirm_exp){
this.msk.type = 3
this.msk.on = true
this.select_msk(3)
this.exp_move(-100,-100,30)
}
}else{
switch (this.msk.type){
case 1:
if(smc.vm_data.mission.a_exp >= MSkills[this.msk.uuid].up_exp){
this.msk.lv += 1
smc.vm_data.mission.a_exp = 0
}
break;
case 2:
if(smc.vm_data.mission.b_exp >= MSkills[this.msk.uuid].up_exp){
this.msk.lv += 1
smc.vm_data.mission.b_exp = 0
}
break;
case 3:
if(smc.vm_data.mission.c_exp >= MSkills[this.msk.uuid].up_exp){
this.msk.lv += 1
smc.vm_data.mission.c_exp = 0
}
break;
}
}
}
check_m_exp(){
if(!this.mmsk.on){
if(smc.vm_data.mission.ma_exp >= MSkillset.confirm_exp){
this.mmsk.type = 1
this.mmsk.on = true
this.select_mmsk(1)
this.mexp_move(-30,100,100)
}
if(smc.vm_data.mission.mb_exp >= MSkillset.confirm_exp){
this.mmsk.type = 2
this.mmsk.on = true
this.select_mmsk(2)
this.mexp_move(100,-30,100)
}
if(smc.vm_data.mission.mc_exp >= MSkillset.confirm_exp){
this.mmsk.type = 3
this.mmsk.on = true
this.select_mmsk(3)
this.mexp_move(100,100,-30)
}
}else{
switch (this.mmsk.type){
case 1:
if(smc.vm_data.mission.ma_exp >= MSkills[this.mmsk.uuid].up_exp){
this.mmsk.lv += 1
smc.vm_data.mission.ma_exp = 0
}
break;
case 2:
if(smc.vm_data.mission.mb_exp >= MSkills[this.mmsk.uuid].up_exp){
this.mmsk.lv += 1
smc.vm_data.mission.mb_exp = 0
}
break;
case 3:
if(smc.vm_data.mission.mc_exp >= MSkills[this.mmsk.uuid].up_exp){
this.mmsk.lv += 1
smc.vm_data.mission.mc_exp = 0
}
break;
}
}
}
select_msk(type:number){
smc.vm_data.mission.a_exp=0
smc.vm_data.mission.b_exp=0
smc.vm_data.mission.c_exp=0
smc.vmdata.mission.s_exp=0
let sk:any=RandomManager.instance.getRandomByObjectList(MSlist[type],1)
this.msk.uuid=sk[0]
let skill=ecs.getEntity<MSkill>(MSkill)
skill.load(BoxSet.HERO,this.msk.uuid)
}
select_mmsk(type:number){
smc.vm_data.mission.ma_exp=0
smc.vm_data.mission.mb_exp=0
smc.vm_data.mission.mc_exp=0
smc.vmdata.mission.ms_exp=0
let sk:any=RandomManager.instance.getRandomByObjectList(MSlist[type],1)
this.mmsk.uuid=sk[0]
let mskill=ecs.getEntity<MSkill>(MSkill)
mskill.load(BoxSet.MONSTER,this.mmsk.uuid)
}
do_reward(){
console.log("do_reward")
@@ -272,15 +199,15 @@ export class MissionComp extends CCComp {
m_alive=true
}
}
if (!m_alive) smc.vm_data.mission.is_victory = true
if (!h_alive) smc.vm_data.mission.is_defeat = true
if (!m_alive) smc.vmdata.mission.is_victory = true
if (!h_alive) smc.vmdata.mission.is_defeat = true
this.to_end_mission()
}
to_end_mission(){
if (smc.vm_data.mission.is_victory){
if (smc.vmdata.mission.is_victory){
this.VictoryComp.do_victiry()
}
if (smc.vm_data.mission.is_defeat){
if (smc.vmdata.mission.is_defeat){
this.VictoryComp.do_defeat()
}
}
@@ -314,7 +241,7 @@ export class MissionComp extends CCComp {
}
}
heros_call(){
let heros=smc.vm_data.fight_heros
let heros=smc.vmdata.fight_heros
for(let i=0;i<heros.length;i++){
this.addHero(heros[i],i)
}

View File

@@ -10,6 +10,7 @@ import { BossViewComp } from "../Boss/BossViewComp";
import { RandomManager } from "../../../../extensions/oops-plugin-framework/assets/core/common/random/RandomManager";
import { MissionReward } from "../common/config/MissionSet";
import { Items } from "../common/config/Items";
import { Item } from "./Item";
const { ccclass, property } = _decorator;
@@ -20,38 +21,42 @@ export class VictoryComp extends CCComp {
reward_lv:number=1
reward_num:number=2
rerawd_item:any={}
if_show:boolean=false
/** 视图层逻辑代码分离演示 */
start() {
}
private do_victiry() {
if(this.if_show) return
this.node.getChildByName("Node").active = true;
this.getReward()
this.getReward(true)
this.node.getChildByName("Node").getChildByName("defeat").active = false
this.node.getChildByName("Node").getChildByName("victory").active = true;
}
private do_defeat() {
if(this.if_show) return
this.node.getChildByName("Node").active = true;
this.getReward()
this.getReward(false)
this.node.getChildByName("Node").getChildByName("victory").active = false;
this.node.getChildByName("Node").getChildByName("defeat").active = true
}
getReward(){
let reward1:any = RandomManager.instance.getRandomByObjectList(MissionReward[this.reward_lv], 1);
let reward2:any = RandomManager.instance.getRandomByObjectList(MissionReward[this.reward_lv], 1);
let item1 =Items[reward1[0]]
let item2 =Items[reward2[1]]
let r1_num=0
let r2_num=0
console.log("getReward:",item1,item2)
this.node.getChildByName("Node").getChildByName("item2").getChildByName("num").getComponent(Label).string=item1.r_num.toString()
this.node.getChildByName("Node").getChildByName("item2").getChildByName("name").getComponent(Label).string=item1.name.toString()
this.node.getChildByName("Node").getChildByName("item3").getChildByName("num").getComponent(Label).string=item2.r_num.toString()
this.node.getChildByName("Node").getChildByName("item3").getChildByName("name").getComponent(Label).string=item2.r_num.toString()
getReward(is_victory:boolean){
let conut =2
if(is_victory) conut=1
let item1=ecs.getEntity<Item>(Item)
let gold: number = Math.floor(RandomManager.instance.getRandomInt((3000 + smc.vmdata.mission.lv * 100) / 3 * 2, 3000 + smc.vmdata.mission.lv * 100));
let parent = this.node.getChildByName("Node").getChildByName("items")
item1.load(1001,gold,parent)
for (let i = 0; i < conut; i++) {
let item=ecs.getEntity<Item>(Item)
let reward:any = RandomManager.instance.getRandomByObjectList(MissionReward[this.reward_lv], 1);
let im =Items[reward[0]]
item.load(im.uuid,im.r_num,parent)
}
this.if_show=true
}
end_mission(){
this.node.getChildByName("Node").active=false
this.if_show=false
}

View File

@@ -154,7 +154,7 @@ export class MonViewComp extends CCComp {
update(dt: number){
if(!smc.vm_data.mission.play||smc.vm_data.pause){
if(!smc.vmdata.mission.play||smc.vmdata.pause){
return
}
if (this.timer.update(dt)) {

View File

@@ -27,7 +27,7 @@ export class MSkillComp extends CCComp {
this.cd=this.cdt=this.skill.cd
}
protected update(dt: number): void {
if(!smc.vm_data.mission.play||smc.vm_data.pause||smc.vm_data.mission.is_victory||smc.vm_data.mission.is_defeat){
if(!smc.vmdata.mission.play||smc.vmdata.pause||smc.vmdata.mission.is_victory||smc.vmdata.mission.is_defeat){
return
}
this.check_cd(dt)