Progressing fixes

This commit is contained in:
ThomasCharester committed 2026-11-01 20:52:59 +03:00
1 parent d00ce7bb0e
commit 0619ada74f
62 files changed
+81418 -72853

No files matched your search

@@ -2,6 +2,7 @@ using System.Linq;
using Code.Infrastructure.Utils;
using Code.OfficeGame.BattleMode.Actions.Deciders;
using Code.OfficeGame.BattleMode.HitBoxes;
using Code.OfficeGame.BattleMode.Timeline;
using UnityEngine;
namespace Code.OfficeGame.BattleMode.Actions.Attacks
@@ -46,7 +47,7 @@ namespace Code.OfficeGame.BattleMode.Actions.Attacks
if (actionData.CurrentFrame >= _attackData.HitboxStartFrame
&& actionData.CurrentFrame <= _attackData.HitboxEndFrame)
{
entity.EntityHitBoxes.CheckHitsForCurrentFrame(OnEnemyHit, HitBoxPartType.LArm);
entity.EntityHitBoxes.CheckHitsForCurrentFrame(OnEnemyHit, _attackData.AttackingBodyPart);
}
if (actionData.CurrentFrame >= _attackData.TotalFrames)
@@ -75,7 +76,12 @@ namespace Code.OfficeGame.BattleMode.Actions.Attacks
private void OnEnemyHit(Collider enemyCollider)
{
Debug.Log($"Попадание в {enemyCollider.name}! Урон: {_attackData.Damage}");
var originEntityId = enemyCollider.GetComponentInParent<EntityProperties>().GetEntityId();
var actionData = new StuggerActionData { TotalFrames = _attackData.StuggerFrames};
var decisionResult = new AsIsBattleActionDeciderResult {ActionType = BattleActionType.Stugger};
BattleTimeline.ForceDecideAction(originEntityId, actionData, decisionResult);
}
}
}