HoloCop in progress
This commit is contained in:
1 parent
2697212f05
commit
430b250075
79 files changed
+120745
-45077
No files matched your search
@@ -29,7 +29,6 @@ namespace Code.OfficeGame.BattleMode.Timeline
|
||||
_entities = entities;
|
||||
_currentBattleFrame.Value = 0;
|
||||
|
||||
// Контейнер подписок на время текущего боя (автоматически очистится при выходе из метода)
|
||||
_battleSubscriptions = new DisposableBag();
|
||||
|
||||
try
|
||||
@@ -42,7 +41,6 @@ namespace Code.OfficeGame.BattleMode.Timeline
|
||||
entity.OnActionSet
|
||||
.Subscribe(action =>
|
||||
{
|
||||
// Переводим длительность действия в абсолютный кадр окончания на таймлайне
|
||||
action.Frame += _currentBattleFrame.Value;
|
||||
_timelinePanel.SetAction(action);
|
||||
})
|
||||
@@ -72,14 +70,14 @@ namespace Code.OfficeGame.BattleMode.Timeline
|
||||
}
|
||||
}
|
||||
|
||||
private async UniTask<List<EntityTimelineActor>> PlayTimelineUntilPause(CancellationToken ct)
|
||||
private async UniTask<List<EntityTimelineActor>> PlayTimelineUntilPause(CancellationToken ctx)
|
||||
{
|
||||
float accumulator = 0f;
|
||||
var readyEntities = new List<EntityTimelineActor>();
|
||||
|
||||
while (readyEntities.Count == 0 && !ct.IsCancellationRequested)
|
||||
while (readyEntities.Count == 0 && !ctx.IsCancellationRequested)
|
||||
{
|
||||
await UniTask.Yield(PlayerLoopTiming.Update, ct);
|
||||
await UniTask.Yield(PlayerLoopTiming.Update, ctx);
|
||||
|
||||
accumulator += Time.unscaledDeltaTime;
|
||||
|
||||
|
||||
Reference in new issue
Block a user