Multiple entities

This commit is contained in:
ThomasCharester committed 2026-10-23 20:09:32 +03:00
1 parent ccc4c04234
commit 1de0e93ae0
5677 files changed
+364912 -919855

No files matched your search

@@ -1,7 +1,4 @@
using System.Threading;
using Code.Game.Gameplay.Player;
using Code.Infrastructure.Camera;
using Code.Infrastructure.Input;
using Code.OfficeGame.BattleMode.UI;
using Cysharp.Threading.Tasks;
using Reflex.Attributes;
@@ -9,21 +6,10 @@ using UnityEngine;
namespace Code.OfficeGame.BattleMode.Actions.Player
{
public class PlayerTimelineActor : EntityTimelineActor
public class PlayerControlledTimelineActor : EntityTimelineActor
{
[Inject] private BattleActionDecisionPanel _battleActionDecisionPanel;
[Inject]
private void Construct(
CameraStateMachine cameraStateMachine,
IInputService inputService,
PlayerMovementController playerMovementController)
{
BattleActions.Add(BattleActionType.Wait, new BattleActionWait());
BattleActions.Add(BattleActionType.Move,
new BattleActionMove(cameraStateMachine, inputService, playerMovementController));
}
public override async UniTask DecideAction(CancellationToken ctx)
{
BattleActionDecisionResultCode decision = BattleActionDecisionResultCode.Deciding;
@@ -35,7 +21,7 @@ namespace Code.OfficeGame.BattleMode.Actions.Player
while (decidedAction == BattleActionType.None || ctx.IsCancellationRequested)
{
Cursor.lockState = CursorLockMode.Confined;
await _battleActionDecisionPanel.Open(ctx);
decidedAction = await _battleActionDecisionPanel.GetDecision(ctx);
@@ -45,10 +31,8 @@ namespace Code.OfficeGame.BattleMode.Actions.Player
&& !ctx.IsCancellationRequested)
{
Cursor.lockState = CursorLockMode.Locked;
await _battleActionDecisionPanel.Close(ctx);
// Панель UI здесь
await _battleActionDecisionPanel.Close(ctx);
decision = await BattleActions[decidedAction].DecideAction();