Reduced dragonbones exported resource size.

This commit is contained in:
genxium 2022-11-27 19:38:26 +08:00
parent e0fb21f3fb
commit 1b43e6d760
73 changed files with 111 additions and 999 deletions

View File

@ -70,7 +70,7 @@ const (
)
const (
DEFAULT_PLAYER_RADIUS = float64(16)
DEFAULT_PLAYER_RADIUS = float64(8)
)
// These directions are chosen such that when speed is changed to "(speedX+delta, speedY+delta)" for any of them, the direction is unchanged.
@ -809,25 +809,25 @@ func (pR *Room) OnDismissed() {
pR.MeleeSkillConfig = make(map[int32]*MeleeBullet, 0)
pR.MeleeSkillConfig[punchSkillId] = &MeleeBullet{
// for offender
StartupFrames: int32(23),
StartupFrames: int32(10),
ActiveFrames: int32(3),
RecoveryFrames: int32(61), // I hereby set it to be 1 frame more than the actual animation to avoid critical transition, i.e. when the animation is 1 frame from ending but "rdfPlayer.framesToRecover" is already counted 0 and the player triggers an other same attack, making an effective bullet trigger but no animation is played due to same animName is still playing
RecoveryFramesOnBlock: int32(61),
RecoveryFramesOnHit: int32(61),
RecoveryFrames: int32(34),
RecoveryFramesOnBlock: int32(34),
RecoveryFramesOnHit: int32(34),
Moveforward: &Vec2D{
X: 0,
Y: 0,
},
HitboxOffset: float64(24.0), // should be about the radius of the PlayerCollider
HitboxOffset: float64(12.0), // should be about the radius of the PlayerCollider
HitboxSize: &Vec2D{
X: float64(45.0),
Y: float64(32.0),
X: float64(23.0),
Y: float64(20.0),
},
// for defender
HitStunFrames: int32(18),
BlockStunFrames: int32(9),
Pushback: float64(11.0),
Pushback: float64(8.0),
ReleaseTriggerType: int32(1), // 1: rising-edge, 2: falling-edge
Damage: int32(5),
}

View File

@ -1 +0,0 @@
{"SubTexture":[{"width":23,"y":44,"height":22,"name":"biu","x":53},{"width":9,"y":68,"height":14,"name":"rightArm","x":76},{"y":35,"frameX":-1,"frameY":0,"width":27,"frameWidth":29,"height":32,"name":"yinmoqe00","frameHeight":32,"x":89},{"width":34,"y":1,"height":41,"name":"body","x":53},{"width":9,"y":44,"height":13,"name":"rightShoulder","x":78},{"y":50,"frameX":0,"frameY":0,"width":19,"frameWidth":19,"height":18,"name":"rightFrontArm","frameHeight":18,"x":23},{"width":14,"y":70,"height":14,"name":"rightHand","x":23},{"y":68,"frameX":0,"frameY":0,"width":12,"frameWidth":12,"height":12,"name":"leftArm","frameHeight":12,"x":62},{"width":13,"y":73,"height":12,"name":"leftShoulder","x":1},{"width":20,"y":50,"height":21,"name":"leftFrontArm","x":1},{"width":33,"y":1,"height":32,"name":"head","x":89},{"width":50,"y":1,"height":47,"name":"head2","x":1},{"width":16,"y":68,"height":14,"name":"leftHand","x":44},{"y":59,"frameX":-1,"frameY":-2,"width":4,"frameWidth":8,"height":4,"name":"huomiao01","frameHeight":8,"x":78}],"width":128,"height":128,"name":"SoldierWaterGhost","imagePath":"SoldierWaterGhost_tex.png"}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

Binary file not shown.

View File

Before

Width:  |  Height:  |  Size: 7.1 KiB

After

Width:  |  Height:  |  Size: 7.1 KiB

View File

Before

Width:  |  Height:  |  Size: 5.4 KiB

After

Width:  |  Height:  |  Size: 5.4 KiB

View File

@ -0,0 +1 @@
{"width":128,"SubTexture":[{"frameWidth":23,"y":50,"frameX":-2,"frameHeight":22,"frameY":-2,"width":19,"height":19,"name":"biu","x":1},{"width":9,"y":50,"height":14,"name":"rightArm","x":42},{"frameWidth":29,"y":34,"frameX":-6,"frameHeight":32,"frameY":0,"width":20,"height":32,"name":"yinmoqe00","x":88},{"frameWidth":34,"y":1,"frameX":0,"frameHeight":41,"frameY":0,"width":33,"height":39,"name":"body","x":53},{"width":9,"y":56,"height":13,"name":"rightShoulder","x":74},{"frameWidth":19,"y":50,"frameX":0,"frameHeight":18,"frameY":0,"width":18,"height":17,"name":"rightFrontArm","x":22},{"width":14,"y":50,"height":14,"name":"rightHand","x":110},{"width":12,"y":42,"height":12,"name":"leftArm","x":74},{"width":13,"y":66,"height":12,"name":"leftShoulder","x":110},{"frameWidth":20,"y":42,"frameX":-1,"frameHeight":21,"frameY":0,"width":19,"height":21,"name":"leftFrontArm","x":53},{"width":50,"y":1,"height":47,"name":"head2","x":1},{"frameWidth":33,"y":1,"frameX":-1,"frameHeight":32,"frameY":0,"width":32,"height":31,"name":"head","x":88},{"width":16,"y":34,"height":14,"name":"leftHand","x":110},{"frameWidth":8,"y":1,"frameX":-2,"frameHeight":8,"frameY":-3,"width":2,"height":2,"name":"huomiao01","x":122}],"height":128,"name":"SoldierWaterGhost","imagePath":"SoldierWaterGhost_tex.png"}

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.8 KiB

View File

@ -1,7 +0,0 @@
{
"ver": "1.0.1",
"uuid": "0e243c83-a137-4880-9bfe-9e1b57adc453",
"isSubpackage": false,
"subpackageName": "",
"subMetas": {}
}

View File

@ -1,31 +0,0 @@
{
"__type__": "cc.AnimationClip",
"_name": "Bottom",
"_objFlags": 0,
"_native": "",
"_duration": 0.25,
"sample": 12,
"speed": 1,
"wrapMode": "2",
"curveData": {
"comps": {
"cc.Sprite": {
"spriteFrame": [
{
"frame": 0,
"value": {
"__uuid__": "783f1240-d608-40be-8108-3013ab53cfe6"
}
},
{
"frame": 0.16666666666666666,
"value": {
"__uuid__": "393e649b-addb-4f91-b687-438433026c8d"
}
}
]
}
}
},
"events": []
}

View File

@ -1,5 +0,0 @@
{
"ver": "2.1.0",
"uuid": "115ea7bb-d47f-4d3c-a52a-f46584346c3f",
"subMetas": {}
}

View File

@ -1,31 +0,0 @@
{
"__type__": "cc.AnimationClip",
"_name": "BottomLeft",
"_objFlags": 0,
"_native": "",
"_duration": 0.25,
"sample": 12,
"speed": 1,
"wrapMode": "2",
"curveData": {
"comps": {
"cc.Sprite": {
"spriteFrame": [
{
"frame": 0,
"value": {
"__uuid__": "748c55f0-e761-40f6-b13b-e416b3d8a55c"
}
},
{
"frame": 0.16666666666666666,
"value": {
"__uuid__": "6164bac7-9882-43ce-b3d0-9d062d6d0b49"
}
}
]
}
}
},
"events": []
}

View File

@ -1,5 +0,0 @@
{
"ver": "2.1.0",
"uuid": "a1bf7c7c-b9f7-4b65-86e3-f86a9e798fb6",
"subMetas": {}
}

View File

@ -1,31 +0,0 @@
{
"__type__": "cc.AnimationClip",
"_name": "BottomRight",
"_objFlags": 0,
"_native": "",
"_duration": 0.25,
"sample": 12,
"speed": 1,
"wrapMode": "2",
"curveData": {
"comps": {
"cc.Sprite": {
"spriteFrame": [
{
"frame": 0,
"value": {
"__uuid__": "34cf9fbb-8def-4faf-a56e-123b4c45706c"
}
},
{
"frame": 0.16666666666666666,
"value": {
"__uuid__": "b6709dd6-6ba7-4222-af38-de79ac80ce8b"
}
}
]
}
}
},
"events": []
}

View File

@ -1,5 +0,0 @@
{
"ver": "2.1.0",
"uuid": "d5af527a-9f0c-4398-b2dd-84426be7bd32",
"subMetas": {}
}

View File

@ -1,31 +0,0 @@
{
"__type__": "cc.AnimationClip",
"_name": "Left",
"_objFlags": 0,
"_native": "",
"_duration": 0.25,
"sample": 12,
"speed": 1,
"wrapMode": "2",
"curveData": {
"comps": {
"cc.Sprite": {
"spriteFrame": [
{
"frame": 0,
"value": {
"__uuid__": "02cd24e3-1c4a-46d7-85af-9034c9445ba7"
}
},
{
"frame": 0.16666666666666666,
"value": {
"__uuid__": "1f121837-a493-4a41-90e5-74ea560930ad"
}
}
]
}
}
},
"events": []
}

View File

@ -1,5 +0,0 @@
{
"ver": "2.1.0",
"uuid": "b60618d7-569d-4f13-bdeb-f20341fbadb6",
"subMetas": {}
}

View File

@ -1,31 +0,0 @@
{
"__type__": "cc.AnimationClip",
"_name": "Right",
"_objFlags": 0,
"_native": "",
"_duration": 0.25,
"sample": 12,
"speed": 1,
"wrapMode": "2",
"curveData": {
"comps": {
"cc.Sprite": {
"spriteFrame": [
{
"frame": 0,
"value": {
"__uuid__": "a6ec6a1c-dde5-459d-84f9-7b2b8a163e7b"
}
},
{
"frame": 0.16666666666666666,
"value": {
"__uuid__": "b5d11244-f30a-4b0d-b67b-23648d253d44"
}
}
]
}
}
},
"events": []
}

View File

@ -1,5 +0,0 @@
{
"ver": "2.1.0",
"uuid": "0b3fb38e-9110-4191-9b72-6b64a224d049",
"subMetas": {}
}

View File

@ -1,31 +0,0 @@
{
"__type__": "cc.AnimationClip",
"_name": "Top",
"_objFlags": 0,
"_native": "",
"_duration": 0.25,
"sample": 12,
"speed": 1,
"wrapMode": "2",
"curveData": {
"comps": {
"cc.Sprite": {
"spriteFrame": [
{
"frame": 0,
"value": {
"__uuid__": "8967d249-e9cf-4e44-85e8-6b9377129d9e"
}
},
{
"frame": 0.16666666666666666,
"value": {
"__uuid__": "492a57fb-6a5c-423a-bcfe-0695a7828881"
}
}
]
}
}
},
"events": []
}

View File

@ -1,5 +0,0 @@
{
"ver": "2.1.0",
"uuid": "1bc6de53-800b-4da3-ab8e-4a45e3aa4230",
"subMetas": {}
}

View File

@ -1,31 +0,0 @@
{
"__type__": "cc.AnimationClip",
"_name": "TopLeft",
"_objFlags": 0,
"_native": "",
"_duration": 0.25,
"sample": 12,
"speed": 1,
"wrapMode": "2",
"curveData": {
"comps": {
"cc.Sprite": {
"spriteFrame": [
{
"frame": 0,
"value": {
"__uuid__": "96187689-85df-46e8-b4db-410eae03c135"
}
},
{
"frame": 0.16666666666666666,
"value": {
"__uuid__": "6b002583-7688-43d3-b3fa-102ae0046628"
}
}
]
}
}
},
"events": []
}

View File

@ -1,5 +0,0 @@
{
"ver": "2.1.0",
"uuid": "ee0d670c-893e-4e4d-96dd-5571db18ee97",
"subMetas": {}
}

View File

@ -1,31 +0,0 @@
{
"__type__": "cc.AnimationClip",
"_name": "TopRight",
"_objFlags": 0,
"_native": "",
"_duration": 0.25,
"sample": 12,
"speed": 1,
"wrapMode": "2",
"curveData": {
"comps": {
"cc.Sprite": {
"spriteFrame": [
{
"frame": 0,
"value": {
"__uuid__": "ba89046f-8b70-4edb-9f61-534dff476325"
}
},
{
"frame": 0.16666666666666666,
"value": {
"__uuid__": "bc1ef316-d6ad-4538-b223-a0fed8094609"
}
}
]
}
}
},
"events": []
}

View File

@ -1,5 +0,0 @@
{
"ver": "2.1.0",
"uuid": "596df84a-2e4e-4f1d-967c-a82649f564a8",
"subMetas": {}
}

View File

@ -1,43 +0,0 @@
{
"__type__": "cc.AnimationClip",
"_name": "attackedLeft",
"_objFlags": 0,
"_native": "",
"_duration": 0.3333333333333333,
"sample": 12,
"speed": 1,
"wrapMode": "2",
"curveData": {
"comps": {
"cc.Sprite": {
"spriteFrame": [
{
"frame": 0,
"value": {
"__uuid__": "02cd24e3-1c4a-46d7-85af-9034c9445ba7"
}
},
{
"frame": 0.08333333333333333,
"value": {
"__uuid__": "8c522ad3-ee82-41a7-892e-05c05442e2e3"
}
},
{
"frame": 0.16666666666666666,
"value": {
"__uuid__": "1f121837-a493-4a41-90e5-74ea560930ad"
}
},
{
"frame": 0.25,
"value": {
"__uuid__": "1c0ec5ec-51cb-467d-b597-8e69ce580cfd"
}
}
]
}
}
},
"events": []
}

View File

@ -1,5 +0,0 @@
{
"ver": "2.1.0",
"uuid": "8acc4e9f-3c47-4b66-9a9d-d012709680f6",
"subMetas": {}
}

View File

@ -1,43 +0,0 @@
{
"__type__": "cc.AnimationClip",
"_name": "attackedRight",
"_objFlags": 0,
"_native": "",
"_duration": 0.3333333333333333,
"sample": 12,
"speed": 1,
"wrapMode": "2",
"curveData": {
"comps": {
"cc.Sprite": {
"spriteFrame": [
{
"frame": 0,
"value": {
"__uuid__": "a6ec6a1c-dde5-459d-84f9-7b2b8a163e7b"
}
},
{
"frame": 0.08333333333333333,
"value": {
"__uuid__": "d5ec0aaf-d4a9-4b2e-b9c1-bdc54b355b73"
}
},
{
"frame": 0.16666666666666666,
"value": {
"__uuid__": "b5d11244-f30a-4b0d-b67b-23648d253d44"
}
},
{
"frame": 0.25,
"value": {
"__uuid__": "360dfc7d-4ed1-4fb9-8d2f-7533d05a4830"
}
}
]
}
}
},
"events": []
}

View File

@ -1,5 +0,0 @@
{
"ver": "2.1.0",
"uuid": "c7cda0cd-dbce-4722-abd2-aeca28263a21",
"subMetas": {}
}

View File

@ -1,7 +0,0 @@
{
"ver": "1.0.1",
"uuid": "135f388e-7e75-4ece-b267-4e07835cba74",
"isSubpackage": false,
"subpackageName": "",
"subMetas": {}
}

View File

@ -1,31 +0,0 @@
{
"__type__": "cc.AnimationClip",
"_name": "Bottom",
"_objFlags": 0,
"_native": "",
"_duration": 0.25,
"sample": 12,
"speed": 1,
"wrapMode": "2",
"curveData": {
"comps": {
"cc.Sprite": {
"spriteFrame": [
{
"frame": 0,
"value": {
"__uuid__": "c79694bc-ff6f-416b-9047-b82f41fe791a"
}
},
{
"frame": 0.16666666666666666,
"value": {
"__uuid__": "609c77a2-bdfe-4967-8de6-646532302c97"
}
}
]
}
}
},
"events": []
}

View File

@ -1,5 +0,0 @@
{
"ver": "2.1.0",
"uuid": "28194c48-ae3b-4197-8263-0d474ae8b9bc",
"subMetas": {}
}

View File

@ -1,31 +0,0 @@
{
"__type__": "cc.AnimationClip",
"_name": "BottomLeft",
"_objFlags": 0,
"_native": "",
"_duration": 0.25,
"sample": 12,
"speed": 1,
"wrapMode": "2",
"curveData": {
"comps": {
"cc.Sprite": {
"spriteFrame": [
{
"frame": 0,
"value": {
"__uuid__": "07b6d385-3f51-48c1-8165-38756b3d84fa"
}
},
{
"frame": 0.16666666666666666,
"value": {
"__uuid__": "c627bf3b-0e97-4423-aeea-54c7511894d6"
}
}
]
}
}
},
"events": []
}

View File

@ -1,5 +0,0 @@
{
"ver": "2.1.0",
"uuid": "e1c45a36-2022-4b18-a2db-b5e2e0a120ed",
"subMetas": {}
}

View File

@ -1,31 +0,0 @@
{
"__type__": "cc.AnimationClip",
"_name": "BottomRight",
"_objFlags": 0,
"_native": "",
"_duration": 0.25,
"sample": 12,
"speed": 1,
"wrapMode": "2",
"curveData": {
"comps": {
"cc.Sprite": {
"spriteFrame": [
{
"frame": 0,
"value": {
"__uuid__": "d0327836-1910-4c6a-9291-c8bb044c54f5"
}
},
{
"frame": 0.16666666666666666,
"value": {
"__uuid__": "1d3e614a-bb2a-4b1d-87ca-0cddd6e03fff"
}
}
]
}
}
},
"events": []
}

View File

@ -1,5 +0,0 @@
{
"ver": "2.1.0",
"uuid": "126dff26-0ace-439d-89b5-b888aa52d159",
"subMetas": {}
}

View File

@ -1,31 +0,0 @@
{
"__type__": "cc.AnimationClip",
"_name": "Left",
"_objFlags": 0,
"_native": "",
"_duration": 0.25,
"sample": 12,
"speed": 1,
"wrapMode": "2",
"curveData": {
"comps": {
"cc.Sprite": {
"spriteFrame": [
{
"frame": 0,
"value": {
"__uuid__": "c9528117-c878-41aa-ad5d-641fefcaa89f"
}
},
{
"frame": 0.16666666666666666,
"value": {
"__uuid__": "c0e5d042-8bc1-449b-9a2d-7844129c5188"
}
}
]
}
}
},
"events": []
}

View File

@ -1,5 +0,0 @@
{
"ver": "2.1.0",
"uuid": "95c2d541-8f99-446a-a7e0-094130ce6d41",
"subMetas": {}
}

View File

@ -1,31 +0,0 @@
{
"__type__": "cc.AnimationClip",
"_name": "Right",
"_objFlags": 0,
"_native": "",
"_duration": 0.25,
"sample": 12,
"speed": 1,
"wrapMode": "2",
"curveData": {
"comps": {
"cc.Sprite": {
"spriteFrame": [
{
"frame": 0,
"value": {
"__uuid__": "1054cf4c-69a5-4834-8966-03bc613d4483"
}
},
{
"frame": 0.16666666666666666,
"value": {
"__uuid__": "b88522bd-8b6b-44a1-9c84-5518ae7f5c2c"
}
}
]
}
}
},
"events": []
}

View File

@ -1,5 +0,0 @@
{
"ver": "2.1.0",
"uuid": "380f5fa0-f77f-434a-8f39-d545ee6823c5",
"subMetas": {}
}

View File

@ -1,31 +0,0 @@
{
"__type__": "cc.AnimationClip",
"_name": "Top",
"_objFlags": 0,
"_native": "",
"_duration": 0.25,
"sample": 12,
"speed": 1,
"wrapMode": "2",
"curveData": {
"comps": {
"cc.Sprite": {
"spriteFrame": [
{
"frame": 0,
"value": {
"__uuid__": "9702ca76-66c8-4ea9-a976-45f86e15830a"
}
},
{
"frame": 0.16666666666666666,
"value": {
"__uuid__": "6390f1c3-b4cc-41df-acfb-645e8f90fb36"
}
}
]
}
}
},
"events": []
}

View File

@ -1,5 +0,0 @@
{
"ver": "2.1.0",
"uuid": "a306c6de-ccd8-492b-bfec-c6be0a4cbde2",
"subMetas": {}
}

View File

@ -1,31 +0,0 @@
{
"__type__": "cc.AnimationClip",
"_name": "TopLeft",
"_objFlags": 0,
"_native": "",
"_duration": 0.25,
"sample": 12,
"speed": 1,
"wrapMode": "2",
"curveData": {
"comps": {
"cc.Sprite": {
"spriteFrame": [
{
"frame": 0,
"value": {
"__uuid__": "a669112a-f263-443d-9757-60d0372e0fe8"
}
},
{
"frame": 0.16666666666666666,
"value": {
"__uuid__": "3ed70f56-3b60-4bda-9d2a-8d4b5ecb12f9"
}
}
]
}
}
},
"events": []
}

View File

@ -1,5 +0,0 @@
{
"ver": "2.1.0",
"uuid": "f496072b-51fd-4406-abbd-9885ac23f7a9",
"subMetas": {}
}

View File

@ -1,31 +0,0 @@
{
"__type__": "cc.AnimationClip",
"_name": "TopRight",
"_objFlags": 0,
"_native": "",
"_duration": 0.25,
"sample": 12,
"speed": 1,
"wrapMode": "2",
"curveData": {
"comps": {
"cc.Sprite": {
"spriteFrame": [
{
"frame": 0,
"value": {
"__uuid__": "3d84f335-85c4-4dd0-a5d3-38f4da1e1611"
}
},
{
"frame": 0.16666666666666666,
"value": {
"__uuid__": "6d36877f-dc27-4ebc-9407-14fbcf2314df"
}
}
]
}
}
},
"events": []
}

View File

@ -1,5 +0,0 @@
{
"ver": "2.1.0",
"uuid": "6405ad8b-3084-4b67-8c2e-9b4d34fa3d09",
"subMetas": {}
}

View File

@ -1,43 +0,0 @@
{
"__type__": "cc.AnimationClip",
"_name": "attackedLeft",
"_objFlags": 0,
"_native": "",
"_duration": 0.3333333333333333,
"sample": 12,
"speed": 1,
"wrapMode": "2",
"curveData": {
"comps": {
"cc.Sprite": {
"spriteFrame": [
{
"frame": 0,
"value": {
"__uuid__": "c9528117-c878-41aa-ad5d-641fefcaa89f"
}
},
{
"frame": 0.08333333333333333,
"value": {
"__uuid__": "987c7dc0-e81f-4891-979d-0998794e6889"
}
},
{
"frame": 0.16666666666666666,
"value": {
"__uuid__": "c0e5d042-8bc1-449b-9a2d-7844129c5188"
}
},
{
"frame": 0.25,
"value": {
"__uuid__": "9205c378-c50c-4303-af32-dbf9422375cf"
}
}
]
}
}
},
"events": []
}

View File

@ -1,5 +0,0 @@
{
"ver": "2.1.0",
"uuid": "af16cdcb-6e82-4be6-806d-9fc52ae99fff",
"subMetas": {}
}

View File

@ -1,43 +0,0 @@
{
"__type__": "cc.AnimationClip",
"_name": "attackedRight",
"_objFlags": 0,
"_native": "",
"_duration": 0.3333333333333333,
"sample": 12,
"speed": 1,
"wrapMode": "2",
"curveData": {
"comps": {
"cc.Sprite": {
"spriteFrame": [
{
"frame": 0,
"value": {
"__uuid__": "1054cf4c-69a5-4834-8966-03bc613d4483"
}
},
{
"frame": 0.08333333333333333,
"value": {
"__uuid__": "8f3cf81e-1251-4013-b684-13f2830c7425"
}
},
{
"frame": 0.16666666666666666,
"value": {
"__uuid__": "b88522bd-8b6b-44a1-9c84-5518ae7f5c2c"
}
},
{
"frame": 0.25,
"value": {
"__uuid__": "69f1bd37-6628-4fd1-b0f2-08073d1edb29"
}
}
]
}
}
},
"events": []
}

View File

@ -1,5 +0,0 @@
{
"ver": "2.1.0",
"uuid": "02eba566-4d22-4fa7-99d7-f032f5845421",
"subMetas": {}
}

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -1 +1 @@
{"SubTexture":[{"y":50,"frameX":-2,"frameY":-2,"width":19,"frameWidth":23,"height":19,"name":"biu","frameHeight":22,"x":1},{"width":9,"y":50,"height":14,"name":"rightArm","x":42},{"y":34,"frameX":-6,"frameY":0,"width":20,"frameWidth":29,"height":32,"name":"yinmoqe00","frameHeight":32,"x":88},{"y":1,"frameX":0,"frameY":0,"width":33,"frameWidth":34,"height":39,"name":"body","frameHeight":41,"x":53},{"width":9,"y":56,"height":13,"name":"rightShoulder","x":74},{"y":50,"frameX":0,"frameY":0,"width":18,"frameWidth":19,"height":17,"name":"rightFrontArm","frameHeight":18,"x":22},{"width":14,"y":50,"height":14,"name":"rightHand","x":110},{"width":12,"y":42,"height":12,"name":"leftArm","x":74},{"width":13,"y":66,"height":12,"name":"leftShoulder","x":110},{"y":42,"frameX":-1,"frameY":0,"width":19,"frameWidth":20,"height":21,"name":"leftFrontArm","frameHeight":21,"x":53},{"width":50,"y":1,"height":47,"name":"head2","x":1},{"y":1,"frameX":-1,"frameY":0,"width":32,"frameWidth":33,"height":31,"name":"head","frameHeight":32,"x":88},{"width":16,"y":34,"height":14,"name":"leftHand","x":110},{"y":1,"frameX":-2,"frameY":-3,"width":2,"frameWidth":8,"height":2,"name":"huomiao01","frameHeight":8,"x":122}],"width":128,"height":128,"name":"SoldierWaterGhost","imagePath":"SoldierWaterGhost_tex.png"}
{"imagePath":"SoldierWaterGhost_tex.png","width":64,"height":64,"name":"SoldierWaterGhost","SubTexture":[{"frameY":-1,"y":27,"frameWidth":12,"frameHeight":11,"width":10,"height":10,"name":"biu","frameX":-1,"x":1},{"width":5,"y":23,"height":7,"name":"rightArm","x":40},{"frameY":0,"y":19,"frameWidth":15,"frameHeight":16,"width":10,"height":16,"name":"yinmoqe00","frameX":-3,"x":47},{"frameY":0,"y":1,"frameWidth":17,"frameHeight":21,"width":17,"height":20,"name":"body","frameX":0,"x":28},{"width":5,"y":37,"height":7,"name":"rightShoulder","x":42},{"frameY":0,"y":27,"frameWidth":10,"frameHeight":9,"width":9,"height":9,"name":"rightFrontArm","frameX":0,"x":13},{"width":7,"y":38,"height":7,"name":"rightHand","x":13},{"width":6,"y":36,"height":6,"name":"leftArm","x":34},{"width":7,"y":39,"height":6,"name":"leftShoulder","x":1},{"frameY":0,"y":23,"frameWidth":10,"frameHeight":11,"width":10,"height":11,"name":"leftFrontArm","frameX":-1,"x":28},{"width":25,"y":1,"height":24,"name":"head2","x":1},{"frameY":0,"y":1,"frameWidth":17,"frameHeight":16,"width":16,"height":16,"name":"head","frameX":-1,"x":47},{"width":8,"y":36,"height":7,"name":"leftHand","x":24},{"frameY":-2,"y":32,"frameWidth":4,"frameHeight":4,"width":1,"height":1,"name":"huomiao01","frameX":-1,"x":42}]}

View File

@ -1,7 +1,7 @@
{
"ver": "1.0.0",
"uuid": "e9e703e9-3589-4713-b889-28b23406d220",
"atlasJson": "{\"SubTexture\":[{\"y\":50,\"frameX\":-2,\"frameY\":-2,\"width\":19,\"frameWidth\":23,\"height\":19,\"name\":\"biu\",\"frameHeight\":22,\"x\":1},{\"width\":9,\"y\":50,\"height\":14,\"name\":\"rightArm\",\"x\":42},{\"y\":34,\"frameX\":-6,\"frameY\":0,\"width\":20,\"frameWidth\":29,\"height\":32,\"name\":\"yinmoqe00\",\"frameHeight\":32,\"x\":88},{\"y\":1,\"frameX\":0,\"frameY\":0,\"width\":33,\"frameWidth\":34,\"height\":39,\"name\":\"body\",\"frameHeight\":41,\"x\":53},{\"width\":9,\"y\":56,\"height\":13,\"name\":\"rightShoulder\",\"x\":74},{\"y\":50,\"frameX\":0,\"frameY\":0,\"width\":18,\"frameWidth\":19,\"height\":17,\"name\":\"rightFrontArm\",\"frameHeight\":18,\"x\":22},{\"width\":14,\"y\":50,\"height\":14,\"name\":\"rightHand\",\"x\":110},{\"width\":12,\"y\":42,\"height\":12,\"name\":\"leftArm\",\"x\":74},{\"width\":13,\"y\":66,\"height\":12,\"name\":\"leftShoulder\",\"x\":110},{\"y\":42,\"frameX\":-1,\"frameY\":0,\"width\":19,\"frameWidth\":20,\"height\":21,\"name\":\"leftFrontArm\",\"frameHeight\":21,\"x\":53},{\"width\":50,\"y\":1,\"height\":47,\"name\":\"head2\",\"x\":1},{\"y\":1,\"frameX\":-1,\"frameY\":0,\"width\":32,\"frameWidth\":33,\"height\":31,\"name\":\"head\",\"frameHeight\":32,\"x\":88},{\"width\":16,\"y\":34,\"height\":14,\"name\":\"leftHand\",\"x\":110},{\"y\":1,\"frameX\":-2,\"frameY\":-3,\"width\":2,\"frameWidth\":8,\"height\":2,\"name\":\"huomiao01\",\"frameHeight\":8,\"x\":122}],\"width\":128,\"height\":128,\"name\":\"SoldierWaterGhost\",\"imagePath\":\"SoldierWaterGhost_tex.png\"}",
"atlasJson": "{\"imagePath\":\"SoldierWaterGhost_tex.png\",\"width\":64,\"height\":64,\"name\":\"SoldierWaterGhost\",\"SubTexture\":[{\"frameY\":-1,\"y\":27,\"frameWidth\":12,\"frameHeight\":11,\"width\":10,\"height\":10,\"name\":\"biu\",\"frameX\":-1,\"x\":1},{\"width\":5,\"y\":23,\"height\":7,\"name\":\"rightArm\",\"x\":40},{\"frameY\":0,\"y\":19,\"frameWidth\":15,\"frameHeight\":16,\"width\":10,\"height\":16,\"name\":\"yinmoqe00\",\"frameX\":-3,\"x\":47},{\"frameY\":0,\"y\":1,\"frameWidth\":17,\"frameHeight\":21,\"width\":17,\"height\":20,\"name\":\"body\",\"frameX\":0,\"x\":28},{\"width\":5,\"y\":37,\"height\":7,\"name\":\"rightShoulder\",\"x\":42},{\"frameY\":0,\"y\":27,\"frameWidth\":10,\"frameHeight\":9,\"width\":9,\"height\":9,\"name\":\"rightFrontArm\",\"frameX\":0,\"x\":13},{\"width\":7,\"y\":38,\"height\":7,\"name\":\"rightHand\",\"x\":13},{\"width\":6,\"y\":36,\"height\":6,\"name\":\"leftArm\",\"x\":34},{\"width\":7,\"y\":39,\"height\":6,\"name\":\"leftShoulder\",\"x\":1},{\"frameY\":0,\"y\":23,\"frameWidth\":10,\"frameHeight\":11,\"width\":10,\"height\":11,\"name\":\"leftFrontArm\",\"frameX\":-1,\"x\":28},{\"width\":25,\"y\":1,\"height\":24,\"name\":\"head2\",\"x\":1},{\"frameY\":0,\"y\":1,\"frameWidth\":17,\"frameHeight\":16,\"width\":16,\"height\":16,\"name\":\"head\",\"frameX\":-1,\"x\":47},{\"width\":8,\"y\":36,\"height\":7,\"name\":\"leftHand\",\"x\":24},{\"frameY\":-2,\"y\":32,\"frameWidth\":4,\"frameHeight\":4,\"width\":1,\"height\":1,\"name\":\"huomiao01\",\"frameX\":-1,\"x\":42}]}",
"texture": "def168c3-3f07-43f9-a460-36b397c70a57",
"subMetas": {}
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.8 KiB

After

Width:  |  Height:  |  Size: 4.6 KiB

View File

@ -16,14 +16,14 @@
"trimType": "auto",
"trimThreshold": 1,
"rotated": false,
"offsetX": -0.5,
"offsetY": 24.5,
"offsetX": 0,
"offsetY": 9,
"trimX": 1,
"trimY": 1,
"width": 125,
"height": 77,
"rawWidth": 128,
"rawHeight": 128,
"width": 62,
"height": 44,
"rawWidth": 64,
"rawHeight": 64,
"borderTop": 0,
"borderBottom": 0,
"borderLeft": 0,

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -1 +1 @@
{"width":128,"SubTexture":[{"frameWidth":23,"y":44,"frameHeight":22,"width":22,"frameX":-1,"height":22,"name":"biu","frameY":0,"x":53},{"width":9,"y":68,"height":14,"name":"rightArm","x":76},{"frameWidth":29,"y":35,"frameHeight":32,"width":26,"frameX":-1,"height":32,"name":"yinmoqe00","frameY":0,"x":89},{"width":34,"y":1,"height":41,"name":"body","x":53},{"width":9,"y":44,"height":13,"name":"rightShoulder","x":77},{"width":19,"y":50,"height":18,"name":"rightFrontArm","x":23},{"width":14,"y":70,"height":14,"name":"rightHand","x":23},{"width":12,"y":68,"height":12,"name":"leftArm","x":62},{"width":13,"y":73,"height":12,"name":"leftShoulder","x":1},{"width":20,"y":50,"height":21,"name":"leftFrontArm","x":1},{"width":33,"y":1,"height":32,"name":"head","x":89},{"width":50,"y":1,"height":47,"name":"head2","x":1},{"width":16,"y":68,"height":14,"name":"leftHand","x":44},{"frameWidth":8,"y":59,"frameHeight":8,"width":4,"frameX":-1,"height":4,"name":"huomiao01","frameY":-2,"x":77}],"height":128,"name":"SoldierFireGhost","imagePath":"SoldierFireGhost_tex.png"}
{"width":64,"imagePath":"SoldierFireGhost_tex.png","SubTexture":[{"frameWidth":12,"y":42,"frameHeight":11,"width":11,"frameX":-1,"height":11,"name":"biu","frameY":0,"x":16},{"width":5,"y":42,"height":7,"name":"rightArm","x":29},{"frameWidth":15,"y":27,"frameHeight":16,"width":13,"frameX":-1,"height":16,"name":"yinmoqe00","frameY":0,"x":1},{"width":17,"y":1,"height":21,"name":"body","x":28},{"width":5,"y":42,"height":7,"name":"rightShoulder","x":36},{"width":10,"y":45,"height":9,"name":"rightFrontArm","x":1},{"width":7,"y":56,"height":7,"name":"rightHand","x":1},{"width":6,"y":55,"height":6,"name":"leftArm","x":32},{"width":7,"y":55,"height":6,"name":"leftShoulder","x":23},{"width":10,"y":27,"height":11,"name":"leftFrontArm","x":16},{"width":17,"y":24,"height":16,"name":"head","x":28},{"width":25,"y":1,"height":24,"name":"head2","x":1},{"width":8,"y":55,"height":7,"name":"leftHand","x":13},{"frameWidth":4,"y":51,"frameHeight":4,"width":2,"frameX":-1,"height":2,"name":"huomiao01","frameY":-1,"x":29}],"height":64,"name":"SoldierFireGhost"}

View File

@ -1,7 +1,7 @@
{
"ver": "1.0.0",
"uuid": "4a9187d5-a9ad-4464-a03c-d2f3cc277051",
"atlasJson": "{\"width\":128,\"SubTexture\":[{\"frameWidth\":23,\"y\":44,\"frameHeight\":22,\"width\":22,\"frameX\":-1,\"height\":22,\"name\":\"biu\",\"frameY\":0,\"x\":53},{\"width\":9,\"y\":68,\"height\":14,\"name\":\"rightArm\",\"x\":76},{\"frameWidth\":29,\"y\":35,\"frameHeight\":32,\"width\":26,\"frameX\":-1,\"height\":32,\"name\":\"yinmoqe00\",\"frameY\":0,\"x\":89},{\"width\":34,\"y\":1,\"height\":41,\"name\":\"body\",\"x\":53},{\"width\":9,\"y\":44,\"height\":13,\"name\":\"rightShoulder\",\"x\":77},{\"width\":19,\"y\":50,\"height\":18,\"name\":\"rightFrontArm\",\"x\":23},{\"width\":14,\"y\":70,\"height\":14,\"name\":\"rightHand\",\"x\":23},{\"width\":12,\"y\":68,\"height\":12,\"name\":\"leftArm\",\"x\":62},{\"width\":13,\"y\":73,\"height\":12,\"name\":\"leftShoulder\",\"x\":1},{\"width\":20,\"y\":50,\"height\":21,\"name\":\"leftFrontArm\",\"x\":1},{\"width\":33,\"y\":1,\"height\":32,\"name\":\"head\",\"x\":89},{\"width\":50,\"y\":1,\"height\":47,\"name\":\"head2\",\"x\":1},{\"width\":16,\"y\":68,\"height\":14,\"name\":\"leftHand\",\"x\":44},{\"frameWidth\":8,\"y\":59,\"frameHeight\":8,\"width\":4,\"frameX\":-1,\"height\":4,\"name\":\"huomiao01\",\"frameY\":-2,\"x\":77}],\"height\":128,\"name\":\"SoldierFireGhost\",\"imagePath\":\"SoldierFireGhost_tex.png\"}",
"atlasJson": "{\"width\":64,\"imagePath\":\"SoldierFireGhost_tex.png\",\"SubTexture\":[{\"frameWidth\":12,\"y\":42,\"frameHeight\":11,\"width\":11,\"frameX\":-1,\"height\":11,\"name\":\"biu\",\"frameY\":0,\"x\":16},{\"width\":5,\"y\":42,\"height\":7,\"name\":\"rightArm\",\"x\":29},{\"frameWidth\":15,\"y\":27,\"frameHeight\":16,\"width\":13,\"frameX\":-1,\"height\":16,\"name\":\"yinmoqe00\",\"frameY\":0,\"x\":1},{\"width\":17,\"y\":1,\"height\":21,\"name\":\"body\",\"x\":28},{\"width\":5,\"y\":42,\"height\":7,\"name\":\"rightShoulder\",\"x\":36},{\"width\":10,\"y\":45,\"height\":9,\"name\":\"rightFrontArm\",\"x\":1},{\"width\":7,\"y\":56,\"height\":7,\"name\":\"rightHand\",\"x\":1},{\"width\":6,\"y\":55,\"height\":6,\"name\":\"leftArm\",\"x\":32},{\"width\":7,\"y\":55,\"height\":6,\"name\":\"leftShoulder\",\"x\":23},{\"width\":10,\"y\":27,\"height\":11,\"name\":\"leftFrontArm\",\"x\":16},{\"width\":17,\"y\":24,\"height\":16,\"name\":\"head\",\"x\":28},{\"width\":25,\"y\":1,\"height\":24,\"name\":\"head2\",\"x\":1},{\"width\":8,\"y\":55,\"height\":7,\"name\":\"leftHand\",\"x\":13},{\"frameWidth\":4,\"y\":51,\"frameHeight\":4,\"width\":2,\"frameX\":-1,\"height\":2,\"name\":\"huomiao01\",\"frameY\":-1,\"x\":29}],\"height\":64,\"name\":\"SoldierFireGhost\"}",
"texture": "700d963b-2192-4219-a066-8be5b3db7453",
"subMetas": {}
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 8.3 KiB

After

Width:  |  Height:  |  Size: 5.3 KiB

View File

@ -16,14 +16,14 @@
"trimType": "auto",
"trimThreshold": 1,
"rotated": false,
"offsetX": -2.5,
"offsetY": 21,
"offsetX": -9,
"offsetY": 0,
"trimX": 1,
"trimY": 1,
"width": 121,
"height": 84,
"rawWidth": 128,
"rawHeight": 128,
"width": 44,
"height": 62,
"rawWidth": 64,
"rawHeight": 64,
"borderTop": 0,
"borderBottom": 0,
"borderLeft": 0,

View File

@ -33,14 +33,14 @@
"_active": true,
"_components": [
{
"__id__": 22
"__id__": 19
},
{
"__id__": 23
"__id__": 20
}
],
"_prefab": {
"__id__": 24
"__id__": 21
},
"_opacity": 255,
"_color": {
@ -490,15 +490,12 @@
},
{
"__id__": 15
},
{
"__id__": 18
}
],
"_active": true,
"_components": [],
"_prefab": {
"__id__": 21
"__id__": 18
},
"_opacity": 255,
"_color": {
@ -549,7 +546,7 @@
},
{
"__type__": "cc.Node",
"_name": "SoldierElf",
"_name": "SoldierFireGhost",
"_objFlags": 0,
"_parent": {
"__id__": 11
@ -624,13 +621,13 @@
"__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432"
}
],
"_armatureName": "SoldierElf",
"_armatureName": "SoldierFireGhost",
"_animationName": "Idle1",
"_preCacheMode": 0,
"_cacheMode": 0,
"playTimes": -1,
"premultipliedAlpha": false,
"_armatureKey": "affcd973-4743-48e5-9bcd-339180a6101b#24d7bb8f-577c-4e5d-b730-56613ca8685d",
"_armatureKey": "36230012-8df3-4e85-afad-76ec47d0e4d7#4a9187d5-a9ad-4464-a03c-d2f3cc277051",
"_accTime": 0,
"_playCount": 0,
"_frameCache": null,
@ -638,17 +635,17 @@
"_playing": false,
"_armatureCache": null,
"_N$dragonAsset": {
"__uuid__": "affcd973-4743-48e5-9bcd-339180a6101b"
"__uuid__": "36230012-8df3-4e85-afad-76ec47d0e4d7"
},
"_N$dragonAtlasAsset": {
"__uuid__": "24d7bb8f-577c-4e5d-b730-56613ca8685d"
"__uuid__": "4a9187d5-a9ad-4464-a03c-d2f3cc277051"
},
"_N$_defaultArmatureIndex": 0,
"_N$_animationIndex": 1,
"_N$_animationIndex": 8,
"_N$_defaultCacheMode": 0,
"_N$timeScale": 1,
"_N$debugBones": false,
"_N$enableBatch": true,
"_N$enableBatch": false,
"_id": ""
},
{
@ -659,12 +656,12 @@
"asset": {
"__uuid__": "59bff7a2-23e1-4d69-bce7-afb37eae196a"
},
"fileId": "3fs20Yd8dIO68/1Wx2oVLh",
"fileId": "a8ZUEyoP1Ec5azSkL7Z/9h",
"sync": false
},
{
"__type__": "cc.Node",
"_name": "SoldierFireGhost",
"_name": "SoldierWaterGhost",
"_objFlags": 0,
"_parent": {
"__id__": 11
@ -739,128 +736,13 @@
"__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432"
}
],
"_armatureName": "SoldierFireGhost",
"_animationName": "Idle1",
"_preCacheMode": 0,
"_cacheMode": 0,
"playTimes": -1,
"premultipliedAlpha": false,
"_armatureKey": "36230012-8df3-4e85-afad-76ec47d0e4d7#4a9187d5-a9ad-4464-a03c-d2f3cc277051",
"_accTime": 0,
"_playCount": 0,
"_frameCache": null,
"_curFrame": null,
"_playing": false,
"_armatureCache": null,
"_N$dragonAsset": {
"__uuid__": "36230012-8df3-4e85-afad-76ec47d0e4d7"
},
"_N$dragonAtlasAsset": {
"__uuid__": "4a9187d5-a9ad-4464-a03c-d2f3cc277051"
},
"_N$_defaultArmatureIndex": 0,
"_N$_animationIndex": 8,
"_N$_defaultCacheMode": 0,
"_N$timeScale": 1,
"_N$debugBones": false,
"_N$enableBatch": true,
"_id": ""
},
{
"__type__": "cc.PrefabInfo",
"root": {
"__id__": 1
},
"asset": {
"__uuid__": "59bff7a2-23e1-4d69-bce7-afb37eae196a"
},
"fileId": "a8ZUEyoP1Ec5azSkL7Z/9h",
"sync": false
},
{
"__type__": "cc.Node",
"_name": "SoldierWaterGhost",
"_objFlags": 0,
"_parent": {
"__id__": 11
},
"_children": [],
"_active": false,
"_components": [
{
"__id__": 19
}
],
"_prefab": {
"__id__": 20
},
"_opacity": 255,
"_color": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 255
},
"_contentSize": {
"__type__": "cc.Size",
"width": 0,
"height": 0
},
"_anchorPoint": {
"__type__": "cc.Vec2",
"x": 0.5,
"y": 0.5
},
"_trs": {
"__type__": "TypedArray",
"ctor": "Float64Array",
"array": [
0,
0,
0,
0,
0,
0,
1,
1,
1,
1
]
},
"_eulerAngles": {
"__type__": "cc.Vec3",
"x": 0,
"y": 0,
"z": 0
},
"_skewX": 0,
"_skewY": 0,
"_is3DNode": false,
"_groupIndex": 0,
"groupIndex": 0,
"_id": ""
},
{
"__type__": "dragonBones.ArmatureDisplay",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 18
},
"_enabled": true,
"_materials": [
{
"__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432"
}
],
"_armatureName": "SoldierWaterGhost",
"_animationName": "Idle1",
"_preCacheMode": 0,
"_cacheMode": 0,
"playTimes": -1,
"premultipliedAlpha": false,
"_armatureKey": "a9d7bbc2-134b-4eb4-ba16-6541f3e51e06#e9e703e9-3589-4713-b889-28b23406d220",
"_armatureKey": "2ae76843-1f61-48cf-bbfb-384c0dcf77e1#e9e703e9-3589-4713-b889-28b23406d220",
"_accTime": 0,
"_playCount": 0,
"_frameCache": null,
@ -868,7 +750,7 @@
"_playing": false,
"_armatureCache": null,
"_N$dragonAsset": {
"__uuid__": "a9d7bbc2-134b-4eb4-ba16-6541f3e51e06"
"__uuid__": "2ae76843-1f61-48cf-bbfb-384c0dcf77e1"
},
"_N$dragonAtlasAsset": {
"__uuid__": "e9e703e9-3589-4713-b889-28b23406d220"
@ -878,7 +760,7 @@
"_N$_defaultCacheMode": 0,
"_N$timeScale": 1,
"_N$debugBones": false,
"_N$enableBatch": true,
"_N$enableBatch": false,
"_id": ""
},
{

View File

@ -440,7 +440,7 @@
"array": [
0,
0,
216.50635094610968,
217.3664391206006,
0,
0,
0,

View File

@ -191,8 +191,8 @@
0,
0,
1,
1,
1,
2,
2,
1
]
},
@ -454,7 +454,7 @@
"array": [
0,
0,
216.50635094610968,
217.3664391206006,
0,
0,
0,

View File

@ -12,8 +12,14 @@ for (let k in window.ATK_CHARACTER_STATE) {
window.ATK_CHARACTER_STATE_ARR.push(window.ATK_CHARACTER_STATE[k]);
}
window.ATK_CHARACTER_STATE_INTERRUPT_WAIVE_SET = new Set();
window.ATK_CHARACTER_STATE_INTERRUPT_WAIVE_SET.add(window.ATK_CHARACTER_STATE.Idle1[0]);
window.ATK_CHARACTER_STATE_INTERRUPT_WAIVE_SET.add(window.ATK_CHARACTER_STATE.Walking[0]);
/*
Kindly note that the use of dragonBones anim is an informed choice for the feasibility of "gotoAndPlayByFrame", which is a required feature by "Map.rollbackAndChase". You might find that "cc.Animation" -- the traditional frame animation -- can also suffice this requirement, yet if we want to develop 3D frontend in the future, working with skeletal animation will make a smoother transition.
Kindly note that the use of dragonBones anim is an informed choice for the feasibility of "gotoAndPlayByFrame", which is a required feature by "Map.rollbackAndChase". You might find that "cc.Animation" -- the traditional frame anim -- can also suffice this requirement, yet if we want to develop 3D frontend in the future, working with skeletal anim will make a smoother transition.
Moreover, frame anim doesn't support "compositie playing" and consumes more memory (yet less CPU) than a same skeletal anim, thus should only be used properly.
I've also spent sometime in extending "ccc wrapped dragoneBones.ArmatureDisplay" for enabling "gotoAndPlayByFrame" in CACHE mode (in REALTIME mode it's just the same as what's done here), but the debugging is an unexpected brainteaser -- not worth the time.
*/
@ -35,17 +41,20 @@ cc.Class({
setSpecies(speciesName) {
this.speciesName = speciesName;
this.effAnimNode = this.animNode.getChildByName(this.speciesName);
this.animComp = this.effAnimNode.getComponent(dragonBones.ArmatureDisplay);
this.animComp.playAnimation(ATK_CHARACTER_STATE.Idle1[1]); // [WARNING] This is the only exception ccc's wrapper is used!
this.effAnimNode.active = true;
},
onLoad() {
BaseCharacter.prototype.onLoad.call(this);
this.effAnimNode = this.animNode.getChildByName(this.speciesName);
this.animComp = this.effAnimNode.getComponent(dragonBones.ArmatureDisplay);
if (!this.animComp) {
this.animComp = this.effAnimNode.getComponent(cc.Animation);
}
this.effAnimNode.active = true;
},
updateCharacterAnim(rdfPlayer, prevRdfPlayer, forceAnimSwitch) {
if (this.animComp instanceof dragonBones.ArmatureDisplay) {
const underlyingAnimationCtrl = this.animComp._armature.animation; // ALWAYS use the dragonBones api instead of ccc's wrapper!
// Update directions
if (this.animComp && this.animComp.node) {
@ -58,36 +67,39 @@ cc.Class({
// Update per character state
let newCharacterState = rdfPlayer.characterState;
let prevCharacterState = (null == prevRdfPlayer ? window.ATK_CHARACTER_STATE.Idle1[0] : prevRdfPlayer.characterState);
const newAnimName = window.ATK_CHARACTER_STATE_ARR[newCharacterState][1];
const playingAnimName = underlyingAnimationCtrl.lastAnimationName;
const isPlaying = underlyingAnimationCtrl.isPlaying;
// As this function might be called after many frames of a rollback, it's possible that the playing animation was predicted, different from "prevCharacterState" but same as "newCharacterState". More granular checks are needed to determine whether we should interrupt the playing animation.
if (newCharacterState != prevCharacterState) {
if (newAnimName == playingAnimName) {
if (ATK_CHARACTER_STATE.Idle1[0] == newCharacterState || ATK_CHARACTER_STATE.Walking[0] == newCharacterState) {
// As this function might be called after many frames of a rollback, it's possible that the playing animation was predicted, different from "prevRdfPlayer.characterState" but same as "newCharacterState". More granular checks are needed to determine whether we should interrupt the playing animation.
// It turns out that "prevRdfPlayer.characterState" is not useful in this function :)
if (newAnimName == playingAnimName && window.ATK_CHARACTER_STATE_INTERRUPT_WAIVE_SET.has(newCharacterState)) {
// No need to interrupt
// console.warn(`JoinIndex=${rdfPlayer.joinIndex}, not interrupting ${newAnimName} while the playing anim is also ${playingAnimName}, player rdf changed from: ${null == prevRdfPlayer ? null : JSON.stringify(prevRdfPlayer)}, , to: ${JSON.stringify(rdfPlayer)}`);
return;
}
}
this._interruptPlayingAnimAndPlayNewAnim(rdfPlayer, prevRdfPlayer, newCharacterState, newAnimName, underlyingAnimationCtrl);
} else {
// newCharacterState == prevCharacterState
if (newAnimName != playingAnimName) {
// the playing animation was falsely predicted
this._interruptPlayingAnimAndPlayNewAnim(rdfPlayer, prevRdfPlayer, newCharacterState, newAnimName, underlyingAnimationCtrl);
} else {
if (!(ATK_CHARACTER_STATE.Idle1[0] == newCharacterState || ATK_CHARACTER_STATE.Walking[0] == newCharacterState)) {
// yet there's still a chance that the playing anim is not put at the current frame
this._interruptPlayingAnimAndPlayNewAnim(rdfPlayer, prevRdfPlayer, newCharacterState, newAnimName, underlyingAnimationCtrl);
}
}
this._interruptPlayingAnimAndPlayNewAnimDragonBones(rdfPlayer, prevRdfPlayer, newCharacterState, newAnimName, underlyingAnimationCtrl);
}
},
_interruptPlayingAnimAndPlayNewAnim(rdfPlayer, prevRdfPlayer, newCharacterState, newAnimName, underlyingAnimationCtrl) {
_interruptPlayingAnimAndPlayNewAnimFrame(rdfPlayer, prevRdfPlayer, newCharacterState, newAnimName, underlyingAnimationCtrl) {
if (window.ATK_CHARACTER_STATE_INTERRUPT_WAIVE_SET.has(newCharacterState)) {
// No "framesToRecover"
// console.warn(`JoinIndex=${rdfPlayer.joinIndex}, playing new ${newAnimName} from the beginning: while the playing anim is ${playAnimation}, player rdf changed from: ${null == prevRdfPlayer ? null : JSON.stringify(prevRdfPlayer)}, , to: ${JSON.stringify(rdfPlayer)}`);
underlyingAnimationCtrl.gotoAndPlayByFrame(newAnimName, 0, -1);
return;
}
const animationData = underlyingAnimationCtrl._animations[newAnimName];
let fromAnimFrame = (animationData.frameCount - rdfPlayer.framesToRecover);
if (fromAnimFrame > 0) {
} else if (fromAnimFrame < 0) {
// For Atk1 or Atk2, it's possible that the "meleeBullet.recoveryFrames" is configured to be slightly larger than corresponding animation duration frames
fromAnimFrame = 0;
}
underlyingAnimationCtrl.gotoAndPlayByFrame(newAnimName, fromAnimFrame, 1);
},
_interruptPlayingAnimAndPlayNewAnimDragonBones(rdfPlayer, prevRdfPlayer, newCharacterState, newAnimName, underlyingAnimationCtrl) {
if (ATK_CHARACTER_STATE.Idle1[0] == newCharacterState || ATK_CHARACTER_STATE.Walking[0] == newCharacterState) {
// No "framesToRecover"
// console.warn(`JoinIndex=${rdfPlayer.joinIndex}, playing new ${newAnimName} from the beginning: while the playing anim is ${playAnimation}, player rdf changed from: ${null == prevRdfPlayer ? null : JSON.stringify(prevRdfPlayer)}, , to: ${JSON.stringify(rdfPlayer)}`);

View File

@ -42,25 +42,25 @@ cc.Class({
self.meleeSkillConfig = {
1: {
// for offender
startupFrames: 23,
startupFrames: 10,
activeFrames: 3,
recoveryFrames: 61, // usually but not always "startupFrames+activeFrames", I hereby set it to be 1 frame more than the actual animation to avoid critical transition, i.e. when the animation is 1 frame from ending but "rdfPlayer.framesToRecover" is already counted 0 and the player triggers an other same attack, making an effective bullet trigger but no animation is played due to same animName is still playing
recoveryFramesOnBlock: 61,
recoveryFramesOnHit: 61,
recoveryFrames: 34, // usually but not always "startupFrames+activeFrames", I hereby set it to be 1 frame more than the actual animation to avoid critical transition, i.e. when the animation is 1 frame from ending but "rdfPlayer.framesToRecover" is already counted 0 and the player triggers an other same attack, making an effective bullet trigger but no animation is played due to same animName is still playing
recoveryFramesOnBlock: 34,
recoveryFramesOnHit: 34,
moveforward: {
x: 0,
y: 0,
},
hitboxOffset: 12.0, // should be about the radius of the PlayerCollider
hitboxSize: {
x: 45.0,
y: 32.0,
x: 23.0,
y: 20.0,
},
// for defender
hitStunFrames: 18,
blockStunFrames: 9,
pushback: 11.0,
pushback: 8.0,
releaseTriggerType: 1, // 1: rising-edge, 2: falling-edge
damage: 5
}