Progressing fixes
This commit is contained in:
1 parent
d00ce7bb0e
commit
0619ada74f
62 files changed
+81418
-72853
No files matched your search
@@ -11,6 +11,8 @@ namespace Code.OfficeGame.BattleMode.Actions.Attacks
|
||||
public int HitboxEndFrame;
|
||||
|
||||
public HitBoxPartType AttackingBodyPart;
|
||||
|
||||
public int StuggerFrames;
|
||||
|
||||
public int Damage;
|
||||
}
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,5 +1,5 @@
|
||||
using Code.OfficeGame.BattleMode.Actions.Deciders;
|
||||
using UnityEngine;
|
||||
using Code.OfficeGame.BattleMode.Timeline;
|
||||
|
||||
namespace Code.OfficeGame.BattleMode.Actions
|
||||
{
|
||||
@@ -9,5 +9,8 @@ namespace Code.OfficeGame.BattleMode.Actions
|
||||
public abstract BattleActionType ActionType { get; }
|
||||
public abstract DeciderType DeciderType { get; }
|
||||
public abstract BattleActionData MountAndGetFrames(EntityProperties entity, BattleActionDecisionResult result);
|
||||
|
||||
protected BattleTimeline BattleTimeline;
|
||||
public void SetBattleTimeline(BattleTimeline battleTimeline) => BattleTimeline = battleTimeline;
|
||||
}
|
||||
}
|
||||
@@ -108,7 +108,6 @@ namespace Code.OfficeGame.BattleMode.Actions
|
||||
|
||||
private void StopMovementAndFinish(MovementController movementController)
|
||||
{
|
||||
Debug.Log("MovementFinished");
|
||||
var emptyInputs = new AICharacterInputs
|
||||
{
|
||||
MoveVector = Vector3.zero,
|
||||
|
||||
@@ -13,8 +13,7 @@ namespace Code.OfficeGame.BattleMode.Actions
|
||||
|
||||
private BattleActionParameters _actionParameters;
|
||||
|
||||
[Inject]
|
||||
public void Construct(MultipleConfig<BattleActionParameters> actionData)
|
||||
public BattleActionStugger(MultipleConfig<BattleActionParameters> actionData)
|
||||
{
|
||||
_actionParameters = actionData.Configs.SingleOrDefault(x => x.ActionType == ActionType);
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user