做不出来
This commit is contained in:
@@ -117,7 +117,7 @@ namespace Cielonos.MainGame
|
||||
{
|
||||
public void Update()
|
||||
{
|
||||
if (!isEnabling || currentHitIndex >= originalHitCount - 1 || attackArea.timeSm.delayTime > 0)
|
||||
if (!isEnabling || currentHitIndex >= originalHitCount || attackArea.timeSm.delayTime > 0)
|
||||
{
|
||||
return;
|
||||
}
|
||||
@@ -134,7 +134,7 @@ namespace Cielonos.MainGame
|
||||
currentHitIndex++;
|
||||
}
|
||||
|
||||
if (currentHitIndex >= originalHitCount - 1)
|
||||
if (currentHitIndex >= originalHitCount)
|
||||
{
|
||||
attackArea.isEnabling = false;
|
||||
}
|
||||
|
||||
@@ -57,11 +57,11 @@ namespace Cielonos.MainGame
|
||||
}
|
||||
});
|
||||
|
||||
this.reactionGraceBefore = 0.1f;
|
||||
this.reactionGraceBefore = 0f;
|
||||
}
|
||||
|
||||
public TimeSubmodule(AttackAreaBase attackArea, float lifeTime, float delayTime, float enableTime,
|
||||
Action enableAction, Action timeOutAction, float graceBefore = 0.1f) : base(attackArea)
|
||||
Action enableAction, Action timeOutAction, float graceBefore = 0f) : base(attackArea)
|
||||
{
|
||||
this.isEnabling = true;
|
||||
this.lifeTime = lifeTime;
|
||||
@@ -118,6 +118,14 @@ namespace Cielonos.MainGame
|
||||
return true;
|
||||
}
|
||||
|
||||
// 过渡帧桥接:delay 刚结束(delayTime 被扣至 <=0),但 enable 阶段尚未在下一帧
|
||||
// 的 timeSm.Update() 中激活。此帧 isEnabling 为 false 且 delayTime 不再 >0,
|
||||
// 若不补此条件会导致 1 帧的反应窗口真空,玩家的完美闪避/格挡可能被跳过。
|
||||
if (reactionGraceBefore > 0f && delayTime <= 0f && !hasInvokedEnableAction)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user