lanyunfei 4 годин тому
батько
коміт
0ffe66f078

+ 131 - 0
assets/game/texture/skill/baoya_boom.plist

@@ -0,0 +1,131 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+    <dict>
+        <key>frames</key>
+        <dict>
+            <key>1.png</key>
+            <dict>
+                <key>aliases</key>
+                <array/>
+                <key>spriteOffset</key>
+                <string>{0,0}</string>
+                <key>spriteSize</key>
+                <string>{104,100}</string>
+                <key>spriteSourceSize</key>
+                <string>{104,100}</string>
+                <key>textureRect</key>
+                <string>{{0,0},{104,100}}</string>
+                <key>textureRotated</key>
+                <false/>
+            </dict>
+            <key>2.png</key>
+            <dict>
+                <key>aliases</key>
+                <array/>
+                <key>spriteOffset</key>
+                <string>{0,0}</string>
+                <key>spriteSize</key>
+                <string>{104,100}</string>
+                <key>spriteSourceSize</key>
+                <string>{104,100}</string>
+                <key>textureRect</key>
+                <string>{{104,0},{104,100}}</string>
+                <key>textureRotated</key>
+                <false/>
+            </dict>
+            <key>3.png</key>
+            <dict>
+                <key>aliases</key>
+                <array/>
+                <key>spriteOffset</key>
+                <string>{0,0}</string>
+                <key>spriteSize</key>
+                <string>{104,100}</string>
+                <key>spriteSourceSize</key>
+                <string>{104,100}</string>
+                <key>textureRect</key>
+                <string>{{208,0},{104,100}}</string>
+                <key>textureRotated</key>
+                <false/>
+            </dict>
+            <key>4.png</key>
+            <dict>
+                <key>aliases</key>
+                <array/>
+                <key>spriteOffset</key>
+                <string>{0,0}</string>
+                <key>spriteSize</key>
+                <string>{104,100}</string>
+                <key>spriteSourceSize</key>
+                <string>{104,100}</string>
+                <key>textureRect</key>
+                <string>{{312,0},{104,100}}</string>
+                <key>textureRotated</key>
+                <false/>
+            </dict>
+            <key>5.png</key>
+            <dict>
+                <key>aliases</key>
+                <array/>
+                <key>spriteOffset</key>
+                <string>{0,0}</string>
+                <key>spriteSize</key>
+                <string>{104,100}</string>
+                <key>spriteSourceSize</key>
+                <string>{104,100}</string>
+                <key>textureRect</key>
+                <string>{{416,0},{104,100}}</string>
+                <key>textureRotated</key>
+                <false/>
+            </dict>
+            <key>6.png</key>
+            <dict>
+                <key>aliases</key>
+                <array/>
+                <key>spriteOffset</key>
+                <string>{0,0}</string>
+                <key>spriteSize</key>
+                <string>{104,100}</string>
+                <key>spriteSourceSize</key>
+                <string>{104,100}</string>
+                <key>textureRect</key>
+                <string>{{520,0},{104,100}}</string>
+                <key>textureRotated</key>
+                <false/>
+            </dict>
+            <key>7.png</key>
+            <dict>
+                <key>aliases</key>
+                <array/>
+                <key>spriteOffset</key>
+                <string>{0,0}</string>
+                <key>spriteSize</key>
+                <string>{104,100}</string>
+                <key>spriteSourceSize</key>
+                <string>{104,100}</string>
+                <key>textureRect</key>
+                <string>{{624,0},{104,100}}</string>
+                <key>textureRotated</key>
+                <false/>
+            </dict>
+        </dict>
+        <key>metadata</key>
+        <dict>
+            <key>format</key>
+            <integer>3</integer>
+            <key>pixelFormat</key>
+            <string>RGBA8888</string>
+            <key>premultiplyAlpha</key>
+            <false/>
+            <key>realTextureFileName</key>
+            <string>baoya_boom.png</string>
+            <key>size</key>
+            <string>{728,100}</string>
+            <key>smartupdate</key>
+            <string>$TexturePacker:SmartUpdate:d2d27da18322efa70cdbc835d6d5acc5:4be2633457730cbc837ba709284e7ff1:c1834173d205cb58b16d9ff71f3a8ad7$</string>
+            <key>textureFileName</key>
+            <string>baoya_boom.png</string>
+        </dict>
+    </dict>
+</plist>

+ 174 - 0
assets/game/texture/skill/baoya_boom.plist.meta

