From 629687d366e0d84bf5f9c16e396dfca349c926c6 Mon Sep 17 00:00:00 2001 From: cd <-> Date: Fri, 9 Jun 2023 00:14:46 +0800 Subject: [PATCH] =?UTF-8?q?=E5=8D=A1=E5=B8=A7=E6=97=B6=E9=97=B4=E9=85=8D?= =?UTF-8?q?=E7=BD=AE=E6=94=B9=E4=B8=BA=E5=B8=A7=E6=95=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Game/Scripts/ECS/System/SettleSystem.cs | 15 +++++++-------- .../Timeline/skill_hero01_long_attack01.playable | 2 +- .../TimelineCustom/Attack/AttackBehaviour.cs | 2 +- 3 files changed, 9 insertions(+), 10 deletions(-) diff --git a/client/Assets/Game/Scripts/ECS/System/SettleSystem.cs b/client/Assets/Game/Scripts/ECS/System/SettleSystem.cs index 691758d..c390c56 100644 --- a/client/Assets/Game/Scripts/ECS/System/SettleSystem.cs +++ b/client/Assets/Game/Scripts/ECS/System/SettleSystem.cs @@ -77,10 +77,10 @@ public class SettleSystem : IExecuteSystem, IInitializeSystem var damageResult = SettleDamage(hitInfo, entity, target); //伤害结算 var hitLevel = SettleHitLevel(hitInfo, damageResult, entity, target); //命中效果等级 var flowSpeed = SettleFlowSpeed(hitInfo, hitLevel, entity, target); //强制位移(击退、击飞、击落等) + var pauseTime = SettlePause(hitInfo, hitLevel, entity, target); //卡帧 SettleSelfMoveForceScale(hitLevel, entity, target); //攻击者移动速度调整 SettleBreak(flowSpeed, hitLevel, damageResult, entity, target); //打断技能/动画 SettleBuff(hitLevel, entity, target); //添加硬直/击晕buff - SettlePause(hitInfo, hitLevel, entity, target); //卡帧 SettleTrigger(hitInfo, entity, target); //命中触发器 //纯表现 @@ -89,7 +89,7 @@ public class SettleSystem : IExecuteSystem, IInitializeSystem SettleFlash(hitLevel, entity, target); //闪白 SettleShake(hitLevel, entity, target); //抖动 SettleScale(flowSpeed, entity, target); //抖动 - SettleGlobalEffect(hitInfo, hitLevel, damageResult, entity, target); //全局特效 + SettleGlobalEffect(target, pauseTime); //全局特效 } if (skill.HitInfo.Count > 0) @@ -321,16 +321,16 @@ public class SettleSystem : IExecuteSystem, IInitializeSystem return flowSpeed; } - private static void SettlePause(SkillHitInfo hitInfo, EHitLevel hitLevel, GameEntity entity, GameEntity target) + private static float SettlePause(SkillHitInfo hitInfo, EHitLevel hitLevel, GameEntity entity, GameEntity target) { if (target.IsMaster()) { //主角受击不卡帧 - return; + return 0f; } var param = hitInfo.SkillParam; - var pauseTime = param.pauseTime; + var pauseTime = 1f * param.pauseTime / GameConst.FPS; if (hitLevel >= EHitLevel.ShieldBreak) { @@ -359,6 +359,7 @@ public class SettleSystem : IExecuteSystem, IInitializeSystem Util.EntityPause(entity, pauseTime); Util.EntityPause(target, pauseTime); + return pauseTime; } private static void SettleSelfMoveForceScale(EHitLevel hitLevel, GameEntity entity, GameEntity target) @@ -577,8 +578,7 @@ public class SettleSystem : IExecuteSystem, IInitializeSystem Util.EntityScale(target, dir); } - private static void SettleGlobalEffect(SkillHitInfo hitInfo, EHitLevel hitLevel, SettleDamageResult dmgResult, - GameEntity entity, GameEntity target) + private static void SettleGlobalEffect(GameEntity target, float pauseTime) { if (target.IsMaster()) { @@ -589,7 +589,6 @@ public class SettleSystem : IExecuteSystem, IInitializeSystem return; } - var pauseTime = hitInfo.SkillParam.pauseTime; if (pauseTime >= 0.1f) { Util.Shake(); diff --git a/client/Assets/Resources/Timeline/skill_hero01_long_attack01.playable b/client/Assets/Resources/Timeline/skill_hero01_long_attack01.playable index 55d44ba..874cf53 100644 --- a/client/Assets/Resources/Timeline/skill_hero01_long_attack01.playable +++ b/client/Assets/Resources/Timeline/skill_hero01_long_attack01.playable @@ -718,7 +718,7 @@ MonoBehaviour: damageRate: 1 stunRate: 1 staggerLevel: 2 - pauseTime: 0.05 + pauseTime: 20 hitId: 0 hitType: 0 Type: 2 diff --git a/client/Assets/TimelineCustom/Attack/AttackBehaviour.cs b/client/Assets/TimelineCustom/Attack/AttackBehaviour.cs index be7c739..e37452e 100644 --- a/client/Assets/TimelineCustom/Attack/AttackBehaviour.cs +++ b/client/Assets/TimelineCustom/Attack/AttackBehaviour.cs @@ -12,7 +12,7 @@ public class AttackBehaviour : PlayableBehaviour [Rename("伤害修正")] public float damageRate; [Rename("眩晕修正")] public float stunRate; [Rename("硬直等级")] public int staggerLevel = 2; - [Rename("卡帧时间")] public float pauseTime; + [Rename("卡帧时间(帧)")] public int pauseTime; [Rename("命中id")] public int hitId; //同一hitId视为一段伤害 [Rename("伤害类型")] public EHitType hitType; [Rename("命中形状")] public EShapeType Type;