You fix some, you brake some

This commit is contained in:
ThomasCharester committed 2026-11-10 15:38:19 +03:00
1 parent d810ea00b6
commit 1a75cf8461
778 files changed
+203405 -86541

No files matched your search

@@ -72,6 +72,7 @@ namespace Code.OfficeGame.BattleMode.Actions
data.Corners = new[] { startPos, validTarget };
data.CurrentCornerIndex = 1;
data.TotalFrames = CalculatePathFrames(data.Corners, entity.MovementController);
return data;
}
@@ -95,6 +96,17 @@ namespace Code.OfficeGame.BattleMode.Actions
return data;
}
public override void Finish(EntityProperties entity, BattleActionData actionData, BattleActionDecisionResult result)
{
entity.KinematicCharacterMotor.BaseVelocity = Vector3.zero;
entity.MovementController.Freeze = true;
entity.MovementController.InternalVelocityAdd = Vector3.zero;
entity.MovementController.MoveInputVector = Vector3.zero;
Debug.Log($"{entity.GetEntityId()} is frozen");
}
public override void Tick(
float tickDelta,
EntityProperties entity,
@@ -110,6 +122,8 @@ namespace Code.OfficeGame.BattleMode.Actions
var movementController = entity.MovementController;
movementController.Freeze = false;
if (movementActionData.IsRotateOnly)
{
movementActionData.CurrentFrame++;
@@ -131,7 +145,6 @@ namespace Code.OfficeGame.BattleMode.Actions
{
entity.KinematicCharacterMotor.SetRotation(positionDecisionResult.Rotation);
battleActionData.Finished = true;
Debug.Log("Rotated");
}
return;
@@ -142,7 +155,6 @@ namespace Code.OfficeGame.BattleMode.Actions
entity.KinematicCharacterMotor.SetRotation(positionDecisionResult.Rotation);
StopMovementAndFinish(movementController);
battleActionData.Finished = true;
Debug.Log($"Corners {movementActionData.Corners == null} || Wrong index {movementActionData.CurrentCornerIndex >= movementActionData.Corners?.Length}");
return;
}
@@ -172,7 +184,6 @@ namespace Code.OfficeGame.BattleMode.Actions
StopMovementAndFinish(movementController);
battleActionData.Finished = true;
Debug.Log("Last corner");
return;
}
@@ -214,7 +225,6 @@ namespace Code.OfficeGame.BattleMode.Actions
{
entity.KinematicCharacterMotor.SetRotation(positionDecisionResult.Rotation);
StopMovementAndFinish(movementController);
Debug.Log("Very Last corner");
battleActionData.Finished = true;
}
}