@@ -0,0 +1,174 @@
+{
+  "ver": "1.2.6",
+  "uuid": "611cb0d3-6712-4b13-ab51-fb9059a02fcb",
+  "importer": "asset",
+  "rawTextureUuid": "0f2b7de0-cc18-44a9-ace3-7c3f32a4b9b8",
+  "size": {
+    "width": 728,
+    "height": 100
+  },
+  "type": "Texture Packer",
+  "subMetas": {
+    "1.png": {
+      "ver": "1.0.6",
+      "uuid": "a7c3f793-e0a0-4b63-a5e6-133d1dcaf866",
+      "importer": "sprite-frame",
+      "rawTextureUuid": "0f2b7de0-cc18-44a9-ace3-7c3f32a4b9b8",
+      "trimType": "auto",
+      "trimThreshold": 1,
+      "rotated": false,
+      "offsetX": 0,
+      "offsetY": 0,
+      "trimX": 0,
+      "trimY": 0,
+      "width": 104,
+      "height": 100,
+      "rawWidth": 104,
+      "rawHeight": 100,
+      "borderTop": 0,
+      "borderBottom": 0,
+      "borderLeft": 0,
+      "borderRight": 0,
+      "spriteType": "normal",
+      "subMetas": {}
+    },
+    "2.png": {
+      "ver": "1.0.6",
+      "uuid": "eb8bf4c1-41fe-4bca-9ec0-fcd96ee31789",
+      "importer": "sprite-frame",
+      "rawTextureUuid": "0f2b7de0-cc18-44a9-ace3-7c3f32a4b9b8",
+      "trimType": "auto",
+      "trimThreshold": 1,
+      "rotated": false,
+      "offsetX": 0,
+      "offsetY": 0,
+      "trimX": 104,
+      "trimY": 0,
+      "width": 104,
+      "height": 100,
+      "rawWidth": 104,
+      "rawHeight": 100,
+      "borderTop": 0,
+      "borderBottom": 0,
+      "borderLeft": 0,
+      "borderRight": 0,
+      "spriteType": "normal",
+      "subMetas": {}
+    },
+    "3.png": {
+      "ver": "1.0.6",
+      "uuid": "5bec16fe-d924-4580-82a3-b1acbf3caeba",
+      "importer": "sprite-frame",
+      "rawTextureUuid": "0f2b7de0-cc18-44a9-ace3-7c3f32a4b9b8",
+      "trimType": "auto",
+      "trimThreshold": 1,
+      "rotated": false,
+      "offsetX": 0,
+      "offsetY": 0,
+      "trimX": 208,
+      "trimY": 0,
+      "width": 104,
+      "height": 100,
+      "rawWidth": 104,
+      "rawHeight": 100,
+      "borderTop": 0,
+      "borderBottom": 0,
+      "borderLeft": 0,
+      "borderRight": 0,
+      "spriteType": "normal",
+      "subMetas": {}
+    },
+    "4.png": {
+      "ver": "1.0.6",
+      "uuid": "d38be540-bae2-4e84-8514-57127555023c",
+      "importer": "sprite-frame",
+      "rawTextureUuid": "0f2b7de0-cc18-44a9-ace3-7c3f32a4b9b8",
+      "trimType": "auto",
+      "trimThreshold": 1,
+      "rotated": false,
+      "offsetX": 0,
+      "offsetY": 0,
+      "trimX": 312,
+      "trimY": 0,
+      "width": 104,
+      "height": 100,
+      "rawWidth": 104,
+      "rawHeight": 100,
+      "borderTop": 0,
+      "borderBottom": 0,
+      "borderLeft": 0,
+      "borderRight": 0,
+      "spriteType": "normal",
+      "subMetas": {}
+    },
+    "5.png": {
+      "ver": "1.0.6",
+      "uuid": "db30ee40-dce1-4c9f-b41e-5f0735d3455e",
+      "importer": "sprite-frame",
+      "rawTextureUuid": "0f2b7de0-cc18-44a9-ace3-7c3f32a4b9b8",
+      "trimType": "auto",
+      "trimThreshold": 1,
+      "rotated": false,
+      "offsetX": 0,
+      "offsetY": 0,
+      "trimX": 416,
+      "trimY": 0,
+      "width": 104,
+      "height": 100,
+      "rawWidth": 104,
+      "rawHeight": 100,
+      "borderTop": 0,
+      "borderBottom": 0,
+      "borderLeft": 0,
+      "borderRight": 0,
+      "spriteType": "normal",
+      "subMetas": {}
+    },
+    "6.png": {
+      "ver": "1.0.6",
+      "uuid": "1d699eb1-e972-48b9-b41e-68447896f7a8",
+      "importer": "sprite-frame",
+      "rawTextureUuid": "0f2b7de0-cc18-44a9-ace3-7c3f32a4b9b8",
+      "trimType": "auto",
+      "trimThreshold": 1,
+      "rotated": false,
+      "offsetX": 0,
+      "offsetY": 0,
+      "trimX": 520,
+      "trimY": 0,
+      "width": 104,
+      "height": 100,
+      "rawWidth": 104,
+      "rawHeight": 100,
+      "borderTop": 0,
+      "borderBottom": 0,
+      "borderLeft": 0,
+      "borderRight": 0,
+      "spriteType": "normal",
+      "subMetas": {}
+    },
+    "7.png": {
+      "ver": "1.0.6",
+      "uuid": "12f04320-4738-409a-8b3a-fdfab463a62a",
+      "importer": "sprite-frame",
+      "rawTextureUuid": "0f2b7de0-cc18-44a9-ace3-7c3f32a4b9b8",
+      "trimType": "auto",
+      "trimThreshold": 1,
+      "rotated": false,
+      "offsetX": 0,
+      "offsetY": 0,
+      "trimX": 624,
+      "trimY": 0,
+      "width": 104,
+      "height": 100,
+      "rawWidth": 104,
+      "rawHeight": 100,
+      "borderTop": 0,
+      "borderBottom": 0,
+      "borderLeft": 0,
+      "borderRight": 0,
+      "spriteType": "normal",
+      "subMetas": {}
+    }
+  }
+}

