From ede4ffd4ca71ccf7ba5ba3e517277abc16eff65a Mon Sep 17 00:00:00 2001 From: walkpan Date: Mon, 26 Aug 2024 23:42:38 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=A4=E5=AE=B3=E6=8A=80=E8=83=BD=E6=B7=BB?= =?UTF-8?q?=E5=8A=A0=EF=BC=8C=E6=8A=80=E8=83=BD=E8=BF=98=E9=9C=80=E5=AE=8C?= =?UTF-8?q?=E5=96=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- assets/resources/config/game/heros.json | 1072 ++++++++++++++++- assets/resources/game/heros/hero.prefab | 10 +- .../resources/game/heros/hero/skeleton.json | 25 +- assets/resources/game/heros/role.prefab | 263 +--- assets/resources/game/skills/fire.prefab | 8 +- assets/resources/game/skills/tooltip.prefab | 201 +++- assets/script/Main.ts | 9 +- assets/script/game/common/config/SkillSet.ts | 8 +- assets/script/game/map/MapMonsterComp.ts | 2 +- assets/script/game/map/view/MapViewComp.ts | 1 - assets/script/game/monster/CSkill.ts | 2 + assets/script/game/monster/Hero.ts | 4 +- assets/script/game/monster/Monster.ts | 1 - assets/script/game/monster/MonsterSpine.ts | 3 + .../game/monster/MonsterSpineAnimator.ts | 2 +- assets/script/game/monster/MonsterViewComp.ts | 81 +- assets/script/game/skills/Skill.ts | 2 +- assets/script/game/skills/SkillCom.ts | 6 +- assets/script/game/skills/Tooltip.ts | 9 +- assets/script/game/skills/TooltipCom.ts | 60 +- 20 files changed, 1439 insertions(+), 330 deletions(-) diff --git a/assets/resources/config/game/heros.json b/assets/resources/config/game/heros.json index 7b1e7f9f..3bb92814 100644 --- a/assets/resources/config/game/heros.json +++ b/assets/resources/config/game/heros.json @@ -1 +1,1071 @@ -{"list":[{"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":9001,"word":"守护","info":"自身护盾","atktype":"攻击型","mon":"狗"},{"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":9001,"word":"狂暴","info":"全体攻击","atktype":"攻击型","mon":"狗"},{"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":9001,"word":"火焰","info":"大火球","atktype":"攻击型","mon":"狗"},{"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":9001,"atktype":"攻击型","mon":"狗"},{"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":9001,"atktype":"攻击型","mon":"蚂蚁"},{"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":9001,"atktype":"攻击型","mon":"蚂蚁"},{"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":9001,"word":"金刚","info":"全体招架","atktype":"攻击型","mon":"鹦鹉"},{"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":9001,"word":"狂暴","info":"全体攻击","atktype":"攻击型","mon":"鹦鹉"},{"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":9001,"atktype":"攻击型","mon":"鹰"},{"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":9001,"atktype":"攻击型","mon":"鹰"},{"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":9001,"atktype":"攻击型","mon":"鹰"},{"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":9001,"word":"火焰","info":"大火球","atktype":"攻击型","mon":"山羊"},{"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":9001,"word":"守护","info":"全体护盾","atktype":"攻击型","mon":"山羊"},{"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":9001,"atktype":"攻击型","mon":"山羊"},{"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":9001,"atktype":"攻击型","mon":"山羊"},{"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":9001,"word":"炎爆","info":"炎爆","atktype":"攻击型","mon":"鹿"},{"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":9001,"word":"金刚","info":"全体招架","atktype":"攻击型","mon":"鹿"},{"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":9001,"atktype":"攻击型","mon":"鹿"},{"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":9001,"atktype":"攻击型","mon":"鹿"},{"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":9001,"word":"守护","info":"自身护盾","atktype":"血量型","mon":"绵羊"},{"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":9001,"word":"再生","info":"全体回血","atktype":"血量型","mon":"绵羊"},{"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":9001,"info":"全体护盾","atktype":"血量型","mon":"绵羊"},{"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":9001,"atktype":"血量型","mon":"绵羊"},{"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":9001,"word":"坚韧","info":"全体护盾","atktype":"血量型","mon":"龟"},{"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":9001,"word":"狂暴","info":"全体攻击","atktype":"血量型","mon":"龟"},{"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":9001,"atktype":"血量型","mon":"龟"},{"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":9001,"atktype":"血量型","mon":"龟"},{"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":9001,"word":"风刃","info":"风刃","atktype":"血量型","mon":"野猪"},{"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":9001,"word":"急速","info":"全体闪避","atktype":"血量型","mon":"野猪"},{"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":9001,"atktype":"血量型","mon":"野猪"},{"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":9001,"atktype":"血量型","mon":"野猪"},{"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":9001,"atktype":"血量型","mon":"野猪"},{"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":9001,"word":"坚韧","info":"全体护盾","atktype":"血量型","mon":"犀牛"},{"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":9001,"word":"雷暴","info":"雷暴","atktype":"血量型","mon":"犀牛"},{"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":9001,"atktype":"血量型","mon":"犀牛"},{"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":9001,"atktype":"血量型","mon":"犀牛"},{"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":9001,"word":"守护","info":"自身护盾","atktype":"攻速型","mon":"猫"},{"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":9001,"word":"急速","info":"全体闪避","atktype":"攻速型","mon":"猫"},{"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":9001,"word":"狂暴","info":"全体攻击","atktype":"攻速型","mon":"松鼠"},{"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":9001,"atktype":"攻速型","mon":"鼠"},{"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":9001,"word":"狂爆","info":"全体攻击","atktype":"攻速型","mon":"山猫"},{"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":9001,"word":"急速","info":"全体闪避","atktype":"攻速型","mon":"山猫"},{"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":9001,"atktype":"攻速型","mon":"山猫"},{"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":9001,"atktype":"攻速型","mon":"机械蜜蜂"},{"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":9001,"atktype":"攻速型","mon":"机械山猫"},{"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":9001,"word":"坚韧","info":"全体护盾","atktype":"攻速型","mon":"狮子"},{"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":9001,"word":"冰封","info":"冰封","atktype":"攻速型","mon":"狮子"},{"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":9001,"atktype":"攻速型","mon":"狮子"},{"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":9001,"atktype":"攻速型","mon":"狮子"},{"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":9001,"word":"急速","info":"全体闪避","atktype":"攻速型","mon":"独角兽"},{"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":9001,"word":"潮汐","info":"潮汐","atktype":"攻速型","mon":"独角兽"},{"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":9001,"atktype":"攻速型","mon":"独角兽"},{"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":9001,"atktype":"攻速型","mon":"独角兽"},{"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":9001,"atktype":"精英型","mon":"雷电犀牛"},{"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":9001,"atktype":"精英型","mon":"闪电鼠"},{"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":9001,"atktype":"精英型","mon":"龙"},{"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":9001,"atktype":"精英型","mon":"龙"}]} \ No newline at end of file +{ + "list": [ + { + "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": "狗" + }, + { + "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": "狗" + }, + { + "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": "狗" + }, + { + "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": "狗" + }, + { + "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": "蚂蚁" + }, + { + "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": "蚂蚁" + }, + { + "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": "鹦鹉" + }, + { + "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": "鹦鹉" + }, + { + "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": "鹰" + }, + { + "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": "鹰" + }, + { + "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": "鹰" + }, + { + "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": "山羊" + }, + { + "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": "山羊" + }, + { + "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": "山羊" + }, + { + "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": "山羊" + }, + { + "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": "鹿" + }, + { + "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": "鹿" + }, + { + "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": "鹿" + }, + { + "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": "鹿" + }, + { + "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": "绵羊" + }, + { + "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": "绵羊" + }, + { + "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": "绵羊" + }, + { + "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": "绵羊" + }, + { + "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": "龟" + }, + { + "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": "龟" + }, + { + "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": "龟" + }, + { + "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": "龟" + }, + { + "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": "野猪" + }, + { + "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": "野猪" + }, + { + "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": "野猪" + }, + { + "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": "野猪" + }, + { + "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": "野猪" + }, + { + "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": "犀牛" + }, + { + "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": "犀牛" + }, + { + "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": "犀牛" + }, + { + "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": "犀牛" + }, + { + "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": "猫" + }, + { + "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": "猫" + }, + { + "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": "松鼠" + }, + { + "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": "鼠" + }, + { + "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": "山猫" + }, + { + "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": "山猫" + }, + { + "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": "山猫" + }, + { + "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": "机械蜜蜂" + }, + { + "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": "机械山猫" + }, + { + "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": "狮子" + }, + { + "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": "狮子" + }, + { + "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": "狮子" + }, + { + "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": "狮子" + }, + { + "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": "独角兽" + }, + { + "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": "独角兽" + }, + { + "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": "独角兽" + }, + { + "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": "独角兽" + }, + { + "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": "雷电犀牛" + }, + { + "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": "闪电鼠" + }, + { + "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": "龙" + }, + { + "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": "龙" + } + ] +} \ No newline at end of file diff --git a/assets/resources/game/heros/hero.prefab b/assets/resources/game/heros/hero.prefab index b9d71a81..6b620d91 100644 --- a/assets/resources/game/heros/hero.prefab +++ b/assets/resources/game/heros/hero.prefab @@ -528,13 +528,13 @@ }, "_contentSize": { "__type__": "cc.Size", - "width": 15.520000457763672, - "height": 9.600000381469727 + "width": 83.13999938964844, + "height": 51.709999084472656 }, "_anchorPoint": { "__type__": "cc.Vec2", - "x": 0.5, - "y": 0 + "x": 0.00986288187235107, + "y": 0.3422935810543142 }, "_id": "" }, @@ -569,7 +569,7 @@ "__expectedType__": "sp.SkeletonData" }, "defaultSkin": "default", - "defaultAnimation": "move", + "defaultAnimation": "", "_premultipliedAlpha": false, "_timeScale": 1, "_preCacheMode": 1, diff --git a/assets/resources/game/heros/hero/skeleton.json b/assets/resources/game/heros/hero/skeleton.json index 194bbbd4..76a4fb17 100644 --- a/assets/resources/game/heros/hero/skeleton.json +++ b/assets/resources/game/heros/hero/skeleton.json @@ -1,6 +1,6 @@ { "skeleton": { - "hash": "sMfmFw/FfW4", + "hash": "jMvRjm/pTv0", "spine": "4.2.35", "x": -0.82, "y": 24.4, @@ -64,14 +64,24 @@ } }, "magic": { + "bones": { + "bone": { + "rotate": [ + {}, + { "time": 0.5, "value": 25.28 }, + { "time": 0.6667 } + ] + } + } + }, + "max": { "bones": { "bone": { "scale": [ - { "x": 0.986, "y": 0.986 }, - { "time": 0.2, "x": 1.153, "y": 0.896 }, - { "time": 0.4, "x": 0.789, "y": 1.085, "curve": "stepped" }, - { "time": 0.5333, "x": 0.789, "y": 1.085 }, - { "time": 0.6667, "x": 0.986, "y": 0.986 } + {}, + { "time": 0.5, "x": 0.789, "y": 0.789 }, + { "time": 0.6667, "x": 1.233, "y": 1.233 }, + { "time": 0.8333, "x": 0.986, "y": 0.986 } ] } } @@ -81,7 +91,8 @@ "bone": { "scale": [ {}, - { "time": 0.5, "x": 0.937, "y": 0.937 }, + { "time": 0.3333, "x": 1.085, "y": 0.993 }, + { "time": 0.6667, "x": 0.888, "y": 0.986 }, { "time": 1 } ] } diff --git a/assets/resources/game/heros/role.prefab b/assets/resources/game/heros/role.prefab index bb697a0e..e633dbce 100644 --- a/assets/resources/game/heros/role.prefab +++ b/assets/resources/game/heros/role.prefab @@ -34,35 +34,32 @@ "__id__": 44 }, { - "__id__": 52 - }, - { - "__id__": 64 + "__id__": 56 } ], "_active": true, "_components": [ + { + "__id__": 60 + }, + { + "__id__": 62 + }, + { + "__id__": 64 + }, + { + "__id__": 66 + }, { "__id__": 68 }, { "__id__": 70 - }, - { - "__id__": 72 - }, - { - "__id__": 74 - }, - { - "__id__": 76 - }, - { - "__id__": 78 } ], "_prefab": { - "__id__": 80 + "__id__": 72 }, "_lpos": { "__type__": "cc.Vec3", @@ -994,186 +991,6 @@ "targetOverrides": null, "nestedPrefabInstanceRoots": null }, - { - "__type__": "cc.Node", - "_name": "lab_name", - "_objFlags": 0, - "__editorExtras__": {}, - "_parent": { - "__id__": 1 - }, - "_children": [], - "_active": false, - "_components": [ - { - "__id__": 45 - }, - { - "__id__": 47 - }, - { - "__id__": 49 - } - ], - "_prefab": { - "__id__": 51 - }, - "_lpos": { - "__type__": "cc.Vec3", - "x": 0, - "y": 84.999, - "z": 0 - }, - "_lrot": { - "__type__": "cc.Quat", - "x": 0, - "y": 0, - "z": 0, - "w": 1 - }, - "_lscale": { - "__type__": "cc.Vec3", - "x": 1, - "y": 1, - "z": 1 - }, - "_mobility": 0, - "_layer": 1, - "_euler": { - "__type__": "cc.Vec3", - "x": 0, - "y": 0, - "z": 0 - }, - "_id": "" - }, - { - "__type__": "cc.UITransform", - "_name": "", - "_objFlags": 0, - "__editorExtras__": {}, - "node": { - "__id__": 44 - }, - "_enabled": true, - "__prefab": { - "__id__": 46 - }, - "_contentSize": { - "__type__": "cc.Size", - "width": 70.84750248055802, - "height": 27.2 - }, - "_anchorPoint": { - "__type__": "cc.Vec2", - "x": 0.5, - "y": 0.5 - }, - "_id": "" - }, - { - "__type__": "cc.CompPrefabInfo", - "fileId": "c68UOAlNhN171Umca6yVvF" - }, - { - "__type__": "cc.Label", - "_name": "", - "_objFlags": 0, - "__editorExtras__": {}, - "node": { - "__id__": 44 - }, - "_enabled": true, - "__prefab": { - "__id__": 48 - }, - "_customMaterial": null, - "_srcBlendFactor": 2, - "_dstBlendFactor": 4, - "_color": { - "__type__": "cc.Color", - "r": 255, - "g": 255, - "b": 255, - "a": 255 - }, - "_string": "monster", - "_horizontalAlign": 1, - "_verticalAlign": 1, - "_actualFontSize": 18, - "_fontSize": 18, - "_fontFamily": "Arial", - "_lineHeight": 20, - "_overflow": 0, - "_enableWrapText": true, - "_font": null, - "_isSystemFontUsed": true, - "_spacingX": 0, - "_isItalic": true, - "_isBold": false, - "_isUnderline": false, - "_underlineHeight": 2, - "_cacheMode": 0, - "_enableOutline": false, - "_outlineColor": { - "__type__": "cc.Color", - "r": 24, - "g": 25, - "b": 27, - "a": 255 - }, - "_outlineWidth": 1, - "_enableShadow": false, - "_shadowColor": { - "__type__": "cc.Color", - "r": 0, - "g": 0, - "b": 0, - "a": 255 - }, - "_shadowOffset": { - "__type__": "cc.Vec2", - "x": 2, - "y": 2 - }, - "_shadowBlur": 2, - "_id": "" - }, - { - "__type__": "cc.CompPrefabInfo", - "fileId": "2frm37uaJHQr0AEEaYyM82" - }, - { - "__type__": "cc.LabelOutline", - "_name": "", - "_objFlags": 0, - "__editorExtras__": {}, - "node": { - "__id__": 44 - }, - "_enabled": true, - "__prefab": { - "__id__": 50 - }, - "_id": "" - }, - { - "__type__": "cc.CompPrefabInfo", - "fileId": "aeeDsd9JVLMK0M/n2WTVl7" - }, - { - "__type__": "cc.PrefabInfo", - "root": { - "__id__": 1 - }, - "asset": { - "__id__": 0 - }, - "fileId": "31uZ7ewvdKoKWqTJ+narWR", - "instance": null, - "targetOverrides": null, - "nestedPrefabInstanceRoots": null - }, { "__type__": "cc.Node", "_name": "level", @@ -1184,20 +1001,20 @@ }, "_children": [ { - "__id__": 53 + "__id__": 45 } ], "_active": false, "_components": [ { - "__id__": 59 + "__id__": 51 }, { - "__id__": 61 + "__id__": 53 } ], "_prefab": { - "__id__": 63 + "__id__": 55 }, "_lpos": { "__type__": "cc.Vec3", @@ -1234,20 +1051,20 @@ "_objFlags": 0, "__editorExtras__": {}, "_parent": { - "__id__": 52 + "__id__": 44 }, "_children": [], "_active": true, "_components": [ { - "__id__": 54 + "__id__": 46 }, { - "__id__": 56 + "__id__": 48 } ], "_prefab": { - "__id__": 58 + "__id__": 50 }, "_lpos": { "__type__": "cc.Vec3", @@ -1284,11 +1101,11 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 53 + "__id__": 45 }, "_enabled": true, "__prefab": { - "__id__": 55 + "__id__": 47 }, "_contentSize": { "__type__": "cc.Size", @@ -1312,11 +1129,11 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 53 + "__id__": 45 }, "_enabled": true, "__prefab": { - "__id__": 57 + "__id__": 49 }, "_customMaterial": null, "_srcBlendFactor": 2, @@ -1393,11 +1210,11 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 52 + "__id__": 44 }, "_enabled": true, "__prefab": { - "__id__": 60 + "__id__": 52 }, "_contentSize": { "__type__": "cc.Size", @@ -1421,11 +1238,11 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 52 + "__id__": 44 }, "_enabled": true, "__prefab": { - "__id__": 62 + "__id__": 54 }, "_customMaterial": null, "_srcBlendFactor": 2, @@ -1485,11 +1302,11 @@ "_active": true, "_components": [ { - "__id__": 65 + "__id__": 57 } ], "_prefab": { - "__id__": 67 + "__id__": 59 }, "_lpos": { "__type__": "cc.Vec3", @@ -1526,11 +1343,11 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 64 + "__id__": 56 }, "_enabled": true, "__prefab": { - "__id__": 66 + "__id__": 58 }, "_contentSize": { "__type__": "cc.Size", @@ -1571,7 +1388,7 @@ }, "_enabled": true, "__prefab": { - "__id__": 69 + "__id__": 61 }, "_contentSize": { "__type__": "cc.Size", @@ -1599,7 +1416,7 @@ }, "_enabled": true, "__prefab": { - "__id__": 71 + "__id__": 63 }, "_customMaterial": null, "_srcBlendFactor": 2, @@ -1641,7 +1458,7 @@ }, "_enabled": true, "__prefab": { - "__id__": 73 + "__id__": 65 }, "enabledContactListener": true, "bullet": true, @@ -1675,7 +1492,7 @@ }, "_enabled": true, "__prefab": { - "__id__": 75 + "__id__": 67 }, "tag": 0, "_group": 4, @@ -1709,7 +1526,7 @@ }, "_enabled": true, "__prefab": { - "__id__": 77 + "__id__": 69 }, "hitFlashMaterial": { "__uuid__": "a8f34051-ccff-4050-b9d9-234f62977264", @@ -1731,7 +1548,7 @@ }, "_enabled": true, "__prefab": { - "__id__": 79 + "__id__": 71 }, "animator": { "__id__": 13 diff --git a/assets/resources/game/skills/fire.prefab b/assets/resources/game/skills/fire.prefab index a97c6a04..5664e854 100644 --- a/assets/resources/game/skills/fire.prefab +++ b/assets/resources/game/skills/fire.prefab @@ -105,8 +105,8 @@ }, "_lscale": { "__type__": "cc.Vec3", - "x": -1, - "y": 1, + "x": -0.6, + "y": 0.6, "z": 1 }, "_mobility": 0, @@ -219,8 +219,8 @@ }, "_contentSize": { "__type__": "cc.Size", - "width": 286, - "height": 90 + "width": 120, + "height": 80 }, "_anchorPoint": { "__type__": "cc.Vec2", diff --git a/assets/resources/game/skills/tooltip.prefab b/assets/resources/game/skills/tooltip.prefab index 4149f0b0..51562562 100644 --- a/assets/resources/game/skills/tooltip.prefab +++ b/assets/resources/game/skills/tooltip.prefab @@ -31,11 +31,14 @@ "_active": true, "_components": [ { - "__id__": 44 + "__id__": 50 + }, + { + "__id__": 52 } ], "_prefab": { - "__id__": 46 + "__id__": 54 }, "_lpos": { "__type__": "cc.Vec3", @@ -903,16 +906,19 @@ "_children": [ { "__id__": 35 - } - ], - "_active": false, - "_components": [ + }, { "__id__": 41 } ], + "_active": true, + "_components": [ + { + "__id__": 47 + } + ], "_prefab": { - "__id__": 43 + "__id__": 49 }, "_lpos": { "__type__": "cc.Vec3", @@ -1079,6 +1085,165 @@ "targetOverrides": null, "nestedPrefabInstanceRoots": null }, + { + "__type__": "cc.Node", + "_name": "name", + "_objFlags": 0, + "__editorExtras__": {}, + "_parent": { + "__id__": 34 + }, + "_children": [], + "_active": true, + "_components": [ + { + "__id__": 42 + }, + { + "__id__": 44 + } + ], + "_prefab": { + "__id__": 46 + }, + "_lpos": { + "__type__": "cc.Vec3", + "x": 0, + "y": -37.462, + "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__": 41 + }, + "_enabled": true, + "__prefab": { + "__id__": 43 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 70.68701171875, + "height": 24.16 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_id": "" + }, + { + "__type__": "cc.CompPrefabInfo", + "fileId": "6a3nixJ2FDmLkwcHiNiBIJ" + }, + { + "__type__": "cc.Label", + "_name": "", + "_objFlags": 0, + "__editorExtras__": {}, + "node": { + "__id__": 41 + }, + "_enabled": true, + "__prefab": { + "__id__": 45 + }, + "_customMaterial": null, + "_srcBlendFactor": 2, + "_dstBlendFactor": 4, + "_color": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_string": "skill name", + "_horizontalAlign": 1, + "_verticalAlign": 1, + "_actualFontSize": 15, + "_fontSize": 15, + "_fontFamily": "Arial", + "_lineHeight": 16, + "_overflow": 0, + "_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": 2, + "_enableShadow": false, + "_shadowColor": { + "__type__": "cc.Color", + "r": 0, + "g": 0, + "b": 0, + "a": 255 + }, + "_shadowOffset": { + "__type__": "cc.Vec2", + "x": 2, + "y": 2 + }, + "_shadowBlur": 2, + "_id": "" + }, + { + "__type__": "cc.CompPrefabInfo", + "fileId": "4eAxZ8G69HlaWyQeyhIMZ9" + }, + { + "__type__": "cc.PrefabInfo", + "root": { + "__id__": 1 + }, + "asset": { + "__id__": 0 + }, + "fileId": "8cqDZ2t3hCnq/3xIhHn7bG", + "instance": null, + "targetOverrides": null, + "nestedPrefabInstanceRoots": null + }, { "__type__": "cc.UITransform", "_name": "", @@ -1089,7 +1254,7 @@ }, "_enabled": true, "__prefab": { - "__id__": 42 + "__id__": 48 }, "_contentSize": { "__type__": "cc.Size", @@ -1130,7 +1295,7 @@ }, "_enabled": true, "__prefab": { - "__id__": 45 + "__id__": 51 }, "_contentSize": { "__type__": "cc.Size", @@ -1148,6 +1313,24 @@ "__type__": "cc.CompPrefabInfo", "fileId": "2fHdG8eeBH07DW0tmYrhH9" }, + { + "__type__": "49ffddtcGlJR7FwYs1yYZ7e", + "_name": "", + "_objFlags": 0, + "__editorExtras__": {}, + "node": { + "__id__": 1 + }, + "_enabled": true, + "__prefab": { + "__id__": 53 + }, + "_id": "" + }, + { + "__type__": "cc.CompPrefabInfo", + "fileId": "99T6VfhxpBi77UjUnNlL0n" + }, { "__type__": "cc.PrefabInfo", "root": { diff --git a/assets/script/Main.ts b/assets/script/Main.ts index 1e73b609..02f29484 100644 --- a/assets/script/Main.ts +++ b/assets/script/Main.ts @@ -4,7 +4,7 @@ * @LastEditors: dgflash * @LastEditTime: 2022-08-17 13:43:02 */ -import { profiler, _decorator ,PhysicsSystem2D,RigidBody} from 'cc'; +import { profiler, _decorator ,PhysicsSystem2D,EPhysics2DDrawFlags} from 'cc'; import { DEBUG } from 'cc/env'; import { oops } from '../../extensions/oops-plugin-framework/assets/core/Oops'; import { Root } from '../../extensions/oops-plugin-framework/assets/core/Root'; @@ -19,9 +19,12 @@ const { ccclass, property } = _decorator; export class Main extends Root { start() { if (DEBUG) profiler.showStats(); - + PhysicsSystem2D.instance.debugDrawFlags = EPhysics2DDrawFlags.Aabb + // | EPhysics2DDrawFlags.Pair + // |EPhysics2DDrawFlags.CenterOfMass + // |EPhysics2DDrawFlags.Joint + // |EPhysics2DDrawFlags.Shape; } - protected async run() { console.log("Game start"); smc.initialize = ecs.getEntity(Initialize); diff --git a/assets/script/game/common/config/SkillSet.ts b/assets/script/game/common/config/SkillSet.ts index cf140d94..3939e6b7 100644 --- a/assets/script/game/common/config/SkillSet.ts +++ b/assets/script/game/common/config/SkillSet.ts @@ -18,7 +18,7 @@ path: 图片地址 */ export const SkillSet={ - 1001:{uuid: 1001,path: "1001",type: 1,level: 1,name: "火球术-初级",sp_name:"fire",dis:1720,count:1,atk:10,sd:10,cd:1,bsd:10,bcd:1,sk_uuid:1001,sk_count:0,speed:350,}, + 1001:{uuid: 1001,path: "1001",type: 1,level: 1,name: "火球术-初级",sp_name:"fire",dis:720,count:1,atk:10,sd:10,cd:1,bsd:10,bcd:1,sk_uuid:1001,sk_count:0,speed:350,}, 1002:{uuid: 1002,path: "1002",type: 1,level: 1,name: "寒冰箭-初级",sp_name:"ice",dis:720,count:1,atk:10,sd:10,cd:1,bsd:10,bcd:1,sk_uuid:1001,sk_count:0,speed:350,}, 1003:{uuid: 1003,path: "1003",type: 9,level: 1,name: "狂暴-初级",sp_name:"fire",dis:720,count:1,atk:10,sd:10,cd:1,bsd:10,bcd:1,sk_uuid:1001,sk_count:0,speed:350,}, 1004:{uuid: 1004,path: "1004",type: 9,level: 1,name: "守护-初级",sp_name:"fire",dis:720,count:1,atk:10,sd:10,cd:1,bsd:10,bcd:1,sk_uuid:1001,sk_count:0,speed:350,}, @@ -66,8 +66,8 @@ export const SkillSet={ 4010:{uuid: 4010,path: "1010",type: 9,level: 4,name: "治愈-终极",sp_name:"fire",dis:720,count:1,atk:10,sd:10,cd:1,bsd:10,bcd:1,sk_uuid:1001,sk_count:0,speed:350,}, 4011:{uuid: 4011,path: "1011",type: 1,level: 6,name: "火焰风暴-终极",sp_name:"fire",dis:720,count:5,atk:10,sd:10,cd:1,bsd:10,bcd:1,sk_uuid:1001,sk_count:0,speed:350,}, 4012:{uuid: 4012,path: "1012",type: 1,level: 6,name: "冰晶风暴-终极",sp_name:"ice",dis:720,count:5,atk:10,sd:10,cd:1,bsd:10,bcd:1,sk_uuid:1001,sk_count:0,speed:350,}, - 9001:{uuid: 9001,path: "9001",type: 1,level: 1,name: "基础攻击1",sp_name:"base",dis:70,count:1,atk:0,sd:10,cd:3,bsd:10,bcd:1,sk_uuid:1001,sk_count:0,speed:450,}, - 9002:{uuid: 9002,path: "9002",type: 1,level: 1,name: "基础攻击2",sp_name:"base2",dis:70,count:1,atk:0,sd:10,cd:3,bsd:10,bcd:1,sk_uuid:1001,sk_count:0,speed:450,}, - 9003:{uuid: 9003,path: "9003",type: 2,level: 1,name: "基础攻击3",sp_name:"base3",dis:720,count:1,atk:0,sd:10,cd:3,bsd:10,bcd:1,sk_uuid:1001,sk_count:0,speed:450,}, + 9001:{uuid: 9001,path: "1001",type: 1,level: 1,name: "基础攻击1",sp_name:"base",dis:70,count:1,atk:0,sd:10,cd:3,bsd:10,bcd:1,sk_uuid:1001,sk_count:0,speed:450,}, + 9002:{uuid: 9002,path: "1001",type: 1,level: 1,name: "基础攻击2",sp_name:"base2",dis:70,count:1,atk:0,sd:10,cd:3,bsd:10,bcd:1,sk_uuid:1001,sk_count:0,speed:450,}, + 9003:{uuid: 9003,path: "1001",type: 2,level: 1,name: "基础攻击3",sp_name:"base3",dis:720,count:1,atk:0,sd:10,cd:3,bsd:10,bcd:1,sk_uuid:1001,sk_count:0,speed:450,}, } diff --git a/assets/script/game/map/MapMonsterComp.ts b/assets/script/game/map/MapMonsterComp.ts index 8d9f63ec..96a4732b 100644 --- a/assets/script/game/map/MapMonsterComp.ts +++ b/assets/script/game/map/MapMonsterComp.ts @@ -29,7 +29,7 @@ export class MapMonsterComp extends CCComp { cur_mission:number = 1; //当前关卡方案 mission_list:any = [] setp_timer: Timer = new Timer(0.5); - setp_num:number = 1; + setp_num:number = 3; onLoad(){ // 监听全局事件 oops.message.on("other_add_monster", this.on_other_add_monster, this); diff --git a/assets/script/game/map/view/MapViewComp.ts b/assets/script/game/map/view/MapViewComp.ts index 70d1d81e..4b9da0e6 100644 --- a/assets/script/game/map/view/MapViewComp.ts +++ b/assets/script/game/map/view/MapViewComp.ts @@ -24,7 +24,6 @@ export class MapViewComp extends CCComp { async onLoad(){ // 监听全局事件 oops.message.on("do_add_hero", this.on_do_add_hero, this); - } /**监听do_add_hero 添加hero,通过uuid */ diff --git a/assets/script/game/monster/CSkill.ts b/assets/script/game/monster/CSkill.ts index 4f511de9..236313a1 100644 --- a/assets/script/game/monster/CSkill.ts +++ b/assets/script/game/monster/CSkill.ts @@ -66,6 +66,8 @@ export class CSkill extends ecs.Entity { skill_init(uuid:number=1001,node:Node,pos:Vec3=v3(0,0,0)){ var mv = node.getComponent(CSkillComp) mv.scale = 1; + mv.skill_uuid = uuid; + mv.atk=SkillSet[uuid].atk; this.add(mv); } diff --git a/assets/script/game/monster/Hero.ts b/assets/script/game/monster/Hero.ts index 4a92e514..b345228b 100644 --- a/assets/script/game/monster/Hero.ts +++ b/assets/script/game/monster/Hero.ts @@ -97,10 +97,10 @@ export class Hero extends ecs.Entity { mv.max_skill_uuid = smc.heros[uuid].max_skill_uuid; mv.Tpos = v3(0,0,0); mv.scale = 1; - mv.change_name(smc.heros[uuid].name,1) + // mv.change_name(smc.heros[uuid].name,1) this.add(mv); } - + } \ No newline at end of file diff --git a/assets/script/game/monster/Monster.ts b/assets/script/game/monster/Monster.ts index c007dbd8..7aab502e 100644 --- a/assets/script/game/monster/Monster.ts +++ b/assets/script/game/monster/Monster.ts @@ -94,7 +94,6 @@ export class Monster extends ecs.Entity { mv.max_skill_uuid = smc.heros[uuid].max_skill_uuid; mv.scale = -1; mv.Tpos = v3(0,0,0); - mv.change_name(smc.heros[uuid].name,-1) this.add(mv); } diff --git a/assets/script/game/monster/MonsterSpine.ts b/assets/script/game/monster/MonsterSpine.ts index 7bdcf6ac..78791136 100644 --- a/assets/script/game/monster/MonsterSpine.ts +++ b/assets/script/game/monster/MonsterSpine.ts @@ -51,6 +51,9 @@ export class MonsterSpine extends Component { atk() { this.spine.setAnimation(0, "atk2", false); } + maxSkill () { + this.spine.setAnimation(0, "max", false); + } setAlpha(value: number): void { var color: Color = this.spine.color; color.a = 255 * (value / 1); diff --git a/assets/script/game/monster/MonsterSpineAnimator.ts b/assets/script/game/monster/MonsterSpineAnimator.ts index 7a872ba3..f82671f0 100644 --- a/assets/script/game/monster/MonsterSpineAnimator.ts +++ b/assets/script/game/monster/MonsterSpineAnimator.ts @@ -32,7 +32,7 @@ export default class MonsterSpineAnimator extends Component { this.spine.setEndListener(trackEntry => { var animationName = trackEntry.animation ? trackEntry.animation.name : ""; // console.log("[track %s][animation %s] end.", trackEntry.trackIndex, animationName); - if (animationName == "atk") { + if (animationName == "atk" ||animationName == "magic"||animationName=="max") { this.spine.setAnimation(0, "move", true); } }); diff --git a/assets/script/game/monster/MonsterViewComp.ts b/assets/script/game/monster/MonsterViewComp.ts index 97b81d92..693d9226 100644 --- a/assets/script/game/monster/MonsterViewComp.ts +++ b/assets/script/game/monster/MonsterViewComp.ts @@ -5,7 +5,7 @@ * @LastEditTime: 2022-08-17 12:36:18 */ -import { Vec3, _decorator , v3,Collider2D,Contact2DType,IPhysics2DContact,PhysicsSystem2D,EPhysics2DDrawFlags,Label,Node,Prefab,instantiate,ProgressBar, Component, Material, Sprite} from "cc"; +import { Vec3, _decorator , v3,Collider2D,Contact2DType,Label,Node,Prefab,instantiate,ProgressBar, Component, Material, Sprite} 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 { MonsterSpine } from "./MonsterSpine"; @@ -20,6 +20,7 @@ import { Timer } from "../../../../extensions/oops-plugin-framework/assets/core/ import { SkillCom } from "../skills/SkillCom"; import { SkillSet } from "../common/config/SkillSet"; import { BoxRangComp } from "./BoxRangComp"; +import { Tooltip } from "../skills/Tooltip"; const { ccclass, property } = _decorator; /** 角色显示组件 */ @@ -47,7 +48,7 @@ export class MonsterViewComp extends CCComp { hp_speed: number = 0; //每秒回复量 power: number = 0; /**能量**/ - power_max: number = 600*3; /** 能量最大值 */ + power_max: number = 60; /** 能量最大值 */ power_speed: number = 1; //能量回复速度每0.1秒回复量 skill_name: string = "base"; //技能名称 @@ -76,11 +77,7 @@ export class MonsterViewComp extends CCComp { onLoad() { this.as = this.getComponent(MonsterSpine); - PhysicsSystem2D.instance.debugDrawFlags = EPhysics2DDrawFlags.Aabb - // | EPhysics2DDrawFlags.Pair - // |EPhysics2DDrawFlags.CenterOfMass - // |EPhysics2DDrawFlags.Joint - // |EPhysics2DDrawFlags.Shape; + } /** 视图层逻辑代码分离演示 */ start () { this.sprite = this.node.getChildByName("avatar").getChildByName("TNode").getChildByName("bb").getComponent(Sprite); @@ -105,7 +102,7 @@ export class MonsterViewComp extends CCComp { } - onBeginContact (selfCollider: Collider2D, otherCollider: Collider2D, contact: IPhysics2DContact | null) { + onBeginContact (selfCollider: Collider2D, otherCollider: Collider2D) { if(otherCollider.tag==BoxSet.SKILL_TAG &&selfCollider.tag!=BoxSet.SKILL_TAG){ if(selfCollider.group != otherCollider.group){ let skill = otherCollider.node.getComponent(SkillCom)!; @@ -118,20 +115,15 @@ export class MonsterViewComp extends CCComp { } } } - onEndContact (selfCollider: Collider2D, otherCollider: Collider2D, contact: IPhysics2DContact | null) { - - - } - onPreSolve (selfCollider: Collider2D, otherCollider: Collider2D, contact: IPhysics2DContact | null) { + onEndContact (selfCollider: Collider2D, otherCollider: Collider2D) { } + onPreSolve (selfCollider: Collider2D, otherCollider: Collider2D) { if(selfCollider.group != otherCollider.group&&otherCollider.tag == 0){ this.is_atking = true; this.stop_cd = 0.1; } } - onPostSolve (selfCollider: Collider2D, otherCollider: Collider2D, contact: IPhysics2DContact | null) { - - + onPostSolve (selfCollider: Collider2D, otherCollider: Collider2D) { if(selfCollider.group == otherCollider.group&&otherCollider.tag == 0&&selfCollider.tag == 0){ let self_pos=selfCollider.node.getPosition(); let other_pos=otherCollider.node.getPosition(); @@ -148,24 +140,9 @@ export class MonsterViewComp extends CCComp { } } } - - } - - change_name(hero_name:string='hero',scale:number=1){ - this.name=hero_name; - // let label:any =this.node.getChildByName("lab_name") - // label.getComponent(Label)!.string = hero_name; - let collider = this.getComponent(Collider2D); - if(scale==1){ - collider.group=BoxSet.HERO; - }else{ - collider.group=BoxSet.MONSTER; - } - } - update(dt: number){ if (this.timer.update(dt)) { this.power_change(this.power_speed) @@ -174,7 +151,6 @@ export class MonsterViewComp extends CCComp { this.in_stop(dt); this.in_act(dt); this.move(dt); - } @@ -182,23 +158,18 @@ export class MonsterViewComp extends CCComp { if(this.stop_cd > 0){ return } - /** - * 根据角色的阵营检查角色的 x 轴位置是否满足特定条件。 - * 如果角色属于正向阵营 (scale == 1) 且 x 轴位置大于等于 0,则直接返回。 - * 如果角色属于反向阵营 (scale != 1) 且 x 轴位置小于等于 0,则直接返回。 - */ if (this.scale === 1 && this.node.position.x >= 120) { return; } this.node.setPosition(this.node.position.x+dt*this.speed*this.scale, this.node.position.y, this.node.position.z); } - get_monster_pos(){ - return this.node.getPosition() - } power_change(power: number){ this.power += power; if(this.power >= this.power_max){ - this.shoot(this.max_skill_uuid); + this.as.maxSkill() + this.scheduleOnce(()=>{ + this.do_max_skill(); + },0.5) this.power = 0 } let power_progress= this.power/this.power_max; @@ -208,12 +179,25 @@ export class MonsterViewComp extends CCComp { // console.log("monster shoot"); let skill = ecs.getEntity(Skill); let x=32 - let pos = v3(35,40) + let pos = v3(35*this.scale,40) let scale = this.scale let speed =SkillSet[skill_uuid].speed; let dis = SkillSet[skill_uuid].dis; let atk = SkillSet[skill_uuid].atk+this.atk; skill.load(pos,speed,dis,scale,this.node,skill_uuid,atk); + // this.tooltip(3,SkillSet[skill_uuid].name,this.skill_uuid); + } + //使用max_skill + do_max_skill(){ + let skill = ecs.getEntity(Skill); + let x=32 + let pos = v3(35*this.scale,40) + let scale = this.scale + let speed =SkillSet[this.max_skill_uuid].speed; + let dis = SkillSet[this.max_skill_uuid].dis; + let atk = SkillSet[this.max_skill_uuid].atk+this.atk; + skill.load(pos,speed,dis,scale,this.node,this.max_skill_uuid,atk); + this.tooltip(3,SkillSet[this.max_skill_uuid].name,this.max_skill_uuid); } in_act(dt: number) { @@ -235,6 +219,7 @@ export class MonsterViewComp extends CCComp { return; } this.hp -= hp; + this.tooltip(1,hp.toString()); if(this.hp > this.hp_max){ this.hp = this.hp_max; } @@ -246,9 +231,19 @@ export class MonsterViewComp extends CCComp { setTimeout(() => { this.ent.destroy(); }, 15); - } } + tooltip(type:number=1,value:string="",s_uuid:number=1001){ + // console.log("tooltip",type); + let tip =ecs.getEntity(Tooltip); + let pos = this.node.getPosition(); + let node =this.node.parent + pos.y=pos.y+60; + tip.load(pos,type,value,s_uuid,node); + } + get_monster_pos(){ + return this.node.getPosition() + } /** 静止时间 */ in_stop (dt: number) { if(this.stop_cd > 0){ diff --git a/assets/script/game/skills/Skill.ts b/assets/script/game/skills/Skill.ts index b36d696c..dd65e14c 100644 --- a/assets/script/game/skills/Skill.ts +++ b/assets/script/game/skills/Skill.ts @@ -36,7 +36,7 @@ export class Skill extends ecs.Entity { // console.log("load skill parent.position :",parent.position) pos=v3(parent.position.x+pos.x,parent.position.y+pos.y) node.parent = parent.parent; - // node.setScale(scale,1) + node.setScale(scale,1) //转换pos为世界坐标 node.setPosition(pos) var sv = node.getComponent(SkillCom)!; diff --git a/assets/script/game/skills/SkillCom.ts b/assets/script/game/skills/SkillCom.ts index 3b30a005..6a2ed762 100644 --- a/assets/script/game/skills/SkillCom.ts +++ b/assets/script/game/skills/SkillCom.ts @@ -45,9 +45,9 @@ export class SkillCom extends CCComp { } if(this.t_pos){ //通过欧拉角 延长 目标点 增量 - this.t_pos.x=Math.cos(this.angle * Math.PI / 180) * this.dis; - this.t_pos.y=Math.sin(this.angle * Math.PI / 180) * this.dis; - tween(this.node).to( 1,{ angle:this.angle,position: this.t_pos}, + // this.t_pos.x=Math.cos(this.angle * Math.PI / 180) * this.dis; + // this.t_pos.y=Math.sin(this.angle * Math.PI / 180) * this.dis; + tween(this.node).to( 0.5,{ angle:this.angle,position: this.t_pos}, { onUpdate: (target: Vec3, ratio: number) => { // onUpdate 接受当前缓动的进度 // 将缓动系统计算出的结果赋予 node 的位置 diff --git a/assets/script/game/skills/Tooltip.ts b/assets/script/game/skills/Tooltip.ts index 45d74b62..6aebeca7 100644 --- a/assets/script/game/skills/Tooltip.ts +++ b/assets/script/game/skills/Tooltip.ts @@ -29,12 +29,19 @@ export class Tooltip extends ecs.Entity { this.remove(TooltipCom); super.destroy(); } - load(pos: Vec3 = Vec3.ZERO,type:number=1,vaule:string="",icon:string="") { + load(pos: Vec3 = Vec3.ZERO,type:number=1,vaule:string="",s_uuid:number=1001,parent:any=null,cd:number=0.3) { + var path = "game/skills/tooltip"; var prefab: Prefab = oops.res.get(path, Prefab)!; var node = instantiate(prefab); + node.parent = parent; node.setPosition(pos) var sv = node.getComponent(TooltipCom)!; + // console.log("load tooltip type",type,vaule,s_uuid); + sv.stype = type; + sv.value = vaule; + sv.s_uuid = s_uuid; + sv.alive_time = cd; this.add(sv) } } diff --git a/assets/script/game/skills/TooltipCom.ts b/assets/script/game/skills/TooltipCom.ts index 1a69c7b9..96991895 100644 --- a/assets/script/game/skills/TooltipCom.ts +++ b/assets/script/game/skills/TooltipCom.ts @@ -4,6 +4,7 @@ import { CCComp } from "../../../../extensions/oops-plugin-framework/assets/modu import { BoxSet } from "../common/config/BoxSet"; import { smc } from "../common/SingletonModuleComp"; import { Timer } from "../../../../extensions/oops-plugin-framework/assets/core/common/timer/Timer"; +import { SkillSet } from "../common/config/SkillSet"; const { ccclass, property } = _decorator; @@ -16,26 +17,35 @@ export class TooltipCom extends CCComp { // // var entity = this.ent as ecs.Entity; // ecs.Entity 可转为当前模块的具体实体对象 // // this.on(ModuleEvent.Cmd, this.onHandler, this); // } - type:number = 1; + stype:number = 1; // 1:减少生命值,2:增加生命值,3:技能图标 value:string = ""; - icon:string = ""; - alive_time:number = 0.3; + s_uuid:number = 1001; + alive_time:number = 1; + skill_name_time=1; start() { - switch(this.type){ - case 1: - this.node.getChildByName("loss_life").getChildByName("hp").getComponent(Label).string = this.value; - this.node.getChildByName("loss_life").active=true; - case 2: - this.node.getChildByName("add_life").getChildByName("hp").getComponent(Label).string = this.value; - this.node.getChildByName("add_life").active=true; - break - case 3: - resources.load("game/heros/skill/"+this.icon, SpriteFrame, (err, spriteFrame) => { - this.node.getChildByName("skill").getChildByName("icon").getComponent(Sprite).spriteFrame = spriteFrame; - }); - this.node.getChildByName("skill").active=true; - break - } + this.node.getChildByName("loss_life").active=false; + this.node.getChildByName("add_life").active=false + this.node.getChildByName("skill").active=false; + // console.log("TooltipView start",this.node); + switch(this.stype){ + case 1: + this.node.getChildByName("loss_life").getChildByName("hp").getComponent(Label).string = this.value; + this.node.getChildByName("loss_life").active=true; + break + case 2: + this.node.getChildByName("add_life").getChildByName("hp").getComponent(Label).string = this.value; + this.node.getChildByName("add_life").active=true; + break + case 3: + // resources.load("game/heros/skill/"+SkillSet[this.s_uuid].path, SpriteFrame, (err, spriteFrame) => { + // this.node.getChildByName("skill").getChildByName("icon").getComponent(Sprite).spriteFrame = spriteFrame; + // }); + this.node.getChildByName("skill").getChildByName("name").getComponent(Label).string = SkillSet[this.s_uuid].name; + this.node.getChildByName("skill").active=true; + // this.alive_time = 2 + this.node.setPosition(v3(this.node.position.x,this.node.position.y+50)) + break + } } update(deltaTime: number) { @@ -44,13 +54,23 @@ export class TooltipCom extends CCComp { this.alive_time -= deltaTime; }else{ this.ent.destroy(); - } - + } + + // if(this.skill_name_time >=0){ + // this.skill_name_time -= deltaTime; + // }else{ + // if(this.node.getChildByName("skill").active== true){ + // this.node.getChildByName("skill").getChildByName("name").active=false; + // } + // } } /** 视图对象通过 ecs.Entity.remove(ModuleViewComp) 删除组件是触发组件处理自定义释放逻辑 */ reset() { + this.node.getChildByName("loss_life").active=false; + this.node.getChildByName("add_life").active=false; + this.node.getChildByName("skill").active=false; this.node.destroy(); } } \ No newline at end of file