diff --git a/assets/resources/game/map/map_rpg.prefab b/assets/resources/game/map/map_rpg.prefab index 854b1870..0784080c 100644 --- a/assets/resources/game/map/map_rpg.prefab +++ b/assets/resources/game/map/map_rpg.prefab @@ -491,7 +491,7 @@ }, "_contentSize": { "__type__": "cc.Size", - "width": 1700, + "width": 1730, "height": 800 }, "_anchorPoint": { @@ -531,7 +531,7 @@ "__uuid__": "d5853a03-897a-4f18-846f-f6282ae3625f@f9941", "__expectedType__": "cc.SpriteFrame" }, - "_type": 1, + "_type": 0, "_fillType": 0, "_sizeMode": 0, "_fillCenter": { @@ -607,7 +607,7 @@ }, "_lpos": { "__type__": "cc.Vec3", - "x": -1687.633, + "x": -1700, "y": 444.859, "z": 0 }, @@ -648,7 +648,7 @@ }, "_contentSize": { "__type__": "cc.Size", - "width": 1700, + "width": 1730, "height": 800 }, "_anchorPoint": { @@ -688,7 +688,7 @@ "__uuid__": "d5853a03-897a-4f18-846f-f6282ae3625f@f9941", "__expectedType__": "cc.SpriteFrame" }, - "_type": 1, + "_type": 3, "_fillType": 0, "_sizeMode": 0, "_fillCenter": { @@ -697,7 +697,7 @@ "y": 0 }, "_fillStart": 0, - "_fillRange": 0, + "_fillRange": 0.99, "_isTrimmedMode": true, "_useGrayscale": false, "_atlas": null, @@ -898,7 +898,7 @@ "_lpos": { "__type__": "cc.Vec3", "x": 8.342, - "y": 203.495, + "y": 176.939, "z": 0 }, "_lrot": { @@ -938,8 +938,8 @@ }, "_contentSize": { "__type__": "cc.Size", - "width": 1125, - "height": 387 + "width": 899.4, + "height": 299.8 }, "_anchorPoint": { "__type__": "cc.Vec2", @@ -980,7 +980,7 @@ }, "_type": 0, "_fillType": 0, - "_sizeMode": 1, + "_sizeMode": 0, "_fillCenter": { "__type__": "cc.Vec2", "x": 0, diff --git a/assets/resources/gui/role_controller.prefab b/assets/resources/gui/role_controller.prefab index 65ba4359..cf0e4fd6 100644 --- a/assets/resources/gui/role_controller.prefab +++ b/assets/resources/gui/role_controller.prefab @@ -55,29 +55,29 @@ "__id__": 643 }, { - "__id__": 651 + "__id__": 653 }, { - "__id__": 740 + "__id__": 742 }, { - "__id__": 749 + "__id__": 751 } ], "_active": true, "_components": [ - { - "__id__": 755 - }, { "__id__": 757 }, { "__id__": 759 + }, + { + "__id__": 761 } ], "_prefab": { - "__id__": 761 + "__id__": 763 }, "_lpos": { "__type__": "cc.Vec3", @@ -13355,6 +13355,9 @@ }, { "__id__": 650 + }, + { + "__id__": 651 } ], "removedComponents": [] @@ -13421,6 +13424,22 @@ "z": 0 } }, + { + "__type__": "CCPropertyOverrideInfo", + "targetInfo": { + "__id__": 652 + }, + "propertyPath": [ + "_active" + ], + "value": false + }, + { + "__type__": "cc.TargetInfo", + "localID": [ + "4a+Ff4qMZBpYQB/mq2qttc" + ] + }, { "__type__": "cc.Node", "_name": "bar", @@ -13431,32 +13450,32 @@ }, "_children": [ { - "__id__": 652 + "__id__": 654 }, { - "__id__": 658 + "__id__": 660 }, { - "__id__": 683 + "__id__": 685 }, { - "__id__": 708 + "__id__": 710 } ], "_active": true, "_components": [ - { - "__id__": 733 - }, { "__id__": 735 }, { "__id__": 737 + }, + { + "__id__": 739 } ], "_prefab": { - "__id__": 739 + "__id__": 741 }, "_lpos": { "__type__": "cc.Vec3", @@ -13493,20 +13512,20 @@ "_objFlags": 0, "__editorExtras__": {}, "_parent": { - "__id__": 651 + "__id__": 653 }, "_children": [], "_active": true, "_components": [ { - "__id__": 653 + "__id__": 655 }, { - "__id__": 655 + "__id__": 657 } ], "_prefab": { - "__id__": 657 + "__id__": 659 }, "_lpos": { "__type__": "cc.Vec3", @@ -13543,11 +13562,11 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 652 + "__id__": 654 }, "_enabled": true, "__prefab": { - "__id__": 654 + "__id__": 656 }, "_contentSize": { "__type__": "cc.Size", @@ -13571,11 +13590,11 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 652 + "__id__": 654 }, "_enabled": true, "__prefab": { - "__id__": 656 + "__id__": 658 }, "_customMaterial": null, "_srcBlendFactor": 2, @@ -13629,30 +13648,30 @@ "_objFlags": 0, "__editorExtras__": {}, "_parent": { - "__id__": 651 + "__id__": 653 }, "_children": [ { - "__id__": 659 + "__id__": 661 }, { - "__id__": 665 + "__id__": 667 }, { - "__id__": 671 + "__id__": 673 } ], "_active": true, "_components": [ { - "__id__": 677 + "__id__": 679 }, { - "__id__": 679 + "__id__": 681 } ], "_prefab": { - "__id__": 682 + "__id__": 684 }, "_lpos": { "__type__": "cc.Vec3", @@ -13689,20 +13708,20 @@ "_objFlags": 0, "__editorExtras__": {}, "_parent": { - "__id__": 658 + "__id__": 660 }, "_children": [], "_active": true, "_components": [ { - "__id__": 660 + "__id__": 662 }, { - "__id__": 662 + "__id__": 664 } ], "_prefab": { - "__id__": 664 + "__id__": 666 }, "_lpos": { "__type__": "cc.Vec3", @@ -13739,11 +13758,11 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 659 + "__id__": 661 }, "_enabled": true, "__prefab": { - "__id__": 661 + "__id__": 663 }, "_contentSize": { "__type__": "cc.Size", @@ -13767,11 +13786,11 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 659 + "__id__": 661 }, "_enabled": true, "__prefab": { - "__id__": 663 + "__id__": 665 }, "_customMaterial": null, "_srcBlendFactor": 2, @@ -13825,20 +13844,20 @@ "_objFlags": 0, "__editorExtras__": {}, "_parent": { - "__id__": 658 + "__id__": 660 }, "_children": [], "_active": true, "_components": [ { - "__id__": 666 + "__id__": 668 }, { - "__id__": 668 + "__id__": 670 } ], "_prefab": { - "__id__": 670 + "__id__": 672 }, "_lpos": { "__type__": "cc.Vec3", @@ -13875,11 +13894,11 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 665 + "__id__": 667 }, "_enabled": true, "__prefab": { - "__id__": 667 + "__id__": 669 }, "_contentSize": { "__type__": "cc.Size", @@ -13903,11 +13922,11 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 665 + "__id__": 667 }, "_enabled": true, "__prefab": { - "__id__": 669 + "__id__": 671 }, "_customMaterial": null, "_srcBlendFactor": 2, @@ -13961,20 +13980,20 @@ "_objFlags": 0, "__editorExtras__": {}, "_parent": { - "__id__": 658 + "__id__": 660 }, "_children": [], "_active": true, "_components": [ { - "__id__": 672 + "__id__": 674 }, { - "__id__": 674 + "__id__": 676 } ], "_prefab": { - "__id__": 676 + "__id__": 678 }, "_lpos": { "__type__": "cc.Vec3", @@ -14011,11 +14030,11 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 671 + "__id__": 673 }, "_enabled": true, "__prefab": { - "__id__": 673 + "__id__": 675 }, "_contentSize": { "__type__": "cc.Size", @@ -14039,11 +14058,11 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 671 + "__id__": 673 }, "_enabled": true, "__prefab": { - "__id__": 675 + "__id__": 677 }, "_customMaterial": null, "_srcBlendFactor": 2, @@ -14120,11 +14139,11 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 658 + "__id__": 660 }, "_enabled": true, "__prefab": { - "__id__": 678 + "__id__": 680 }, "_contentSize": { "__type__": "cc.Size", @@ -14148,15 +14167,15 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 658 + "__id__": 660 }, "_enabled": true, "__prefab": { - "__id__": 680 + "__id__": 682 }, "clickEvents": [ { - "__id__": 681 + "__id__": 683 } ], "_interactable": true, @@ -14231,30 +14250,30 @@ "_objFlags": 0, "__editorExtras__": {}, "_parent": { - "__id__": 651 + "__id__": 653 }, "_children": [ { - "__id__": 684 + "__id__": 686 }, { - "__id__": 690 + "__id__": 692 }, { - "__id__": 696 + "__id__": 698 } ], "_active": true, "_components": [ { - "__id__": 702 + "__id__": 704 }, { - "__id__": 704 + "__id__": 706 } ], "_prefab": { - "__id__": 707 + "__id__": 709 }, "_lpos": { "__type__": "cc.Vec3", @@ -14291,20 +14310,20 @@ "_objFlags": 0, "__editorExtras__": {}, "_parent": { - "__id__": 683 + "__id__": 685 }, "_children": [], "_active": false, "_components": [ { - "__id__": 685 + "__id__": 687 }, { - "__id__": 687 + "__id__": 689 } ], "_prefab": { - "__id__": 689 + "__id__": 691 }, "_lpos": { "__type__": "cc.Vec3", @@ -14341,11 +14360,11 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 684 + "__id__": 686 }, "_enabled": true, "__prefab": { - "__id__": 686 + "__id__": 688 }, "_contentSize": { "__type__": "cc.Size", @@ -14369,11 +14388,11 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 684 + "__id__": 686 }, "_enabled": true, "__prefab": { - "__id__": 688 + "__id__": 690 }, "_customMaterial": null, "_srcBlendFactor": 2, @@ -14427,20 +14446,20 @@ "_objFlags": 0, "__editorExtras__": {}, "_parent": { - "__id__": 683 + "__id__": 685 }, "_children": [], "_active": true, "_components": [ { - "__id__": 691 + "__id__": 693 }, { - "__id__": 693 + "__id__": 695 } ], "_prefab": { - "__id__": 695 + "__id__": 697 }, "_lpos": { "__type__": "cc.Vec3", @@ -14477,11 +14496,11 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 690 + "__id__": 692 }, "_enabled": true, "__prefab": { - "__id__": 692 + "__id__": 694 }, "_contentSize": { "__type__": "cc.Size", @@ -14505,11 +14524,11 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 690 + "__id__": 692 }, "_enabled": true, "__prefab": { - "__id__": 694 + "__id__": 696 }, "_customMaterial": null, "_srcBlendFactor": 2, @@ -14563,20 +14582,20 @@ "_objFlags": 0, "__editorExtras__": {}, "_parent": { - "__id__": 683 + "__id__": 685 }, "_children": [], "_active": true, "_components": [ { - "__id__": 697 + "__id__": 699 }, { - "__id__": 699 + "__id__": 701 } ], "_prefab": { - "__id__": 701 + "__id__": 703 }, "_lpos": { "__type__": "cc.Vec3", @@ -14613,11 +14632,11 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 696 + "__id__": 698 }, "_enabled": true, "__prefab": { - "__id__": 698 + "__id__": 700 }, "_contentSize": { "__type__": "cc.Size", @@ -14641,11 +14660,11 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 696 + "__id__": 698 }, "_enabled": true, "__prefab": { - "__id__": 700 + "__id__": 702 }, "_customMaterial": null, "_srcBlendFactor": 2, @@ -14722,11 +14741,11 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 683 + "__id__": 685 }, "_enabled": true, "__prefab": { - "__id__": 703 + "__id__": 705 }, "_contentSize": { "__type__": "cc.Size", @@ -14750,15 +14769,15 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 683 + "__id__": 685 }, "_enabled": true, "__prefab": { - "__id__": 705 + "__id__": 707 }, "clickEvents": [ { - "__id__": 706 + "__id__": 708 } ], "_interactable": true, @@ -14833,30 +14852,30 @@ "_objFlags": 0, "__editorExtras__": {}, "_parent": { - "__id__": 651 + "__id__": 653 }, "_children": [ { - "__id__": 709 + "__id__": 711 }, { - "__id__": 715 + "__id__": 717 }, { - "__id__": 721 + "__id__": 723 } ], "_active": true, "_components": [ { - "__id__": 727 + "__id__": 729 }, { - "__id__": 729 + "__id__": 731 } ], "_prefab": { - "__id__": 732 + "__id__": 734 }, "_lpos": { "__type__": "cc.Vec3", @@ -14893,20 +14912,20 @@ "_objFlags": 0, "__editorExtras__": {}, "_parent": { - "__id__": 708 + "__id__": 710 }, "_children": [], "_active": false, "_components": [ { - "__id__": 710 + "__id__": 712 }, { - "__id__": 712 + "__id__": 714 } ], "_prefab": { - "__id__": 714 + "__id__": 716 }, "_lpos": { "__type__": "cc.Vec3", @@ -14943,11 +14962,11 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 709 + "__id__": 711 }, "_enabled": true, "__prefab": { - "__id__": 711 + "__id__": 713 }, "_contentSize": { "__type__": "cc.Size", @@ -14971,11 +14990,11 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 709 + "__id__": 711 }, "_enabled": true, "__prefab": { - "__id__": 713 + "__id__": 715 }, "_customMaterial": null, "_srcBlendFactor": 2, @@ -15029,20 +15048,20 @@ "_objFlags": 0, "__editorExtras__": {}, "_parent": { - "__id__": 708 + "__id__": 710 }, "_children": [], "_active": true, "_components": [ { - "__id__": 716 + "__id__": 718 }, { - "__id__": 718 + "__id__": 720 } ], "_prefab": { - "__id__": 720 + "__id__": 722 }, "_lpos": { "__type__": "cc.Vec3", @@ -15079,11 +15098,11 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 715 + "__id__": 717 }, "_enabled": true, "__prefab": { - "__id__": 717 + "__id__": 719 }, "_contentSize": { "__type__": "cc.Size", @@ -15107,11 +15126,11 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 715 + "__id__": 717 }, "_enabled": true, "__prefab": { - "__id__": 719 + "__id__": 721 }, "_customMaterial": null, "_srcBlendFactor": 2, @@ -15165,20 +15184,20 @@ "_objFlags": 0, "__editorExtras__": {}, "_parent": { - "__id__": 708 + "__id__": 710 }, "_children": [], "_active": true, "_components": [ { - "__id__": 722 + "__id__": 724 }, { - "__id__": 724 + "__id__": 726 } ], "_prefab": { - "__id__": 726 + "__id__": 728 }, "_lpos": { "__type__": "cc.Vec3", @@ -15215,11 +15234,11 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 721 + "__id__": 723 }, "_enabled": true, "__prefab": { - "__id__": 723 + "__id__": 725 }, "_contentSize": { "__type__": "cc.Size", @@ -15243,11 +15262,11 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 721 + "__id__": 723 }, "_enabled": true, "__prefab": { - "__id__": 725 + "__id__": 727 }, "_customMaterial": null, "_srcBlendFactor": 2, @@ -15324,11 +15343,11 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 708 + "__id__": 710 }, "_enabled": true, "__prefab": { - "__id__": 728 + "__id__": 730 }, "_contentSize": { "__type__": "cc.Size", @@ -15352,15 +15371,15 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 708 + "__id__": 710 }, "_enabled": true, "__prefab": { - "__id__": 730 + "__id__": 732 }, "clickEvents": [ { - "__id__": 731 + "__id__": 733 } ], "_interactable": true, @@ -15435,11 +15454,11 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 651 + "__id__": 653 }, "_enabled": true, "__prefab": { - "__id__": 734 + "__id__": 736 }, "_contentSize": { "__type__": "cc.Size", @@ -15463,11 +15482,11 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 651 + "__id__": 653 }, "_enabled": true, "__prefab": { - "__id__": 736 + "__id__": 738 }, "_customMaterial": null, "_srcBlendFactor": 2, @@ -15505,11 +15524,11 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 651 + "__id__": 653 }, "_enabled": true, "__prefab": { - "__id__": 738 + "__id__": 740 }, "_alignFlags": 20, "_target": null, @@ -15555,14 +15574,14 @@ "__id__": 1 }, "_prefab": { - "__id__": 741 + "__id__": 743 }, "__editorExtras__": {} }, { "__type__": "cc.PrefabInfo", "root": { - "__id__": 740 + "__id__": 742 }, "asset": { "__uuid__": "9260d2d2-4104-4b8f-beb7-ab74b894b73b", @@ -15570,7 +15589,7 @@ }, "fileId": "1el6EAJ9JL9ruo0tKeStck", "instance": { - "__id__": 742 + "__id__": 744 }, "targetOverrides": null }, @@ -15583,20 +15602,20 @@ "mountedChildren": [], "mountedComponents": [], "propertyOverrides": [ - { - "__id__": 743 - }, { "__id__": 745 }, - { - "__id__": 746 - }, { "__id__": 747 }, { "__id__": 748 + }, + { + "__id__": 749 + }, + { + "__id__": 750 } ], "removedComponents": [] @@ -15604,7 +15623,7 @@ { "__type__": "CCPropertyOverrideInfo", "targetInfo": { - "__id__": 744 + "__id__": 746 }, "propertyPath": [ "_name" @@ -15620,7 +15639,7 @@ { "__type__": "CCPropertyOverrideInfo", "targetInfo": { - "__id__": 744 + "__id__": 746 }, "propertyPath": [ "_lpos" @@ -15635,7 +15654,7 @@ { "__type__": "CCPropertyOverrideInfo", "targetInfo": { - "__id__": 744 + "__id__": 746 }, "propertyPath": [ "_lrot" @@ -15651,7 +15670,7 @@ { "__type__": "CCPropertyOverrideInfo", "targetInfo": { - "__id__": 744 + "__id__": 746 }, "propertyPath": [ "_euler" @@ -15666,7 +15685,7 @@ { "__type__": "CCPropertyOverrideInfo", "targetInfo": { - "__id__": 744 + "__id__": 746 }, "propertyPath": [ "_active" @@ -15685,14 +15704,14 @@ "_active": true, "_components": [ { - "__id__": 750 + "__id__": 752 }, { - "__id__": 752 + "__id__": 754 } ], "_prefab": { - "__id__": 754 + "__id__": 756 }, "_lpos": { "__type__": "cc.Vec3", @@ -15729,11 +15748,11 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 749 + "__id__": 751 }, "_enabled": true, "__prefab": { - "__id__": 751 + "__id__": 753 }, "_contentSize": { "__type__": "cc.Size", @@ -15757,11 +15776,11 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 749 + "__id__": 751 }, "_enabled": true, "__prefab": { - "__id__": 753 + "__id__": 755 }, "_alignFlags": 12, "_target": null, @@ -15810,7 +15829,7 @@ }, "_enabled": true, "__prefab": { - "__id__": 756 + "__id__": 758 }, "_contentSize": { "__type__": "cc.Size", @@ -15838,7 +15857,7 @@ }, "_enabled": true, "__prefab": { - "__id__": 758 + "__id__": 760 }, "_alignFlags": 45, "_target": null, @@ -15874,7 +15893,7 @@ }, "_enabled": true, "__prefab": { - "__id__": 760 + "__id__": 762 }, "_id": "" }, @@ -15894,15 +15913,15 @@ "instance": null, "targetOverrides": [ { - "__id__": 762 + "__id__": 764 }, { - "__id__": 765 + "__id__": 767 } ], "nestedPrefabInstanceRoots": [ { - "__id__": 740 + "__id__": 742 }, { "__id__": 643 @@ -15951,7 +15970,7 @@ "__id__": 64 }, "sourceInfo": { - "__id__": 763 + "__id__": 765 }, "propertyPath": [ "_target" @@ -15960,7 +15979,7 @@ "__id__": 64 }, "targetInfo": { - "__id__": 764 + "__id__": 766 } }, { @@ -15981,7 +16000,7 @@ "__id__": 64 }, "sourceInfo": { - "__id__": 766 + "__id__": 768 }, "propertyPath": [ "_target" @@ -15990,7 +16009,7 @@ "__id__": 64 }, "targetInfo": { - "__id__": 767 + "__id__": 769 } }, { diff --git a/assets/resources/gui/top_inf.prefab b/assets/resources/gui/top_inf.prefab index cfd824cc..6d71c281 100644 --- a/assets/resources/gui/top_inf.prefab +++ b/assets/resources/gui/top_inf.prefab @@ -336,7 +336,7 @@ }, "_contentSize": { "__type__": "cc.Size", - "width": 220, + "width": 350, "height": 50 }, "_anchorPoint": { @@ -437,7 +437,7 @@ }, "_lpos": { "__type__": "cc.Vec3", - "x": 110.74, + "x": 176.953, "y": 25, "z": 0 }, @@ -478,7 +478,7 @@ }, "_contentSize": { "__type__": "cc.Size", - "width": 170, + "width": 300, "height": 39.8 }, "_anchorPoint": { @@ -849,7 +849,7 @@ }, "_lpos": { "__type__": "cc.Vec3", - "x": 225.086, + "x": 323.804, "y": 25.663, "z": 0 }, @@ -1211,7 +1211,7 @@ }, "_lpos": { "__type__": "cc.Vec3", - "x": 260, + "x": 350, "y": 70, "z": 0 }, @@ -1543,7 +1543,7 @@ }, "_lpos": { "__type__": "cc.Vec3", - "x": 123.051, + "x": 127.866, "y": 25, "z": 0 }, @@ -2246,7 +2246,7 @@ }, "_alignFlags": 12, "_target": null, - "_left": 260, + "_left": 350, "_right": 68.59100000000001, "_top": 0, "_bottom": 70, @@ -2303,7 +2303,7 @@ "__id__": 135 } ], - "_active": true, + "_active": false, "_components": [ { "__id__": 147 @@ -2743,7 +2743,7 @@ "_isUnderline": false, "_underlineHeight": 2, "_cacheMode": 0, - "_enableOutline": true, + "_enableOutline": false, "_outlineColor": { "__type__": "cc.Color", "r": 0, diff --git a/assets/script/game/common/SingletonModuleComp.ts b/assets/script/game/common/SingletonModuleComp.ts index 7360a5e5..15d96df6 100644 --- a/assets/script/game/common/SingletonModuleComp.ts +++ b/assets/script/game/common/SingletonModuleComp.ts @@ -56,22 +56,8 @@ export class SingletonModuleComp extends ecs.Comp { sk_info:any = [] monsters_dead:any = [] heros_dead:any = [] - hero_pos:any=[ - {x:-320,y:BoxSet.GAME_LINE}, - {x:-320,y:BoxSet.GAME_LINE}, - {x:-320,y:BoxSet.GAME_LINE}, - {x:-320,y:BoxSet.GAME_LINE}, - {x:-320,y:BoxSet.GAME_LINE}, - {x:-320,y:BoxSet.GAME_LINE}, - ] - enemy_pos:any =[ - {x:320,y:BoxSet.GAME_LINE}, - {x:320,y:BoxSet.GAME_LINE}, - {x:320,y:BoxSet.GAME_LINE}, - {x:320,y:BoxSet.GAME_LINE}, - {x:320,y:BoxSet.GAME_LINE}, - {x:320,y:BoxSet.GAME_LINE}, - ] + hero_pos:any=[] + enemy_pos:any =[] vm_data: any = { name : "纸片精灵大乱斗", game_over:false, @@ -81,10 +67,9 @@ export class SingletonModuleComp extends ecs.Comp { mission:{ play:false, pause:false, - refresh_timer:3, - mission_lv:1, - boss_cd:10, - bboss_cd:10, + is_victory:false, + is_defeat:false, + lv:1, victory:0, once:6, //每波刷新怪物数量 total:1, //总怪物数 @@ -96,26 +81,7 @@ export class SingletonModuleComp extends ecs.Comp { mb_exp:0, //敌方远程经验石 mc_exp:0, //敌方辅助经验石 md_exp:0, //敌方特殊经验石 - m_less:0, - m_alive:120, - g_level:1, - g_time:0, - reward:20, //怪物死亡奖励数量 reward_num:0, //怪物死亡数 - coin:200, - coin_add:1, - coin_reward_add:1, - normal_cost:10, - better_cost:20, - best_cost:30, - enhancement_cost:100, - normal_lv:1, - better_lv:1, - best_lv:1, - t_damge:0, - t_dps:0, - h_dps:0, - m_dps:0, reward_gold:0, reward_exp:0, hero:{ @@ -130,6 +96,7 @@ export class SingletonModuleComp extends ecs.Comp { } }, role:{ + fight_heros:[9001,9001], gold:9999999, gems:0, energy:0, diff --git a/assets/script/game/common/config/MissionSet.ts b/assets/script/game/common/config/MissionSet.ts index a09d2a1f..aaa50fa6 100644 --- a/assets/script/game/common/config/MissionSet.ts +++ b/assets/script/game/common/config/MissionSet.ts @@ -1,4 +1,4 @@ -export const MissionNum = [1] + export const MonsetList = { 1:{ 1:[9001], @@ -11,46 +11,13 @@ export const BossList = { } } +export const MissionNum = 3 //对应关卡数MissionSet 的索引 +export const MissionSet = [ + [9001], + [9001], + [9001], +] -export const MissionSet = { - 1:{ - lv1_num:10, - lv2_num:10, - lv3_num:10, - lv4_num:10, - lv5_num:10, - lv1_skill_num:10, - lv2_skill_num:10, - lv3_skill_num:10, - lv4_skill_num:10, - lv5_skill_num:10, - }, - 2:{ - lv1_num:10, - lv2_num:10, - lv3_num:10, - lv4_num:10, - lv5_num:10, - lv1_skill_num:10, - lv2_skill_num:10, - lv3_skill_num:10, - lv4_skill_num:10, - lv5_skill_num:10, - }, - 3:{ - lv1_num:10, - lv2_num:10, - lv3_num:10, - lv4_num:10, - lv5_num:10, - lv1_skill_num:10, - lv2_skill_num:10, - lv3_skill_num:10, - lv4_skill_num:10, - lv5_skill_num:10, - } - -} export const MissionReward = { 1:[1001,1002,1003,1004,1005], diff --git a/assets/script/game/common/config/heroSet.ts b/assets/script/game/common/config/heroSet.ts index 3f3b128c..cf02a348 100644 --- a/assets/script/game/common/config/heroSet.ts +++ b/assets/script/game/common/config/heroSet.ts @@ -2,7 +2,7 @@ export const HeroInfo = { 9001: { uuid: 9001, path: "k1", type: 1, lv: 1,name: "白衣骑士", wp:1001,arm:2001,ring:3001,shoes:4001, - aep:1,uaep:1,dep:10,edep:1, ap: 20, ap_up:0.1, hp: 100, hp_up:0.1,def:10,def_up:0.1,dis: 100, a_cd: 1, pw: 0, pwm: 15,pws: 1, + aep:1,uaep:1,dep:10,edep:1, ap: 20, ap_up:0.1, hp: 200, hp_up:0.1,def:10,def_up:0.1,dis: 100, a_cd: 1, pw: 0, pwm: 15,pws: 1, vun:0,crit:20,crit_add:0,dodge:0, sk1: 9001, sk2: 2002, sk3: 9003, sk4: 9004, sk5: 9005, sk6: 9006, atktype: 1,akr:10,uar:10,dgr:10,crr:10,akc:1,uac:1,dgc:1,crc:1, speed: 100, }, @@ -21,8 +21,8 @@ export const MonSet = { } export const HeroSet = { StartPos:{ - 1: -200, - 2: -250, + 1: -300, + 2: -300, 3: -300, } diff --git a/assets/script/game/hero/Hero.ts b/assets/script/game/hero/Hero.ts index 621dc2ef..7a703c64 100644 --- a/assets/script/game/hero/Hero.ts +++ b/assets/script/game/hero/Hero.ts @@ -42,7 +42,7 @@ export class Hero extends ecs.Entity { } /** 加载角色 */ - load(pos: Vec3 = Vec3.ZERO,scale:number = 1,uuid:number=1001,index:number=-1,is_hero:boolean=true) { + load(pos: Vec3 = Vec3.ZERO,scale:number = 1,uuid:number=1001,is_hero:boolean=true) { let box_group= 0 if (is_hero) { @@ -63,11 +63,11 @@ export class Hero extends ecs.Entity { node.parent = scene.entityLayer!.node! node.setPosition(pos) - this.hero_init(uuid,node,index,scale,box_group) + this.hero_init(uuid,node,scale,box_group) oops.message.dispatchEvent("hero_load",this) } - hero_init(uuid:number=1001,node:Node,index:number=-1,scale:number=1,box_group=BoxSet.HERO){ + hero_init(uuid:number=1001,node:Node,scale:number=1,box_group=BoxSet.HERO){ var hv = node.getComponent(HeroViewComp)!; // console.log("hero_init",buff) let HInf= smc.heros[uuid] // 角色数据 diff --git a/assets/script/game/hero/HeroViewComp.ts b/assets/script/game/hero/HeroViewComp.ts index f5800a92..b5f9f618 100644 --- a/assets/script/game/hero/HeroViewComp.ts +++ b/assets/script/game/hero/HeroViewComp.ts @@ -116,7 +116,6 @@ export class HeroViewComp extends CCComp { } /** 视图层逻辑代码分离演示 */ start () { - console.log(this.node.parent) this.as.idle() /** 方向 */ this.node.setScale(this.scale,1); @@ -188,17 +187,17 @@ export class HeroViewComp extends CCComp { let self_x = selfCollider.node.position.x; let other_x = otherCollider.node.position.x; if(selfCollider.group == otherCollider.group&&selfCollider.tag==otherCollider.tag){ - if(otherCollider.node.getComponent(HeroViewComp).type == this.type && self_x < other_x && Math.abs(other_x-self_x) < 15 ){ - this.stop_cd = 0.1; + if(selfCollider.group==BoxSet.HERO){ + if(otherCollider.node.getComponent(HeroViewComp).type == this.type && self_x < other_x && Math.abs(other_x-self_x) < 8 ){ + this.stop_cd = 0.1; + } } - // if(selfCollider.node.position.y < otherCollider.node.position.y){ - // if(selfCollider.node.getSiblingIndex() < otherCollider.node.getSiblingIndex()){ - - // selfCollider.node.setSiblingIndex(otherCollider.node.getSiblingIndex()+1) - // // console.log("onPreSolve b:"+selfCollider.node.uuid+":"+selfCollider.node.getSiblingIndex()+"/"+otherCollider.node.uuid+":"+otherCollider.node.getSiblingIndex()); - // } - - // } + if(selfCollider.group==BoxSet.MONSTER){ + if(otherCollider.node.getComponent(HeroViewComp).type == this.type && self_x > other_x && Math.abs(other_x-self_x) < 8 ){ + this.stop_cd = 0.1; + } + } + } if(selfCollider.group != otherCollider.group&&otherCollider.tag == 0){ this.stop_cd = 0.1; @@ -208,14 +207,9 @@ export class HeroViewComp extends CCComp { onPostSolve (selfCollider: Collider2D, otherCollider: Collider2D) { } update(dt: number){ - if(!smc.vm_data.mission.play||smc.vm_data.pause){ - let pos =v3(this.scale*-9999,this.node.position.y,this.node.position.z) - this.node.setPosition(pos) - return - } - if(this.is_dead){ - let pos =v3(this.scale*-9999,this.node.position.y,this.node.position.z) - this.node.setPosition(pos) + if(!smc.vm_data.mission.play||smc.vm_data.pause||smc.vm_data.mission.is_victory||smc.vm_data.mission.is_defeat) return + if(this.is_dead) { + if(!this.in_grave()) this.to_grave() return } @@ -265,6 +259,16 @@ export class HeroViewComp extends CCComp { this.is_atking=false } } + to_grave(){ + let pos =v3(-999,this.node.position.y) + if(this.box_group == BoxSet.MONSTER){ + pos =v3(999,this.node.position.y) + } + this.node.setPosition(pos) + } + in_grave(){ + return this.node.position.x < -900 || this.node.position.x > 900; + } status_change(type:string){ this.status=type if(type == "idle"){ @@ -281,10 +285,10 @@ export class HeroViewComp extends CCComp { this.status_change("idle") return } - if (this.node.position.x >= 360 && this.scale==1) { + if (this.node.position.x >= 300 && this.scale==1) { return; } - if(this.scale===-1&&this.node.position.x <= -360){ + if(this.scale===-1&&this.node.position.x <= -300){ return; } this.status_change("move") @@ -603,6 +607,7 @@ export class HeroViewComp extends CCComp { this.node.getChildByName("top").getChildByName("hp").getComponent(ProgressBar)!.progress = hp_progress; if(this.hp <= 0){ this.dead(); + this.to_grave() this.is_dead = true; // setTimeout(() => { // this.ent.destroy(); diff --git a/assets/script/game/map/MIssionController.ts b/assets/script/game/map/MIssionController.ts index 4d013596..77b14fde 100644 --- a/assets/script/game/map/MIssionController.ts +++ b/assets/script/game/map/MIssionController.ts @@ -1,4 +1,4 @@ -import { _decorator,Button,EventHandler,EventTouch,Label,NodeEventType,resources,Sprite,SpriteAtlas,UITransform,v3, Vec3 } from "cc"; +import { _decorator,Button,EventHandler,EventTouch,Label,NodeEventType,resources,Sprite,SpriteAtlas,tween,UITransform,v3, Vec3 } from "cc"; import { ecs } from "../../../../extensions/oops-plugin-framework/assets/libs/ecs/ECS"; import { CCComp } from "../../../../extensions/oops-plugin-framework/assets/module/common/CCComp"; import { smc } from "../common/SingletonModuleComp"; @@ -20,7 +20,7 @@ import { Hero } from "../hero/Hero"; import { HeroSet } from "../common/config/heroSet"; import { Boss } from "../Boss/Boss"; import { MonModelComp } from "../mon/MonModelComp"; -import { BossList, MissionNum, MonsetList } from "../common/config/MissionSet"; +import { BossList, MissionNum, MissionSet, MonsetList } from "../common/config/MissionSet"; import { Timer } from "../../../../extensions/oops-plugin-framework/assets/core/common/timer/Timer"; import { HCard } from "./HCard"; import { HCardComp } from "./HCardComp"; @@ -32,32 +32,14 @@ const { ccclass, property } = _decorator; @ccclass('MissionComp') @ecs.register('Mission', false) export class MissionComp extends CCComp { - max_count: number = 99 ; //最大波次 - cur_count: number = 1; //波次 - boss_count: number = 10; //boss波次间隔 - monster_level:number = 1; //怪物池等级 - max_monster_level:number = 4; //最高怪物次等级 - min_monster_num:number = 1; ///最小每次刷新怪物数量 - max_monster_num:number = 1; //最大每次刷新怪物数量 - refresh_timer: Timer = new Timer(5); // 刷新怪物定时器 - refresh_cd: Timer = new Timer(0.5); - mission_up_timer: Timer = new Timer(30); //波次增加 - boss_timer: Timer = new Timer(10); - boss_num:number = 1; - cur_mission:number = 1; //当前关卡方案 - mission_list:any = [] - boss_list:any = [] - setp_timer: Timer = new Timer(0.3); + + mon_list:any = [] call_hero_timer: Timer = new Timer(0.3); target_timer: Timer = new Timer(0.1); - setp_num:number = smc.vm_data.mission.once; - total:number = 0; - hero_total:number = 0; reward:number = 0; reward_num:number = 0; game_over:boolean = false; - start_ys:any[] = [0,70,-70]; - mon_index:number = 0 + fight_start:boolean = false; msk:any={ on :false, uuid:1001, @@ -71,36 +53,20 @@ export class MissionComp extends CCComp { lv: 1 } onLoad(){ - + } start() { - + } protected update(dt: number): void { if(!smc.vm_data.mission.play||smc.vm_data.pause){ return } - if(this.setp_timer.update(dt)){ - if(this.total<=0) return - this.monster_refresh() - } - if(this.call_hero_timer.update(dt)){ - if(this.hero_total <= 0) return - this.heros_call() - } - if(this.boss_timer.update(dt)){ - if(this.boss_num <=0 ) return - // this.load_boss() - } - this.is_reward() - if (this.refresh_timer.update(dt)) { - this.setp_num=smc.vm_data.mission.once - } - if (this.mission_up_timer.update(dt)) { - // 刷新怪物定时器 - this.cur_count += 1; + if(this.fight_start){ + this.check_mon_num() } + this.do_reward() this.count_hero_pos() this.count_mon_pos() this.check_exp() @@ -112,23 +78,19 @@ export class MissionComp extends CCComp { } mission_start(){ /* todo 关卡设定完善*/ - this.total=smc.vm_data.mission.m_less=smc.vm_data.mission.m_alive=smc.vm_data.mission.total; - this.hero_total=2 - let num =RandomManager.instance.getRandomByObjectList(MissionNum,1) - this.cur_mission = num[0] - this.mission_list = MonsetList[this.cur_mission] - this.boss_list = BossList[this.cur_mission] - // console.log("当前关卡方案",this.cur_mission,this.mission_list) - this.refresh_timer= new Timer(smc.vm_data.mission.refresh_timer); - this.boss_num=1 - this.boss_timer = new Timer(smc.vm_data.mission.boss_cd) + let mon_set=RandomManager.instance.getRandomByObjectList(MissionSet,1) + this.mon_list=mon_set[0] + console.log("mission_start:",this.mon_list) //局内数据初始化 - 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 //敌方辅助经验石 + 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 //敌方辅助经验 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 @@ -137,7 +99,54 @@ export class MissionComp extends CCComp { 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.mon_refresh() + this.heros_call() + } + mission_end(){ + smc.vm_data.mission.play=false + let heros:any= this.get_heros();; + let monsters:any= this.get_mons(); + let hcards:any= ecs.query(ecs.allOf(HCardComp)); + let mska:any= ecs.query(ecs.allOf(MSkillComp)); + for(let i=0;i= MSkillset.confirm_exp){ this.msk.type = 2 this.msk.on = true this.select_msk(2) - this.node.getChildByName("exp").getChildByName("a_exp").active = false - this.node.getChildByName("exp").getChildByName("c_exp").active = false + 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.node.getChildByName("exp").getChildByName("a_exp").active = false - this.node.getChildByName("exp").getChildByName("b_exp").active = false + this.exp_move(-100,-100,30) } }else{ switch (this.msk.type){ @@ -184,7 +190,6 @@ export class MissionComp extends CCComp { break; } } - } check_m_exp(){ if(!this.mmsk.on){ @@ -192,22 +197,19 @@ export class MissionComp extends CCComp { this.mmsk.type = 1 this.mmsk.on = true this.select_mmsk(1) - this.node.getChildByName("mexp").getChildByName("b_exp").active = false - this.node.getChildByName("mexp").getChildByName("c_exp").active = false + 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.node.getChildByName("mexp").getChildByName("a_exp").active = false - this.node.getChildByName("mexp").getChildByName("c_exp").active = false + 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.node.getChildByName("mexp").getChildByName("a_exp").active = false - this.node.getChildByName("mexp").getChildByName("b_exp").active = false + this.mexp_move(100,100,-30) } }else{ switch (this.mmsk.type){ @@ -249,129 +251,94 @@ export class MissionComp extends CCComp { let sk:any=RandomManager.instance.getRandomByObjectList(MSlist[type],1) this.mmsk.uuid=sk[0] let mskill=ecs.getEntity(MSkill) - mskill.load(BoxSet.MONSTER,this.msk.uuid) - } - - - mission_end(){ - smc.vm_data.mission.play=false - let heros:any= ecs.query(ecs.allOf(HeroModelComp)); - let monsters:any= ecs.query(ecs.allOf(MonModelComp)); - let hcards:any= ecs.query(ecs.allOf(HCardComp)); - let mska:any= ecs.query(ecs.allOf(MSkillComp)); - for(let i=0;i2){ - this.mon_index = 0 - } - smc.vm_data.mission.m_less=this.total -= 1 - // this.setp_num -= 1 - } - is_reward(){ - if(smc.vm_data.mission.reward_num < smc.vm_data.mission.reward) return - // this.do_reward() - smc.vm_data.mission.reward_num = 0 + mskill.load(BoxSet.MONSTER,this.mmsk.uuid) } do_reward(){ console.log("do_reward") oops.message.dispatchEvent("do_reward"); } - + check_mon_num(){ + let mons:any = this.get_mons() + let heros:any= this.get_heros() + let h_alive=false + let m_alive=false + for (let i = 0; i < heros.length; i++) { + if ( !heros[i].HeroView.is_dead) { + h_alive=true + } + } + for (let i = 0; i < mons.length; i++) { + if ( !mons[i].HeroView.is_dead) { + m_alive=true + } + } + if (!m_alive) smc.vm_data.mission.is_victory = true + if (!h_alive) smc.vm_data.mission.is_defeat = true + console.log("check_end m_alive: "+m_alive+" h_alive:"+h_alive+" victory:"+smc.vm_data.mission.is_victory+" defeat:"+smc.vm_data.mission.is_defeat) + } + get_mons(){ + return ecs.query(ecs.allOf(MonModelComp)); + } + get_heros(){ + return ecs.query(ecs.allOf(HeroModelComp)) + } count_mon_pos(){ - let monsters:any= ecs.query(ecs.allOf(MonModelComp)); + let monsters:any= this.get_mons() for(let i=0;i(HCard) - console.log("hcard:",hcard) + // console.log("hcard:",hcard) hcard.load(1001,i,node) } - + this.fight_start= true } /** 添加玩家 */ - private addHero(uuid:number=1001) { + private addHero(uuid:number=1001,i:number=0) { let hero = ecs.getEntity(Hero); let scale = 1 - let pos:Vec3 = v3(HeroSet.StartPos[smc.heros[uuid].type],BoxSet.GAME_LINE); - console.log("addHero:",pos) + let pos:Vec3 = v3(HeroSet.StartPos[smc.heros[uuid].type]-i*15,BoxSet.GAME_LINE); + // console.log("addHero:",pos) hero.load(pos,scale,uuid); } - private addMonster(uuid:number=1001) { + private addMonster(uuid:number=1001,i:number=0) { let monster = ecs.getEntity(Hero); let scale = -1 - let index = -1 - let pos:Vec3 = v3(-1*HeroSet.StartPos[smc.heros[uuid].type],BoxSet.GAME_LINE); + let pos:Vec3 = v3(-1*HeroSet.StartPos[smc.heros[uuid].type]+i*15,BoxSet.GAME_LINE); console.log("addMonster:",pos) - monster.load(pos,scale,uuid,index,false); + monster.load(pos,scale,uuid,false); } - load_boss(){ - let bs:any = RandomManager.instance.getRandomByObjectList(this.boss_list[this.monster_level],1) - var scene = smc.map.MapView.scene; - let pos:Vec3 = v3(260,BoxSet.GAME_LINE) - let layer = scene.entityLayer!.node! - let b = ecs.getEntity(Boss); - let scale = -1 - b.load(pos,scale,bs[0],layer); - this.boss_num -= 1 - } /** 视图层逻辑代码分离演示 */ diff --git a/assets/script/game/skills/MSkillComp.ts b/assets/script/game/skills/MSkillComp.ts index f636aca4..ceb12867 100644 --- a/assets/script/game/skills/MSkillComp.ts +++ b/assets/script/game/skills/MSkillComp.ts @@ -28,8 +28,10 @@ export class MSkillComp extends CCComp { console.log("MSkillComp start"); } 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){ + return + } this.check_cd(dt) - } check_cd(dt:number){ this.cdt-=dt