TimelineImprovements
This commit is contained in:
1 parent
e312131725
commit
f927552adc
2211 files changed
+115416
-540944
No files matched your search
@@ -9,6 +9,7 @@ using Code.Infrastructure.Particles;
|
||||
using Code.OfficeGame.BattleMode.Actions;
|
||||
using Code.OfficeGame.BattleMode.Actions.AI;
|
||||
using Code.OfficeGame.BattleMode.Actions.Deciders;
|
||||
using Code.OfficeGame.BattleMode.CursorControl;
|
||||
using Code.OfficeGame.BattleMode.Health;
|
||||
using Code.OfficeGame.BattleMode.HitBoxes;
|
||||
using Code.OfficeGame.BattleMode.UI;
|
||||
@@ -65,8 +66,10 @@ namespace Code.OfficeGame.BattleMode.Timeline
|
||||
BattleActionDecisionPanel battleActionDecisionPanel,
|
||||
HealthPanelsHolder healthPanelsHolder,
|
||||
CameraStateMachine cameraStateMachine,
|
||||
IParticleService particleService)
|
||||
IParticleService particleService,
|
||||
BattleModeCursorController cursorController)
|
||||
{
|
||||
_cursorController = cursorController;
|
||||
_timelinePanel = timelinePanel;
|
||||
_decisionPanel = battleActionDecisionPanel;
|
||||
_healthPanelsHolder = healthPanelsHolder;
|
||||
@@ -135,6 +138,7 @@ namespace Code.OfficeGame.BattleMode.Timeline
|
||||
// =================== ОСНОВНОЙ ЦИКЛ БОЯ ===================
|
||||
|
||||
private CancellationToken _battleLoopCt;
|
||||
private BattleModeCursorController _cursorController;
|
||||
|
||||
public async UniTask RunBattleLoopAsync(List<EntityProperties> entities, CancellationToken ctx)
|
||||
{
|
||||
@@ -255,8 +259,8 @@ namespace Code.OfficeGame.BattleMode.Timeline
|
||||
|
||||
if (entity.TeamData.Team == EntityTeam.ChaoticEvil)
|
||||
{
|
||||
var (enemyRes, enemyData) = await _enemyDeciders[entity.TeamData.DeciderType]
|
||||
.DecideEnemy(ctx, entity, _battleActions);
|
||||
var (enemyRes, enemyData) = _enemyDeciders[entity.TeamData.DeciderType]
|
||||
.DecideEnemy(entity, _battleActions);
|
||||
|
||||
return new EntityActionSlotSnapshot
|
||||
{
|
||||
@@ -292,7 +296,7 @@ namespace Code.OfficeGame.BattleMode.Timeline
|
||||
|
||||
while (!ctx.IsCancellationRequested)
|
||||
{
|
||||
Cursor.lockState = CursorLockMode.Confined;
|
||||
// Cursor.lockState = CursorLockMode.Confined;
|
||||
if (cameraBattleState != null) cameraBattleState.battleDeciding = true;
|
||||
await _decisionPanel.Open(ctx);
|
||||
|
||||
@@ -306,7 +310,7 @@ namespace Code.OfficeGame.BattleMode.Timeline
|
||||
_simulator.RestoreSimulationToWorld(Track.GetFrame(_committedFrame.Value));
|
||||
ApplyFrame(_committedFrame.Value, playOneShotVfx: false);
|
||||
|
||||
decider.MountDecider(entity);
|
||||
await decider.MountDecider(entity);
|
||||
bool waitingForFirstTarget = true;
|
||||
|
||||
try
|
||||
@@ -316,7 +320,7 @@ namespace Code.OfficeGame.BattleMode.Timeline
|
||||
// Пока цель ещё не выбрана — курсор залочен под прицеливание камеры.
|
||||
// Как только цель выбрана (идёт превью) — курсор свободен (Confined),
|
||||
// чтобы игрок мог двигать ползунок таймлайна (а вращать камеру через ПКМ).
|
||||
Cursor.lockState = waitingForFirstTarget ? CursorLockMode.Locked : CursorLockMode.Confined;
|
||||
// Cursor.lockState = waitingForFirstTarget ? CursorLockMode.Locked : CursorLockMode.Confined;
|
||||
if (cameraBattleState != null) cameraBattleState.battleDeciding = !waitingForFirstTarget;
|
||||
|
||||
await _decisionPanel.Close(ctx);
|
||||
@@ -368,7 +372,7 @@ namespace Code.OfficeGame.BattleMode.Timeline
|
||||
finally
|
||||
{
|
||||
StopPreviewLoop();
|
||||
decider.UnmountDecider();
|
||||
await decider.UnmountDecider();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user