buff 优化 heroset 不再使用json

This commit is contained in:
2024-08-29 00:28:22 +08:00
parent 5094cb4f3c
commit 3ad7155a28
9 changed files with 563 additions and 54 deletions

View File

@@ -52,8 +52,8 @@
},
"_lscale": {
"__type__": "cc.Vec3",
"x": 0.7,
"y": 0.7,
"x": 0.5,
"y": 0.5,
"z": 1
},
"_mobility": 0,
@@ -258,7 +258,7 @@
"_lpos": {
"__type__": "cc.Vec3",
"x": 0,
"y": 0,
"y": -54.944,
"z": 0
},
"_lrot": {
@@ -270,8 +270,8 @@
},
"_lscale": {
"__type__": "cc.Vec3",
"x": 2,
"y": 2,
"x": 1,
"y": 1,
"z": 1
},
"_mobility": 0,
@@ -298,7 +298,7 @@
},
"_contentSize": {
"__type__": "cc.Size",
"width": 17.90380859375,
"width": 26.24609375,
"height": 54.4
},
"_anchorPoint": {
@@ -337,8 +337,8 @@
"_string": "5",
"_horizontalAlign": 1,
"_verticalAlign": 1,
"_actualFontSize": 25,
"_fontSize": 25,
"_actualFontSize": 40,
"_fontSize": 40,
"_fontFamily": "Arial",
"_lineHeight": 40,
"_overflow": 0,

View File

@@ -38,34 +38,37 @@
},
{
"__id__": 65
},
{
"__id__": 75
}
],
"_active": true,
"_components": [
{
"__id__": 75
"__id__": 89
},
{
"__id__": 77
"__id__": 91
},
{
"__id__": 79
"__id__": 93
},
{
"__id__": 81
"__id__": 95
},
{
"__id__": 83
"__id__": 97
},
{
"__id__": 85
"__id__": 99
},
{
"__id__": 87
"__id__": 101
}
],
"_prefab": {
"__id__": 89
"__id__": 103
},
"_lpos": {
"__type__": "cc.Vec3",
@@ -1647,6 +1650,307 @@
"targetOverrides": null,
"nestedPrefabInstanceRoots": null
},
{
"__type__": "cc.Node",
"_name": "shield",
"_objFlags": 0,
"__editorExtras__": {},
"_parent": {
"__id__": 1
},
"_children": [
{
"__id__": 76
}
],
"_active": false,
"_components": [
{
"__id__": 82
},
{
"__id__": 84
},
{
"__id__": 86
}
],
"_prefab": {
"__id__": 88
},
"_lpos": {
"__type__": "cc.Vec3",
"x": 0,
"y": 105.727,
"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": "Bar",
"_objFlags": 0,
"__editorExtras__": {},
"_parent": {
"__id__": 75
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 77
},
{
"__id__": 79
}
],
"_prefab": {
"__id__": 81
},
"_lpos": {
"__type__": "cc.Vec3",
"x": -20,
"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": 33554432,
"_euler": {
"__type__": "cc.Vec3",
"x": 0,
"y": 0,
"z": 0
},
"_id": ""
},
{
"__type__": "cc.UITransform",
"_name": "",
"_objFlags": 0,
"__editorExtras__": {},
"node": {
"__id__": 76
},
"_enabled": true,
"__prefab": {
"__id__": 78
},
"_contentSize": {
"__type__": "cc.Size",
"width": 40,
"height": 5
},
"_anchorPoint": {
"__type__": "cc.Vec2",
"x": 0,
"y": 0.5
},
"_id": ""
},
{
"__type__": "cc.CompPrefabInfo",
"fileId": "fd3dH6jldPsa66Ci7KUVI3"
},
{
"__type__": "cc.Sprite",
"_name": "",
"_objFlags": 0,
"__editorExtras__": {},
"node": {
"__id__": 76
},
"_enabled": true,
"__prefab": {
"__id__": 80
},
"_customMaterial": null,
"_srcBlendFactor": 2,
"_dstBlendFactor": 4,
"_color": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 255
},
"_spriteFrame": {
"__uuid__": "20835ba4-6145-4fbc-a58a-051ce700aa3e@f9941",
"__expectedType__": "cc.SpriteFrame"
},
"_type": 1,
"_fillType": 0,
"_sizeMode": 0,
"_fillCenter": {
"__type__": "cc.Vec2",
"x": 0,
"y": 0
},
"_fillStart": 0,
"_fillRange": 0,
"_isTrimmedMode": true,
"_useGrayscale": true,
"_atlas": null,
"_id": ""
},
{
"__type__": "cc.CompPrefabInfo",
"fileId": "42nR/FpVZByb+otJaujBAU"
},
{
"__type__": "cc.PrefabInfo",
"root": {
"__id__": 1
},
"asset": {
"__id__": 0
},
"fileId": "82t+mKrT1NDK/FLaizJqmu",
"instance": null,
"targetOverrides": null,
"nestedPrefabInstanceRoots": null
},
{
"__type__": "cc.UITransform",
"_name": "",
"_objFlags": 0,
"__editorExtras__": {},
"node": {
"__id__": 75
},
"_enabled": true,
"__prefab": {
"__id__": 83
},
"_contentSize": {
"__type__": "cc.Size",
"width": 40,
"height": 5
},
"_anchorPoint": {
"__type__": "cc.Vec2",
"x": 0.5,
"y": 0.5
},
"_id": ""
},
{
"__type__": "cc.CompPrefabInfo",
"fileId": "d0Vsb23mxLQp4brp5KrYoI"
},
{
"__type__": "cc.Sprite",
"_name": "",
"_objFlags": 0,
"__editorExtras__": {},
"node": {
"__id__": 75
},
"_enabled": true,
"__prefab": {
"__id__": 85
},
"_customMaterial": null,
"_srcBlendFactor": 2,
"_dstBlendFactor": 4,
"_color": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 255
},
"_spriteFrame": null,
"_type": 1,
"_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": "817EmqwtZOoo1jCiT331/h"
},
{
"__type__": "cc.ProgressBar",
"_name": "",
"_objFlags": 0,
"__editorExtras__": {},
"node": {
"__id__": 75
},
"_enabled": true,
"__prefab": {
"__id__": 87
},
"_barSprite": {
"__id__": 79
},
"_mode": 0,
"_totalLength": 40,
"_progress": 1,
"_reverse": false,
"_id": ""
},
{
"__type__": "cc.CompPrefabInfo",
"fileId": "03p2B8lt5IL6sqNzysZUD4"
},
{
"__type__": "cc.PrefabInfo",
"root": {
"__id__": 1
},
"asset": {
"__id__": 0
},
"fileId": "f5X0rdMcFOMZ0GRx4uHEc0",
"instance": null,
"targetOverrides": null,
"nestedPrefabInstanceRoots": null
},
{
"__type__": "cc.UITransform",
"_name": "",
@@ -1657,7 +1961,7 @@
},
"_enabled": true,
"__prefab": {
"__id__": 76
"__id__": 90
},
"_contentSize": {
"__type__": "cc.Size",
@@ -1685,7 +1989,7 @@
},
"_enabled": true,
"__prefab": {
"__id__": 78
"__id__": 92
},
"animator": {
"__id__": 24
@@ -1706,7 +2010,7 @@
},
"_enabled": true,
"__prefab": {
"__id__": 80
"__id__": 94
},
"hitFlashMaterial": {
"__uuid__": "a8f34051-ccff-4050-b9d9-234f62977264",
@@ -1731,7 +2035,7 @@
},
"_enabled": true,
"__prefab": {
"__id__": 82
"__id__": 96
},
"_id": ""
},
@@ -1749,7 +2053,7 @@
},
"_enabled": true,
"__prefab": {
"__id__": 84
"__id__": 98
},
"_customMaterial": null,
"_srcBlendFactor": 2,
@@ -1791,7 +2095,7 @@
},
"_enabled": true,
"__prefab": {
"__id__": 86
"__id__": 100
},
"enabledContactListener": true,
"bullet": true,
@@ -1825,7 +2129,7 @@
},
"_enabled": true,
"__prefab": {
"__id__": 88
"__id__": 102
},
"tag": 0,
"_group": 2,