BIN
assets/game/texture/skill/baoya_boom.png


+ 15 - 0
assets/game/texture/skill/baoya_boom.png.meta

@@ -0,0 +1,15 @@
+{
+  "ver": "2.3.7",
+  "uuid": "0f2b7de0-cc18-44a9-ace3-7c3f32a4b9b8",
+  "importer": "texture",
+  "type": "raw",
+  "wrapMode": "clamp",
+  "filterMode": "bilinear",
+  "premultiplyAlpha": false,
+  "genMipmaps": false,
+  "packable": true,
+  "width": 728,
+  "height": 100,
+  "platformSettings": {},
+  "subMetas": {}
+}

+ 0 - 1
assets/script/ECS/components/ComDie.ts

@@ -5,7 +5,6 @@ import {ECSComponent} from '../lib/ECSComponent'
 
 @ECSComponent(ComType.ComDie)
 export class ComDie {
-    public duration: number // 死亡动画时间
     public countDown: number // 死亡动画剩余时间
     public spineEntity: number // spine
 }

+ 1 - 0
assets/script/ECS/components/ComRole.ts

@@ -46,6 +46,7 @@ export class ComRole {
     public attackTime: number // 攻击时间
     public castTime: number[] // 技能时间
     public enterTime: number // 入场时间
+    public dieTime: number // 死亡时间
 
     public attackNum: number //攻击次数
     public killNum: number //杀人次数

+ 0 - 2
assets/script/ECS/components/ComSkill.ts

@@ -23,8 +23,6 @@ export class ComSkill {
     hurtFrameCompleted: boolean
     //技能指向的角色
     role: EntityIndex
-    //创建技能的角色
-    createRole: EntityIndex
     //特效ID
     ani: EntityIndex
 }

+ 5 - 1
assets/script/ECS/systems/SysHasSkill.ts

@@ -190,7 +190,10 @@ export class SysHasSkill extends ECSSystem {
                                 }
                             })
                             if (containsArr.length > 1) containsArr.length = 1
-                        } else if (skillCfg.dirType == SKILL_DIR_TYPE.selfRole) {
+                        } else if (
+                            skillCfg.dirType == SKILL_DIR_TYPE.selfRole ||
+                            skillCfg.dirType == SKILL_DIR_TYPE.selfNormal
+                        ) {
                             containsArr.length = 0
                             containsArr.push(entity)
                             //顶盾不能在前往攻击点施放
@@ -221,6 +224,7 @@ export class SysHasSkill extends ECSSystem {
                         comSkillAbel.roles.length = 0
                         if (
                             skillCfg.dirType == SKILL_DIR_TYPE.normal ||
+                            skillCfg.dirType == SKILL_DIR_TYPE.selfNormal ||
                             skillCfg.dirType == SKILL_DIR_TYPE.selfRole ||
                             skillCfg.dirType == SKILL_DIR_TYPE.anyRole ||
                             skillCfg.dirType == SKILL_DIR_TYPE.minHpRole ||

+ 1 - 2
assets/script/ECS/systems/SysRoleState.ts

@@ -236,8 +236,7 @@ export class SysRoleState extends ECSSystem {
                         }
                     } else {
                         let comDie = world.addComponent(entity, ComDie)
-                        comDie.duration = 1
-                        comDie.countDown = 1
+                        comDie.countDown = comRole.dieTime > 0 ? 1 : 0
                         comDie.spineEntity = comRole.spineEntity
                     }
                 }

+ 7 - 0
assets/script/ECS/systems/SysSkillAbel.ts

@@ -18,6 +18,7 @@ import {
     ENTRY,
     FRAME_ANI_NAME,
     GAME_ROLE_TIP,
+    SKILL_DIR_TYPE,
     SKILL_EFFECT_TYPE,
     SKILL_TYPE,
 } from '../../enums/Enum'
@@ -210,6 +211,12 @@ export class SysSkillAbel extends ECSSystem {
                             //让技能可以重新被施放
                             comRole.skillCountDowns[curSkillIndex] = comRole.castTime[curSkillIndex]
                         }
+                    } else {
+                        //自杀
+                        if (comSkillAbel.skillConfig.effectType.includes(SKILL_EFFECT_TYPE.killSelf)) {
+                            comRole.nowHP = 0
+                            comRole.HPDirty = true
+                        }
                     }
                 } else if (comSkillAbel.skillConfig.type == SKILL_TYPE.createRole) {
                     comSkillAbel.skillConfig.createRole.forEach((role, index) => {

+ 19 - 9
assets/script/ECS/worlds/WorldCocosView.ts

@@ -222,9 +222,8 @@ export class WorldCocosView extends ECSWorld {
         let attackTime = Infinity
         let castTime = new Array(roleCfg.skills.length).fill(0) //spine没有技能动作
         let enterTime = 0
-        if (spineData && spineData.findAnimation('attack')) {
-            attackTime = spineData.findAnimation('attack').duration
-        }
+        let dieTime = 0
+
         if (spineData) {
             for (let i = 1; i <= roleCfg.skills.length; i++) {
                 if (spineData.findAnimation(`skill${i}`)) {
@@ -234,13 +233,21 @@ export class WorldCocosView extends ECSWorld {
             if (spineData.findAnimation('skill') && castTime.length > 0) {
                 castTime[0] = spineData.findAnimation('skill').duration
             }
+            if (spineData.findAnimation('enter')) {
+                enterTime = spineData.findAnimation('enter').duration
+            }
+            if (spineData.findAnimation('attack')) {
+                attackTime = spineData.findAnimation('attack').duration
+            }
+            if (spineData.findAnimation('die')) {
+                dieTime = spineData.findAnimation('die').duration
+            }
         }
-        if (spineData && spineData.findAnimation('enter')) {
-            enterTime = spineData.findAnimation('enter').duration
-        }
+
         comRole.attackTime = attackTime
         comRole.castTime = castTime
         comRole.enterTime = enterTime
+        comRole.dieTime = dieTime
         comRole.killNum = 0
         comRole.attackNum = 0
         comRole.group = isEnemy ? Data.game.gEnemy : Data.game.gFriend
@@ -1308,7 +1315,6 @@ export class WorldCocosView extends ECSWorld {
         comSkill.fightData = fightData
         comSkill.countDown = skillCfg.duration
         comSkill.role = role
-        comSkill.createRole = role
         comSkill.group = group
         comSkill.hurtFrameCompleted = false
         comSkill.dirty = false
@@ -1321,10 +1327,14 @@ export class WorldCocosView extends ECSWorld {
             comSkill.group =
                 comRole.group == Data.game.gFriend
                     ? skillCfg.isHurt
-                        ? Data.game.gEnemyHurtSkill
+                        ? skillCfg.dirType == SKILL_DIR_TYPE.selfNormal
+                            ? Data.game.gFriendHurtSkill
+                            : Data.game.gEnemyHurtSkill
                         : Data.game.gFriendGainSkill
                     : skillCfg.isHurt
-                    ? Data.game.gFriendHurtSkill
+                    ? skillCfg.dirType == SKILL_DIR_TYPE.selfNormal
+                        ? Data.game.gEnemyHurtSkill
+                        : Data.game.gFriendHurtSkill
                     : Data.game.gEnemyGainSkill
         } else {
             if (!pos || !group) Log.error('技能创建失败')

+ 2 - 0
assets/script/enums/Enum.ts

@@ -188,6 +188,7 @@ export enum SKILL_DIR_TYPE {
     baby, //召唤物对象
     minHpRole, //最少血量对象
     maxDistance, //距离最大对象
+    selfNormal, //以自己为中心的范围内n个对象
 }
 
 export enum SKILL_TYPE {
@@ -236,6 +237,7 @@ export enum SKILL_EFFECT_TYPE {
     addCost, //加费点
     shieldHolo, //绿巨人顶盾光环
     move, //可移动技能
+    killSelf, //自杀
 }
 
 export enum BUFF_TYPE {

+ 48 - 0
assets/texture/Public/role/spine/zibaobaoya.atlas

@@ -0,0 +1,48 @@
+
+zibaobaoya.png
+size: 512,1024
+format: RGBA8888
+filter: Linear,Linear
+repeat: none
+di
+  rotate: false
+  xy: 2, 2
+  size: 200, 68
+  orig: 200, 68
+  offset: 0, 0
+  index: -1
+shadow
+  rotate: false
+  xy: 192, 157
+  size: 69, 40
+  orig: 83, 53
+  offset: 7, 6
+  index: -1
+tou
+  rotate: true
+  xy: 2, 258
+  size: 363, 260
+  orig: 363, 260
+  offset: 0, 0
+  index: -1
+tui
+  rotate: true
+  xy: 2, 72
+  size: 184, 100
+  orig: 184, 100
+  offset: 0, 0
+  index: -1
+youyan
+  rotate: false
+  xy: 104, 145
+  size: 86, 52
+  orig: 86, 52
+  offset: 0, 0
+  index: -1
+zuoyan
+  rotate: false
+  xy: 104, 199
+  size: 125, 57
+  orig: 125, 57
+  offset: 0, 0
+  index: -1

+ 6 - 0
assets/texture/Public/role/spine/zibaobaoya.atlas.meta

@@ -0,0 +1,6 @@
+{
+  "ver": "1.0.3",
+  "uuid": "86b9cce9-a06d-4d05-bc02-dbf47cad3aaa",
+  "importer": "asset",
+  "subMetas": {}
+}

BIN
assets/texture/Public/role/spine/zibaobaoya.png


+ 38 - 0
assets/texture/Public/role/spine/zibaobaoya.png.meta

@@ -0,0 +1,38 @@
+{
+  "ver": "2.3.7",
+  "uuid": "dde31611-ce28-4fef-be1c-cf22854d0916",
+  "importer": "texture",
+  "type": "sprite",
+  "wrapMode": "clamp",
+  "filterMode": "bilinear",
+  "premultiplyAlpha": false,
+  "genMipmaps": false,
+  "packable": true,
+  "width": 512,
+  "height": 1024,
+  "platformSettings": {},
+  "subMetas": {
+    "zibaobaoya": {
+      "ver": "1.0.6",
+      "uuid": "a7c0afd3-72f6-4602-a5ff-f34aa5440b3a",
+      "importer": "sprite-frame",
+      "rawTextureUuid": "dde31611-ce28-4fef-be1c-cf22854d0916",
+      "trimType": "auto",
+      "trimThreshold": 1,
+      "rotated": false,
+      "offsetX": -124,
+      "offsetY": 200.5,
+      "trimX": 2,
+      "trimY": 2,
+      "width": 260,
+      "height": 619,
+      "rawWidth": 512,
+      "rawHeight": 1024,
+      "borderTop": 0,
+      "borderBottom": 0,
+      "borderLeft": 0,
+      "borderRight": 0,
+      "subMetas": {}
+    }
+  }
+}

BIN
assets/texture/Public/role/spine/zibaobaoya.skel


+ 10 - 0
assets/texture/Public/role/spine/zibaobaoya.skel.meta

@@ -0,0 +1,10 @@
+{
+  "ver": "1.2.5",
+  "uuid": "4a55d267-2c4f-4745-8881-0eb71f132c8b",
+  "importer": "spine",
+  "textures": [
+    "dde31611-ce28-4fef-be1c-cf22854d0916"
+  ],
+  "scale": 1,
+  "subMetas": {}
+}