View File

@@ -23,13 +23,13 @@ export class SingletonModuleComp extends ecs.Comp {
map: GameMap = null!;
player_buffs: any = [
{x:-BoxSet.CSKILL_X,y:BoxSet.CSKILL_Y,eid:0},
{x:-BoxSet.CSKILL_X+70,y:BoxSet.CSKILL_Y,eid:0},
{x:-BoxSet.CSKILL_X+140,y:BoxSet.CSKILL_Y,eid:0},
{x:-BoxSet.CSKILL_X+210,y:BoxSet.CSKILL_Y,eid:0},
{x:-BoxSet.CSKILL_X,y:BoxSet.CSKILL_Y-70,eid:0},
{x:-BoxSet.CSKILL_X+70,y:BoxSet.CSKILL_Y-70,eid:0},
{x:-BoxSet.CSKILL_X+140,y:BoxSet.CSKILL_Y-70,eid:0},
{x:-BoxSet.CSKILL_X+210,y:BoxSet.CSKILL_Y-70,eid:0},
{x:-BoxSet.CSKILL_X,y:BoxSet.CSKILL_Y+55,eid:0},
{x:-BoxSet.CSKILL_X,y:BoxSet.CSKILL_Y+110,eid:0},
{x:-BoxSet.CSKILL_X+55,y:BoxSet.CSKILL_Y,eid:0},
{x:-BoxSet.CSKILL_X+55,y:BoxSet.CSKILL_Y+55,eid:0},
{x:-BoxSet.CSKILL_X+55,y:BoxSet.CSKILL_Y+110,eid:0},
{x:-BoxSet.CSKILL_X,y:BoxSet.CSKILL_Y,eid:0},
{x:-BoxSet.CSKILL_X,y:BoxSet.CSKILL_Y,eid:0},
];
monster_buffs: any = [];
/** 游戏主角 */

View File

@@ -28,8 +28,8 @@ export enum BoxSet {
END_POINT = 360,
//游戏地平线
GAME_LINE = 10,
CSKILL_X = 280,
CSKILL_Y = 300,
CSKILL_X = 320,
CSKILL_Y = 200,
//攻击距离
ATK_RANGE_X = 85,
MOVE_RANGE_X = 20,

View File

@@ -0,0 +1,174 @@
export const HeroSet={
1101:{uuid: 1101,path: 1101,type: 1,level: 1,name: "守护犬",atk: 4,hp: 24,atk_cd: 2,power: 50,speed: 80,
skill: "base",max_skill: "base",skill_uuid: 9001,max_skill_uuid: 1001,word: "守护",info: "自身护盾", atktype: "攻击型",mon: "狗"},
1102:{uuid: 1102,path: 1102,type: 1,level: 1,name: "狂暴犬",atk: 4,hp: 24,atk_cd: 2,power: 50,speed: 80,
skill: "base",max_skill: "base",skill_uuid: 9001,max_skill_uuid: 1001,word: "狂暴",info: "全体攻击", atktype: "攻击型",mon: "狗"},
1103:{uuid: 1103,path: 1103,type: 1,level: 1,name: "火焰犬",atk: 4,hp: 24,atk_cd: 2,power: 50,speed: 80,
skill: "base",max_skill: "base",skill_uuid: 9001,max_skill_uuid: 1001,word: "火焰",info: "大火球", atktype: "攻击型",mon: "狗"},
1104:{uuid: 1104,path: 1104,type: 1,level: 1,name: "机甲犬",atk: 4,hp: 24,atk_cd: 2,power: 50,speed: 80,
skill: "base",max_skill: "base",skill_uuid: 9001,max_skill_uuid: 1001, atktype: "攻击型",mon: "狗"},
1105:{uuid: 1105,path: 1105,type: 1,level: 1,name: "战斗蚁",atk: 4,hp: 24,atk_cd: 2,power: 50,speed: 80,
skill: "base",max_skill: "base",skill_uuid: 9001,max_skill_uuid: 1001, atktype: "攻击型",mon: "蚂蚁"},
1106:{uuid: 1106,path: 1106,type: 1,level: 1,name: "战斗蚁",atk: 4,hp: 24,atk_cd: 2,power: 50,speed: 80,
skill: "base",max_skill: "base",skill_uuid: 9001,max_skill_uuid: 1001, atktype: "攻击型",mon: "蚂蚁"},
2101:{uuid: 2101,path: 2101,type: 1,level: 2,name: "金刚鹦鹉",atk: 6,hp: 36,atk_cd: 2,power: 50,speed: 80,
skill: "base",max_skill: "base",skill_uuid: 9001,max_skill_uuid: 1001,word: "金刚",info: "全体招架", atktype: "攻击型",mon: "鹦鹉"},
2102:{uuid: 2102,path: 2102,type: 1,level: 2,name: "狂暴鹦鹉",atk: 6,hp: 36,atk_cd: 2,power: 50,speed: 80,
skill: "base",max_skill: "base",skill_uuid: 9001,max_skill_uuid: 1001,word: "狂暴",info: "全体攻击", atktype: "攻击型",mon: "鹦鹉"},
2103:{uuid: 2103,path: 2103,type: 1,level: 2,name: "鹰",atk: 6,hp: 36,atk_cd: 2,power: 50,speed: 80,
skill: "base",max_skill: "base",skill_uuid: 9001,max_skill_uuid: 1001, atktype: "攻击型",mon: "鹰"},
2104:{uuid: 2104,path: 2104,type: 1,level: 2,name: "鹰",atk: 6,hp: 36,atk_cd: 2,power: 50,speed: 80,
skill: "base",max_skill: "base",skill_uuid: 9001,max_skill_uuid: 1001, atktype: "攻击型",mon: "鹰"},
2105:{uuid: 2105,path: 2105,type: 1,level: 2,name: "鹰",atk: 6,hp: 36,atk_cd: 2,power: 50,speed: 80,
skill: "base",max_skill: "base",skill_uuid: 9001,max_skill_uuid: 1001, atktype: "攻击型",mon: "鹰"},
3101:{uuid: 3101,path: 3101,type: 1,level: 3,name: "火焰山羊",atk: 9,hp: 54,atk_cd: 2,power: 50,speed: 80,
skill: "base",max_skill: "base",skill_uuid: 9001,max_skill_uuid: 1001,word: "火焰",info: "大火球", atktype: "攻击型",mon: "山羊"},
3102:{uuid: 3102,path: 3102,type: 1,level: 3,name: "坚韧山羊",atk: 9,hp: 54,atk_cd: 2,power: 50,speed: 80,
skill: "base",max_skill: "base",skill_uuid: 9001,max_skill_uuid: 1001,word: "守护",info: "全体护盾", atktype: "攻击型",mon: "山羊"},
3103:{uuid: 3103,path: 3103,type: 1,level: 3,name: "山羊",atk: 9,hp: 54,atk_cd: 2,power: 50,speed: 80,
skill: "base",max_skill: "base",skill_uuid: 9001,max_skill_uuid: 1001, atktype: "攻击型",mon: "山羊"},
3104:{uuid: 3104,path: 3104,type: 1,level: 3,name: "山羊",atk: 9,hp: 54,atk_cd: 2,power: 50,speed: 80,
skill: "base",max_skill: "base",skill_uuid: 9001,max_skill_uuid: 1001, atktype: "攻击型",mon: "山羊"},
4101:{uuid: 4101,path: 4101,type: 1,level: 4,name: "炎爆麋鹿",atk: 13,hp: 81,atk_cd: 2,power: 50,speed: 80,
skill: "base",max_skill: "base",skill_uuid: 9001,max_skill_uuid: 1001,word: "炎爆",info: "炎爆", atktype: "攻击型",mon: "鹿"},
4102:{uuid: 4102,path: 4102,type: 1,level: 4,name: "金刚麋鹿",atk: 13,hp: 81,atk_cd: 2,power: 50,speed: 80,
skill: "base",max_skill: "base",skill_uuid: 9001,max_skill_uuid: 1001,word: "金刚",info: "全体招架", atktype: "攻击型",mon: "鹿"},
4103:{uuid: 4103,path: 4103,type: 1,level: 4,name: "鹿",atk: 13,hp: 81,atk_cd: 2,power: 50,speed: 80,
skill: "base",max_skill: "base",skill_uuid: 9001,max_skill_uuid: 1001, atktype: "攻击型",mon: "鹿"},
4104:{uuid: 4104,path: 4104,type: 1,level: 4,name: "鹿",atk: 13,hp: 81,atk_cd: 2,power: 50,speed: 80,
skill: "base",max_skill: "base",skill_uuid: 9001,max_skill_uuid: 1001, atktype: "攻击型",mon: "鹿"},
1201:{uuid: 1201,path: 1201,type: 2,level: 1,name: "守护绵羊",atk: 2,hp: 48,atk_cd: 2,power: 50,speed: 80,
skill: "base",max_skill: "base",skill_uuid: 9001,max_skill_uuid: 1001,word: "守护",info: "自身护盾", atktype: "血量型",mon: "绵羊"},
1202:{uuid: 1202,path: 1202,type: 2,level: 1,name: "再生绵羊",atk: 2,hp: 48,atk_cd: 2,power: 50,speed: 80,
skill: "base",max_skill: "base",skill_uuid: 9001,max_skill_uuid: 1001,word: "再生",info: "全体回血", atktype: "血量型",mon: "绵羊"},
1203:{uuid: 1203,path: 1203,type: 2,level: 1,name: "坚韧绵羊",atk: 2,hp: 48,atk_cd: 2,power: 50,speed: 80,
skill: "base",max_skill: "base",skill_uuid: 9001,max_skill_uuid: 1001,info: "全体护盾", atktype: "血量型",mon: "绵羊"},
1204:{uuid: 1204,path: 1204,type: 2,level: 1,name: "绵羊",atk: 2,hp: 48,atk_cd: 2,power: 50,speed: 80,
skill: "base",max_skill: "base",skill_uuid: 9001,max_skill_uuid: 1001, atktype: "血量型",mon: "绵羊"},
2201:{uuid: 2201,path: 2201,type: 2,level: 2,name: "坚韧龟",atk: 3,hp: 72,atk_cd: 2,power: 50,speed: 80,
skill: "base",max_skill: "base",skill_uuid: 9001,max_skill_uuid: 1001,word: "坚韧",info: "全体护盾", atktype: "血量型",mon: "龟"},
2202:{uuid: 2202,path: 2202,type: 2,level: 2,name: "狂暴龟",atk: 3,hp: 72,atk_cd: 2,power: 50,speed: 80,
skill: "base",max_skill: "base",skill_uuid: 9001,max_skill_uuid: 1001,word: "狂暴",info: "全体攻击", atktype: "血量型",mon: "龟"},
2203:{uuid: 2203,path: 2203,type: 2,level: 2,name: "龟",atk: 3,hp: 72,atk_cd: 2,power: 50,speed: 80,
skill: "base",max_skill: "base",skill_uuid: 9001,max_skill_uuid: 1001, atktype: "血量型",mon: "龟"},
2204:{uuid: 2204,path: 2204,type: 2,level: 2,name: "龟",atk: 3,hp: 72,atk_cd: 2,power: 50,speed: 80,
skill: "base",max_skill: "base",skill_uuid: 9001,max_skill_uuid: 1001, atktype: "血量型",mon: "龟"},
3201:{uuid: 3201,path: 3201,type: 2,level: 3,name: "风刃野猪",atk: 5,hp: 108,atk_cd: 2,power: 50,speed: 80,
skill: "base",max_skill: "base",skill_uuid: 9001,max_skill_uuid: 1001,word: "风刃",info: "风刃", atktype: "血量型",mon: "野猪"},
3202:{uuid: 3202,path: 3202,type: 2,level: 3,name: "急速野猪",atk: 5,hp: 108,atk_cd: 2,power: 50,speed: 80,
skill: "base",max_skill: "base",skill_uuid: 9001,max_skill_uuid: 1001,word: "急速",info: "全体闪避", atktype: "血量型",mon: "野猪"},
3203:{uuid: 3203,path: 3203,type: 2,level: 3,name: "野猪",atk: 5,hp: 108,atk_cd: 2,power: 50,speed: 80,
skill: "base",max_skill: "base",skill_uuid: 9001,max_skill_uuid: 1001, atktype: "血量型",mon: "野猪"},
3204:{uuid: 3204,path: 3204,type: 2,level: 3,name: "野猪",atk: 5,hp: 108,atk_cd: 2,power: 50,speed: 80,
skill: "base",max_skill: "base",skill_uuid: 9001,max_skill_uuid: 1001, atktype: "血量型",mon: "野猪"},
3205:{uuid: 3205,path: 3205,type: 2,level: 3,name: "野猪",atk: 5,hp: 108,atk_cd: 2,power: 50,speed: 80,
skill: "base",max_skill: "base",skill_uuid: 9001,max_skill_uuid: 1001, atktype: "血量型",mon: "野猪"},
4201:{uuid: 4201,path: 4201,type: 2,level: 4,name: "坚韧犀牛",atk: 7,hp: 162,atk_cd: 2,power: 50,speed: 80,
skill: "base",max_skill: "base",skill_uuid: 9001,max_skill_uuid: 1001,word: "坚韧",info: "全体护盾", atktype: "血量型",mon: "犀牛"},
4202:{uuid: 4202,path: 4202,type: 2,level: 4,name: "雷暴犀牛",atk: 7,hp: 162,atk_cd: 2,power: 50,speed: 80,
skill: "base",max_skill: "base",skill_uuid: 9001,max_skill_uuid: 1001,word: "雷暴",info: "雷暴", atktype: "血量型",mon: "犀牛"},
4203:{uuid: 4203,path: 4203,type: 2,level: 4,name: "犀牛",atk: 7,hp: 162,atk_cd: 2,power: 50,speed: 80,
skill: "base",max_skill: "base",skill_uuid: 9001,max_skill_uuid: 1001, atktype: "血量型",mon: "犀牛"},
4204:{uuid: 4204,path: 4204,type: 2,level: 4,name: "犀牛",atk: 7,hp: 162,atk_cd: 2,power: 50,speed: 80,
skill: "base",max_skill: "base",skill_uuid: 9001,max_skill_uuid: 1001, atktype: "血量型",mon: "犀牛"},
1301:{uuid: 1301,path: 1301,type: 3,level: 1,name: "守护喵",atk: 3,hp: 18,atk_cd: 2,power: 50,speed: 80,
skill: "base",max_skill: "base",skill_uuid: 9001,max_skill_uuid: 1001,word: "守护",info: "自身护盾", atktype: "攻速型",mon: "猫"},
1302:{uuid: 1302,path: 1302,type: 3,level: 1,name: "急速喵",atk: 3,hp: 18,atk_cd: 2,power: 50,speed: 80,
skill: "base",max_skill: "base",skill_uuid: 9001,max_skill_uuid: 1001,word: "急速",info: "全体闪避", atktype: "攻速型",mon: "猫"},
1303:{uuid: 1303,path: 1303,type: 3,level: 1,name: "狂暴喵",atk: 3,hp: 18,atk_cd: 1,power: 50,speed: 80,
skill: "base",max_skill: "base",skill_uuid: 9001,max_skill_uuid: 1001,word: "狂暴",info: "全体攻击", atktype: "攻速型",mon: "松鼠"},
1304:{uuid: 1304,path: 1304,type: 3,level: 1,atk: 3,hp: 18,atk_cd: 1,power: 50,speed: 80,
skill: "base",max_skill: "base",skill_uuid: 9001,max_skill_uuid: 1001, atktype: "攻速型",mon: "鼠"},
2301:{uuid: 2301,path: 2301,type: 3,level: 2,name: "狂爆山猫",atk: 4,hp: 27,atk_cd: 1,power: 50,speed: 80,
skill: "base",max_skill: "base",skill_uuid: 9001,max_skill_uuid: 1001,word: "狂爆",info: "全体攻击", atktype: "攻速型",mon: "山猫"},
2302:{uuid: 2302,path: 2302,type: 3,level: 2,name: "急速山猫",atk: 4,hp: 27,atk_cd: 1,power: 50,speed: 80,
skill: "base",max_skill: "base",skill_uuid: 9001,max_skill_uuid: 1001,word: "急速",info: "全体闪避", atktype: "攻速型",mon: "山猫"},
2303:{uuid: 2303,path: 2303,type: 3,level: 2,atk: 4,hp: 27,atk_cd: 1,power: 50,speed: 80,
skill: "base",max_skill: "base",skill_uuid: 9001,max_skill_uuid: 1001, atktype: "攻速型",mon: "山猫"},
2304:{uuid: 2304,path: 2304,type: 3,level: 2,atk: 4,hp: 27,atk_cd: 1,power: 50,speed: 80,
skill: "base",max_skill: "base",skill_uuid: 9001,max_skill_uuid: 1001, atktype: "攻速型",mon: "机械蜜蜂"},
2305:{uuid: 2305,path: 2305,type: 3,level: 2,atk: 4,hp: 27,atk_cd: 1,power: 50,speed: 80,
skill: "base",max_skill: "base",skill_uuid: 9001,max_skill_uuid: 1001, atktype: "攻速型",mon: "机械山猫"},
3301:{uuid: 3301,path: 3301,type: 3,level: 3,name: "坚韧狮",atk: 6,hp: 45,atk_cd: 1,power: 50,speed: 80,
skill: "base",max_skill: "base",skill_uuid: 9001,max_skill_uuid: 1001,word: "坚韧",info: "全体护盾", atktype: "攻速型",mon: "狮子"},
3302:{uuid: 3302,path: 3302,type: 3,level: 3,name: "冰封狮",atk: 6,hp: 45,atk_cd: 1,power: 50,speed: 80,
skill: "base",max_skill: "base",skill_uuid: 9001,max_skill_uuid: 1001,word: "冰封",info: "冰封", atktype: "攻速型",mon: "狮子"},
3303:{uuid: 3303,path: 3303,type: 3,level: 3,atk: 6,hp: 45,atk_cd: 1,power: 50,speed: 80,
skill: "base",max_skill: "base",skill_uuid: 9001,max_skill_uuid: 1001, atktype: "攻速型",mon: "狮子"},
3304:{uuid: 3304,path: 3304,type: 3,level: 3,atk: 6,hp: 45,atk_cd: 1,power: 50,speed: 80,
skill: "base",max_skill: "base",skill_uuid: 9001,max_skill_uuid: 1001, atktype: "攻速型",mon: "狮子"},
4301:{uuid: 4301,path: 4301,type: 3,level: 4,name: "急速独角兽",atk: 10,hp: 66,atk_cd: 1,power: 50,speed: 80,
skill: "base",max_skill: "base",skill_uuid: 9001,max_skill_uuid: 1001,word: "急速",info: "全体闪避", atktype: "攻速型",mon: "独角兽"},
4302:{uuid: 4302,path: 4302,type: 3,level: 4,name: "潮汐独角兽",atk: 10,hp: 66,atk_cd: 1,power: 50,speed: 80,
skill: "base",max_skill: "base",skill_uuid: 9001,max_skill_uuid: 1001,word: "潮汐",info: "潮汐", atktype: "攻速型",mon: "独角兽"},
4303:{uuid: 4303,path: 4303,type: 3,level: 4,atk: 10,hp: 66,atk_cd: 1,power: 50,speed: 80,
skill: "base",max_skill: "base",skill_uuid: 9001,max_skill_uuid: 1001, atktype: "攻速型",mon: "独角兽"},
4304:{uuid: 4304,path: 4304,type: 3,level: 4,atk: 10,hp: 66,atk_cd: 1,power: 50,speed: 80,
skill: "base",max_skill: "base",skill_uuid: 9001,max_skill_uuid: 1001, atktype: "攻速型",mon: "独角兽"},
5001:{uuid: 5001,path: 5001,type: 6,level: 5,atk: 15,hp: 180,atk_cd: 1,power: 50,speed: 80,
skill: "base",max_skill: "base",skill_uuid: 9001,max_skill_uuid: 1001, atktype: "精英型",mon: "雷电犀牛"},
5002:{uuid: 5002,path: 5002,type: 6,level: 5,atk: 15,hp: 180,atk_cd: 1,power: 50,speed: 80,
skill: "base",max_skill: "base",skill_uuid: 9001,max_skill_uuid: 1001, atktype: "精英型",mon: "闪电鼠"},
5003:{uuid: 5003,path: 5003,type: 6,level: 5,atk: 15,hp: 180,atk_cd: 1,power: 50,speed: 80,
skill: "base",max_skill: "base",skill_uuid: 9001,max_skill_uuid: 1001, atktype: "精英型",mon: "龙"},
5004:{uuid: 5004,path: 5004,type: 6,level: 5,atk: 15,hp: 180,atk_cd: 1,power: 50,speed: 80,
skill: "base",max_skill: "base",skill_uuid: 9001,max_skill_uuid: 1001, atktype: "精英型",mon: "龙"
}
}

View File

@@ -0,0 +1,9 @@
{
"ver": "4.0.23",
"importer": "typescript",
"imported": true,
"uuid": "91ba5d4e-bef8-4b0d-8c64-7ce0f37e43d2",
"files": [],
"subMetas": {},
"userData": {}
}

View File

@@ -12,7 +12,7 @@ import { ecs } from "../../../../extensions/oops-plugin-framework/assets/libs/ec
import { UIID } from "../common/config/GameUIConfig";
import { LoadingViewComp } from "./view/LoadingViewComp";
import { smc } from "../common/SingletonModuleComp";
import { HeroList } from "../map/HeroList";
import { HeroSet } from "../common/config/heroSet";
import { SkillSet } from "../common/config/SkillSet";
// import {data} from "../data/data";
@@ -24,7 +24,7 @@ import { SkillSet } from "../common/config/SkillSet";
@ecs.register(`Initialize`)
export class Initialize extends ecs.Entity {
LoadingView!: LoadingViewComp;
HeroList: HeroList;
// data:data=null!;
protected init() {
@@ -85,9 +85,7 @@ export class Initialize extends ecs.Entity {
/** 加载完成进入游戏内容加载界面 */
private onComplete(queue: AsyncQueue) {
queue.complete = () => {
this.HeroList = new HeroList();
this.HeroList.init(); // 等待数据加载完成
smc.heros = this.HeroList.list;
smc.heros = HeroSet;
smc.skills=SkillSet;
var uic: UICallbacks = {
onAdded: (node: Node, params: any) => {

View File

@@ -52,7 +52,7 @@ export class MonsterBuffComp extends CCComp {
}
add_buff(uuid:number=0,eid:number=0,group:number=0){
// console.log("add_buff",event,args,smc.skills[uuid]);
// console.log("add_buff",smc.skills[uuid]);
let new_buff={
skill_uuid:uuid,
@@ -87,35 +87,51 @@ export class MonsterBuffComp extends CCComp {
}
buff_add(buff:any){
// console.log("buff add:",this.buffs);
if(!this.node.isValid){ return }
let i = 0
if(this.buffs.length >=0){
this.buffs.forEach((b:any,index:number)=>{
if(b.skill_uuid==buff.skill_uuid){
b.time=buff.time;
this.mv.atk+=(buff.atk-b.atk);
this.mv.hp+=(buff.hp-b.hp);
this.mv.hp_max+=(buff.hp-b.hp);
this.mv.shield=buff.shield-b.shield;
if(buff.atk>0){
this.mv.atk+=(buff.atk-b.atk);
}
if(buff.hp>0){
this.mv.hp+=(buff.hp-b.hp);
this.mv.hp_max+=(buff.hp-b.hp);
}
if(buff.shield>0){
this.mv.shield=buff.shield;
this.mv.shield_max=buff.shield;
}
i=index
}
})
}
if (i==0||this.buffs.length==0) {
this.buffs.push(buff);
this.mv.atk+=buff.atk;
this.mv.hp+=buff.hp;
this.mv.hp_max+=buff.hp;
this.mv.shield+=buff.shield;
if(buff.atk>0){
this.mv.atk+=buff.atk;
}
if(buff.hp>0){
this.mv.hp+=buff.hp;
this.mv.hp_max+=buff.hp;
}
if(buff.shield>0){
this.mv.shield=buff.shield;
this.mv.shield_max=buff.shield;
}
}
// console.log("buff add:"+this.mv.ent.eid,this.node);
console.log("buff add:",this.mv);
}
buff_remove(index:number){
this.mv.atk=this.mv.atk-this.buffs[index].atk;
this.mv.hp_max=this.mv.hp_max-this.buffs[index].hp;
this.mv.shield=this.mv.shield-this.buffs[index].shield;
// console.log("buff remove:"+this.mv.ent.eid,this.node)
this.mv.atk-=this.buffs[index].atk;
this.mv.hp_max-=this.buffs[index].hp;
// this.mv.shield=0;
this.mv.shield_max-=this.buffs[index].shield;
console.log("buff remove:",this.mv);
}
buff_update(){
this.buffs.forEach((buff:any,index:number)=>{

View File

@@ -154,6 +154,7 @@ export class MonsterViewComp extends CCComp {
this.power_change(this.power_speed)
}
this.in_destroy();
this.in_shield();
this.in_stop(dt);
this.in_act(dt);
this.move(dt);
@@ -220,6 +221,15 @@ export class MonsterViewComp extends CCComp {
this.atk_time += dt;
}
}
in_shield(){
if(this.shield <= 0){
this.node.getChildByName("shield").active=false
}else{
this.node.getChildByName("shield").active=true
let shield_progress= this.shield/this.shield_max;
this.node.getChildByName("shield").getComponent(ProgressBar)!.progress = shield_progress;
}
}
hp_change(hp: number){
if(this.is_dead){
return;
@@ -252,8 +262,6 @@ export class MonsterViewComp extends CCComp {
this.shield = ls;
return 0;
}
// let shield_progress= this.shield/this.shield_max;
// this.node.getChildByName("shield").getComponent(ProgressBar)!.progress = shield_progress;
}
tooltip(type:number=1,value:string="",s_uuid:number=1001){
// console.log("tooltip",type);