TimelineImprovements
This commit is contained in:
1 parent
e312131725
commit
f927552adc
2211 files changed
+115416
-540944
No files matched your search
@@ -6,9 +6,10 @@ namespace Code.OfficeGame.BattleMode.Actions.AI
|
||||
{
|
||||
public abstract class EnemyDecider
|
||||
{
|
||||
public abstract UniTask<(BattleActionDecisionResult decisionResult, BattleActionData actionData)>
|
||||
DecideEnemy(CancellationToken ctx, EntityProperties entity, Dictionary<BattleActionType, BattleAction> battleActions);
|
||||
|
||||
public abstract EnemyDeciderTypes EnemyDeciderType { get; }
|
||||
|
||||
public abstract (BattleActionDecisionResult decisionResult, BattleActionData actionData)
|
||||
DecideEnemy(EntityProperties entity,
|
||||
IReadOnlyDictionary<BattleActionType, BattleAction> battleActions);
|
||||
}
|
||||
}
|
||||
@@ -14,13 +14,12 @@ namespace Code.OfficeGame.BattleMode.Actions.AI.EnemyDeciders
|
||||
_player = player;
|
||||
}
|
||||
|
||||
public override async UniTask<(BattleActionDecisionResult decisionResult, BattleActionData actionData)> DecideEnemy(
|
||||
CancellationToken ctx,
|
||||
public override (BattleActionDecisionResult decisionResult,
|
||||
BattleActionData actionData)
|
||||
DecideEnemy(
|
||||
EntityProperties entity,
|
||||
Dictionary<BattleActionType,BattleAction> battleActions)
|
||||
IReadOnlyDictionary<BattleActionType, BattleAction> battleActions)
|
||||
{
|
||||
await UniTask.Yield();
|
||||
|
||||
var entityPosition = entity.transform.position;
|
||||
var playerPosition = _player.transform.position;
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
using Code.Infrastructure.Utils;
|
||||
using System;
|
||||
using Code.OfficeGame.BattleMode.Actions.Deciders;
|
||||
using Code.OfficeGame.BattleMode.Timeline;
|
||||
using UnityEngine;
|
||||
@@ -14,7 +14,8 @@ namespace Code.OfficeGame.BattleMode.Actions
|
||||
BattleActionDecisionResult battleActionDecisionResult,
|
||||
BattleActionData battleActionData)
|
||||
{
|
||||
if (battleActionData is not WaitBattleActionData waitActionData)
|
||||
if (battleActionData is not WaitBattleActionData waitActionData
|
||||
|| battleActionDecisionResult is not CountBattleActionDeciderResult countResult)
|
||||
{
|
||||
battleActionData.Finished = true;
|
||||
return;
|
||||
@@ -30,14 +31,12 @@ namespace Code.OfficeGame.BattleMode.Actions
|
||||
|
||||
entityAnimator.CrossFadeInFixedTime(EntryStateHash, transitionDurationSeconds);
|
||||
|
||||
// entityAnimator.Play(EntryStateHash, 0, 0f); // Создать None State и кинуть эту штуку туда
|
||||
// entityAnimator.Update(0f);
|
||||
|
||||
// TODO С нормальными анимациями не нужен будет рут моушен√
|
||||
entityAnimator.ResetAnimatorPosition();
|
||||
// entityAnimator.ResetAnimatorPosition();
|
||||
}
|
||||
|
||||
waitActionData.WaitFrames--;
|
||||
|
||||
if (waitActionData.WaitFrames <= 0)
|
||||
{
|
||||
battleActionData.Finished = true;
|
||||
@@ -45,12 +44,14 @@ namespace Code.OfficeGame.BattleMode.Actions
|
||||
}
|
||||
|
||||
public override BattleActionType ActionType => BattleActionType.Wait;
|
||||
public override DeciderType DeciderType => DeciderType.AsIs;
|
||||
public override DeciderType DeciderType => DeciderType.Count;
|
||||
public override BattleActionData MountAndGetFrames(EntityProperties entity, BattleActionDecisionResult result)
|
||||
{
|
||||
if (result is not CountBattleActionDeciderResult countResult) throw new Exception("Wrong Decider Result");
|
||||
|
||||
WaitBattleActionData actionData = new()
|
||||
{
|
||||
WaitFrames = 120
|
||||
WaitFrames = countResult.Count
|
||||
};
|
||||
|
||||
return actionData;
|
||||
@@ -58,7 +59,15 @@ namespace Code.OfficeGame.BattleMode.Actions
|
||||
|
||||
public override void Finish(EntityProperties entity, BattleActionData actionData, BattleActionDecisionResult result)
|
||||
{
|
||||
if (actionData is not WaitBattleActionData waitActionData
|
||||
|| result is not CountBattleActionDeciderResult countResult)
|
||||
{
|
||||
actionData.Finished = true;
|
||||
return;
|
||||
}
|
||||
|
||||
actionData.Finished = true;
|
||||
waitActionData.WaitFrames = 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -15,10 +15,10 @@ namespace Code.OfficeGame.BattleMode.Actions.Deciders
|
||||
};
|
||||
}
|
||||
|
||||
public override void UnmountDecider()
|
||||
{ }
|
||||
public override UniTask UnmountDecider()
|
||||
{ return UniTask.CompletedTask; }
|
||||
|
||||
public override void MountDecider(EntityProperties entityProperties)
|
||||
{ }
|
||||
public override UniTask MountDecider(EntityProperties entityProperties)
|
||||
{ return UniTask.CompletedTask; }
|
||||
}
|
||||
}
|
||||
@@ -8,8 +8,8 @@ namespace Code.OfficeGame.BattleMode.Actions.Deciders
|
||||
protected bool IsMounted;
|
||||
public abstract UniTask<BattleActionDecisionResult> GetDecision();
|
||||
|
||||
public abstract void UnmountDecider();
|
||||
public abstract UniTask UnmountDecider();
|
||||
|
||||
public abstract void MountDecider(EntityProperties entityProperties);
|
||||
public abstract UniTask MountDecider(EntityProperties entityProperties);
|
||||
}
|
||||
}
|
||||
@@ -63,15 +63,15 @@ namespace Code.OfficeGame.BattleMode.Actions
|
||||
ResultCode = deciderResult.ResultCode;
|
||||
}
|
||||
}
|
||||
public class FrameBattleActionDeciderResult : BattleActionDecisionResult
|
||||
public class CountBattleActionDeciderResult : BattleActionDecisionResult
|
||||
{
|
||||
public int FrameCount;
|
||||
public int Count;
|
||||
|
||||
public override BattleActionDecisionResult GetSnapshot()
|
||||
{
|
||||
var snapshot = new FrameBattleActionDeciderResult
|
||||
var snapshot = new CountBattleActionDeciderResult
|
||||
{
|
||||
FrameCount = FrameCount,
|
||||
Count = Count,
|
||||
ActionType = ActionType,
|
||||
ResultCode = ResultCode
|
||||
};
|
||||
@@ -80,11 +80,11 @@ namespace Code.OfficeGame.BattleMode.Actions
|
||||
|
||||
public override void RestoreSnapshot(BattleActionDecisionResult snapshot)
|
||||
{
|
||||
if (snapshot is not FrameBattleActionDeciderResult) return;
|
||||
if (snapshot is not CountBattleActionDeciderResult) return;
|
||||
|
||||
var deciderResult = (FrameBattleActionDeciderResult)snapshot;
|
||||
var deciderResult = (CountBattleActionDeciderResult)snapshot;
|
||||
|
||||
FrameCount = deciderResult.FrameCount;
|
||||
Count = deciderResult.Count;
|
||||
ActionType = deciderResult.ActionType;
|
||||
ResultCode = deciderResult.ResultCode;
|
||||
}
|
||||
|
||||
@@ -57,9 +57,9 @@ namespace Code.OfficeGame.BattleMode.Actions.Deciders
|
||||
};
|
||||
}
|
||||
|
||||
public override void UnmountDecider()
|
||||
public override UniTask UnmountDecider()
|
||||
{
|
||||
if (!IsMounted) return;
|
||||
if (!IsMounted) return UniTask.CompletedTask;
|
||||
|
||||
_playerDecisionMarker.Toggle(false);
|
||||
_markerManager.ReleaseMarkerInstance(_playerDecisionMarker);
|
||||
@@ -79,6 +79,8 @@ namespace Code.OfficeGame.BattleMode.Actions.Deciders
|
||||
MarkPosition);
|
||||
|
||||
IsMounted = false;
|
||||
|
||||
return UniTask.CompletedTask;
|
||||
}
|
||||
|
||||
private bool _rotationChanging = false;
|
||||
@@ -91,9 +93,9 @@ namespace Code.OfficeGame.BattleMode.Actions.Deciders
|
||||
_rotationChanging = false;
|
||||
}
|
||||
|
||||
public override void MountDecider(EntityProperties entityProperties)
|
||||
public override UniTask MountDecider(EntityProperties entityProperties)
|
||||
{
|
||||
if (IsMounted) return;
|
||||
if (IsMounted) return UniTask.CompletedTask;
|
||||
|
||||
_inputService.BindActionPerformed((int)ActionMappings.BattleMode, (int)BattleModeActions.RightClick,
|
||||
ActivateRotationChange);
|
||||
@@ -115,6 +117,8 @@ namespace Code.OfficeGame.BattleMode.Actions.Deciders
|
||||
_targetRotation = Quaternion.identity;
|
||||
|
||||
IsMounted = true;
|
||||
|
||||
return UniTask.CompletedTask;
|
||||
}
|
||||
|
||||
private MarkerManager _markerManager;
|
||||
|
||||
@@ -0,0 +1,108 @@
|
||||
using System;
|
||||
using System.Threading;
|
||||
using Code.Infrastructure.Input;
|
||||
using Code.OfficeGame.BattleMode.Actions.UI;
|
||||
using Cysharp.Threading.Tasks;
|
||||
using R3;
|
||||
using UnityEngine.InputSystem;
|
||||
|
||||
namespace Code.OfficeGame.BattleMode.Actions.Deciders
|
||||
{
|
||||
public class CountBattleActionDecider : BattleActionDecider
|
||||
{
|
||||
private WaitActionCountSelectorPanel _countSelectorPanel;
|
||||
public override DeciderType DeciderType => DeciderType.Count;
|
||||
|
||||
private int _decidedCount;
|
||||
private BattleActionDecisionResultCode _resultCode;
|
||||
private CancellationTokenSource _waitForEnterTokenSource = new();
|
||||
|
||||
private IDisposable _sliderDisposable;
|
||||
private IInputService _inputService;
|
||||
|
||||
public CountBattleActionDecider(WaitActionCountSelectorPanel countSelectorPanel, IInputService inputService)
|
||||
{
|
||||
_inputService = inputService;
|
||||
_countSelectorPanel = countSelectorPanel;
|
||||
}
|
||||
|
||||
public override async UniTask<BattleActionDecisionResult> GetDecision()
|
||||
{
|
||||
if (!IsMounted) throw new Exception("Decider is not mounted");
|
||||
|
||||
_waitForEnterTokenSource = new CancellationTokenSource();
|
||||
_resultCode = BattleActionDecisionResultCode.Deciding;
|
||||
_countSelectorPanel.CountSlider.enabled = true;
|
||||
|
||||
await UniTask.WaitUntilCanceled(_waitForEnterTokenSource.Token).SuppressCancellationThrow();
|
||||
|
||||
_countSelectorPanel.CountSlider.enabled = false;
|
||||
|
||||
_waitForEnterTokenSource.Dispose();
|
||||
_waitForEnterTokenSource = null;
|
||||
|
||||
return new CountBattleActionDeciderResult()
|
||||
{
|
||||
Count = _decidedCount,
|
||||
ResultCode = _resultCode
|
||||
};
|
||||
}
|
||||
|
||||
private void Cancel(InputAction.CallbackContext obj)
|
||||
{
|
||||
_resultCode = BattleActionDecisionResultCode.CancelDecision;
|
||||
|
||||
_waitForEnterTokenSource.Cancel();
|
||||
}
|
||||
|
||||
private void Confirm(InputAction.CallbackContext obj)
|
||||
{
|
||||
_resultCode = BattleActionDecisionResultCode.Decided;
|
||||
|
||||
_waitForEnterTokenSource.Cancel();
|
||||
}
|
||||
|
||||
public override async UniTask UnmountDecider()
|
||||
{
|
||||
if (!IsMounted) return;
|
||||
|
||||
_inputService.UnbindActionPerformed((int)ActionMappings.BattleMode, (int)BattleModeActions.Confirm,
|
||||
Confirm);
|
||||
_inputService.UnbindActionPerformed((int)ActionMappings.BattleMode, (int)BattleModeActions.Cancel,
|
||||
Cancel);
|
||||
|
||||
_sliderDisposable.Dispose();
|
||||
|
||||
await _countSelectorPanel.Close();
|
||||
|
||||
IsMounted = false;
|
||||
}
|
||||
|
||||
public override async UniTask MountDecider(EntityProperties entityProperties)
|
||||
{
|
||||
if (IsMounted) return;
|
||||
|
||||
_inputService.BindActionPerformed((int)ActionMappings.BattleMode, (int)BattleModeActions.Confirm,
|
||||
Confirm);
|
||||
_inputService.BindActionPerformed((int)ActionMappings.BattleMode, (int)BattleModeActions.Cancel,
|
||||
Cancel);
|
||||
|
||||
_decidedCount = 0;
|
||||
|
||||
await _countSelectorPanel.Open();
|
||||
|
||||
_countSelectorPanel.SetRange(1, 150);
|
||||
|
||||
_sliderDisposable = _countSelectorPanel.CountSlider.OnValueChangedAsObservable()
|
||||
.Subscribe(val =>
|
||||
{
|
||||
// if (_suppressSliderCallback) return;
|
||||
_decidedCount = (int)val;
|
||||
_waitForEnterTokenSource.Cancel();
|
||||
});
|
||||
|
||||
IsMounted = true;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 3a6bb15289ef4ab1a8e2b62e883b988b
|
||||
timeCreated: 1795128743
|
||||
@@ -4,6 +4,7 @@ namespace Code.OfficeGame.BattleMode.Actions.Deciders
|
||||
{
|
||||
AsIs,
|
||||
Position,
|
||||
Rotation
|
||||
Rotation,
|
||||
Count
|
||||
}
|
||||
}
|
||||
@@ -57,9 +57,9 @@ namespace Code.OfficeGame.BattleMode.Actions.Deciders
|
||||
};
|
||||
}
|
||||
|
||||
public override void UnmountDecider()
|
||||
public override UniTask UnmountDecider()
|
||||
{
|
||||
if (!IsMounted) return;
|
||||
if (!IsMounted) return UniTask.CompletedTask;
|
||||
|
||||
_playerDecisionMarker.Toggle(false);
|
||||
_markerManager.ReleaseMarkerInstance(_playerDecisionMarker);
|
||||
@@ -76,11 +76,13 @@ namespace Code.OfficeGame.BattleMode.Actions.Deciders
|
||||
MarkPosition);
|
||||
|
||||
IsMounted = false;
|
||||
|
||||
return UniTask.CompletedTask;
|
||||
}
|
||||
|
||||
public override void MountDecider(EntityProperties entityProperties)
|
||||
public override UniTask MountDecider(EntityProperties entityProperties)
|
||||
{
|
||||
if (IsMounted) return;
|
||||
if (IsMounted) return UniTask.CompletedTask;
|
||||
|
||||
_inputService.BindActionPerformed((int)ActionMappings.BattleMode, (int)BattleModeActions.Select,
|
||||
SelectRotation);
|
||||
@@ -101,6 +103,8 @@ namespace Code.OfficeGame.BattleMode.Actions.Deciders
|
||||
_entityPosition = entityProperties.KinematicCharacterMotor.TransientPosition;
|
||||
|
||||
IsMounted = true;
|
||||
|
||||
return UniTask.CompletedTask;
|
||||
}
|
||||
|
||||
private MarkerManager _markerManager;
|
||||
|
||||
@@ -98,7 +98,8 @@ namespace Code.OfficeGame.BattleMode.Actions
|
||||
/// <summary>
|
||||
/// Полное детерминированное восстановление для старта/перезапекания физической симуляции.
|
||||
/// </summary>
|
||||
public static void RestoreForSimulation(EntityProperties entity, Transform[] cachedBones, in EntitySnapshot snapshot)
|
||||
public static void RestoreForSimulation(EntityProperties entity, Transform[] cachedBones,
|
||||
in EntitySnapshot snapshot)
|
||||
{
|
||||
var motor = entity.KinematicCharacterMotor;
|
||||
var moveCtrl = entity.MovementController;
|
||||
@@ -220,6 +221,7 @@ namespace Code.OfficeGame.BattleMode.Actions
|
||||
case AnimatorControllerParameterType.Bool:
|
||||
case AnimatorControllerParameterType.Trigger: pSnap.BoolValue = animator.GetBool(hash); break;
|
||||
}
|
||||
|
||||
_parameters[i] = pSnap;
|
||||
}
|
||||
}
|
||||
@@ -228,7 +230,9 @@ namespace Code.OfficeGame.BattleMode.Actions
|
||||
{
|
||||
if (targetAnimator == null || _layers == null) return;
|
||||
|
||||
targetAnimator.applyRootMotion = false;
|
||||
// 1. ВАЖНО: включаем исходный режим RootMotion ДО перемотки,
|
||||
// чтобы Mecanim вычислял позу и внутренний курсор корня в правильном режиме!
|
||||
targetAnimator.applyRootMotion = _applyRootMotion;
|
||||
targetAnimator.speed = _speed;
|
||||
|
||||
if (_parameters != null)
|
||||
@@ -240,9 +244,12 @@ namespace Code.OfficeGame.BattleMode.Actions
|
||||
|
||||
switch (p.Type)
|
||||
{
|
||||
case AnimatorControllerParameterType.Float: targetAnimator.SetFloat(p.NameHash, p.FloatValue); break;
|
||||
case AnimatorControllerParameterType.Int: targetAnimator.SetInteger(p.NameHash, p.IntValue); break;
|
||||
case AnimatorControllerParameterType.Bool: targetAnimator.SetBool(p.NameHash, p.BoolValue); break;
|
||||
case AnimatorControllerParameterType.Float:
|
||||
targetAnimator.SetFloat(p.NameHash, p.FloatValue); break;
|
||||
case AnimatorControllerParameterType.Int:
|
||||
targetAnimator.SetInteger(p.NameHash, p.IntValue); break;
|
||||
case AnimatorControllerParameterType.Bool:
|
||||
targetAnimator.SetBool(p.NameHash, p.BoolValue); break;
|
||||
case AnimatorControllerParameterType.Trigger:
|
||||
if (p.BoolValue) targetAnimator.SetTrigger(p.NameHash);
|
||||
else targetAnimator.ResetTrigger(p.NameHash);
|
||||
@@ -251,7 +258,9 @@ namespace Code.OfficeGame.BattleMode.Actions
|
||||
}
|
||||
}
|
||||
|
||||
const float warmupEpsilon = 0.0001f;
|
||||
int layerCount = Mathf.Min(_layers.Length, targetAnimator.layerCount);
|
||||
|
||||
for (int i = 0; i < layerCount; i++)
|
||||
{
|
||||
var layer = _layers[i];
|
||||
@@ -259,15 +268,22 @@ namespace Code.OfficeGame.BattleMode.Actions
|
||||
|
||||
if (!layer.IsInTransition || layer.NextFullPathHash == 0)
|
||||
{
|
||||
float timeInSeconds = Mathf.Max(0f, layer.NormalizedTime * layer.StateLength);
|
||||
targetAnimator.CrossFadeInFixedTime(layer.FullPathHash, 0f, i, timeInSeconds);
|
||||
float targetSeconds = Mathf.Max(0f, layer.NormalizedTime * layer.StateLength);
|
||||
float preSeconds = Mathf.Max(0f, targetSeconds - warmupEpsilon);
|
||||
float dt = targetSeconds - preSeconds;
|
||||
|
||||
targetAnimator.CrossFadeInFixedTime(layer.FullPathHash, 0f, i, preSeconds);
|
||||
targetAnimator.Update(0f);
|
||||
|
||||
// Ненулевой микрошаг прогревает m_PrevRootPosition ровно до targetSeconds!
|
||||
if (dt > 0f)
|
||||
targetAnimator.Update(dt);
|
||||
}
|
||||
else
|
||||
{
|
||||
// Защита от отрицательного времени (фикс бага старого AnimatorSnapshot)
|
||||
float startSecondsA = Mathf.Max(0f, (layer.NormalizedTime * layer.StateLength) - layer.ElapsedTransitionTime);
|
||||
float startSecondsB = Mathf.Max(0f, (layer.NextNormalizedTime * layer.NextStateLength) - layer.ElapsedTransitionTime);
|
||||
float elapsed = Mathf.Max(warmupEpsilon, layer.ElapsedTransitionTime);
|
||||
float startSecondsA = Mathf.Max(0f, (layer.NormalizedTime * layer.StateLength) - elapsed);
|
||||
float startSecondsB = Mathf.Max(0f, (layer.NextNormalizedTime * layer.NextStateLength) - elapsed);
|
||||
|
||||
targetAnimator.CrossFadeInFixedTime(layer.FullPathHash, 0f, i, startSecondsA);
|
||||
targetAnimator.Update(0f);
|
||||
@@ -278,14 +294,15 @@ namespace Code.OfficeGame.BattleMode.Actions
|
||||
i,
|
||||
startSecondsB);
|
||||
|
||||
targetAnimator.Update(layer.ElapsedTransitionTime);
|
||||
targetAnimator.Update(elapsed);
|
||||
}
|
||||
}
|
||||
|
||||
// 2. Отбрасываем любое смещение, которое произошло во время прогрева,
|
||||
// сохраняя родной локальный оффсет модели
|
||||
Transform targetTransform = targetAnimator.transform;
|
||||
targetTransform.localPosition = _localPosition;
|
||||
targetTransform.localRotation = _localRotation;
|
||||
targetAnimator.applyRootMotion = _applyRootMotion;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 7dd8e44f5657473c8702ed72998267d2
|
||||
timeCreated: 1795128177
|
||||
@@ -0,0 +1,77 @@
|
||||
using System;
|
||||
using System.Threading;
|
||||
using Code.Infrastructure.UI;
|
||||
using Cysharp.Threading.Tasks;
|
||||
using LitMotion;
|
||||
using LitMotion.Extensions;
|
||||
using R3;
|
||||
using TMPro;
|
||||
using UnityEngine;
|
||||
using UnityEngine.UI;
|
||||
|
||||
namespace Code.OfficeGame.BattleMode.Actions.UI
|
||||
{
|
||||
public class WaitActionCountSelectorPanel : UIPanel
|
||||
{
|
||||
[SerializeField] private float duration;
|
||||
|
||||
[SerializeField] private Slider countSlider;
|
||||
[SerializeField] private TMP_Text countText;
|
||||
|
||||
public Slider CountSlider => countSlider;
|
||||
|
||||
private MotionHandle _motionHandle;
|
||||
|
||||
private IDisposable _sliderCounter;
|
||||
|
||||
public void SetRange(int min, int max)
|
||||
{
|
||||
countSlider.minValue = min;
|
||||
countSlider.maxValue = max;
|
||||
}
|
||||
|
||||
private void Awake()
|
||||
{
|
||||
countSlider.wholeNumbers = true;
|
||||
|
||||
_sliderCounter = countSlider.OnValueChangedAsObservable()
|
||||
.Subscribe(value =>
|
||||
{
|
||||
countText.SetText(value.ToString());
|
||||
});
|
||||
}
|
||||
|
||||
private void OnDestroy()
|
||||
{
|
||||
_sliderCounter.Dispose();
|
||||
}
|
||||
|
||||
public override async UniTask Open(CancellationToken cts = default)
|
||||
{
|
||||
gameObject.SetActive(true);
|
||||
|
||||
float startY = -((RectTransform)transform).rect.height;
|
||||
|
||||
_motionHandle = LMotion.Create(startY, 0f, duration)
|
||||
.WithEase(Ease.OutCubic)
|
||||
.WithScheduler(MotionScheduler.UpdateIgnoreTimeScale)
|
||||
.BindToAnchoredPositionY((RectTransform)transform);
|
||||
|
||||
await _motionHandle.ToUniTask(cts);
|
||||
}
|
||||
|
||||
public override async UniTask Close(CancellationToken cts = default)
|
||||
{
|
||||
float targetY = ((RectTransform)transform).rect.height;
|
||||
|
||||
_motionHandle = LMotion.Create(0f, targetY, duration)
|
||||
.WithEase(Ease.InBack)
|
||||
.WithScheduler(MotionScheduler.UpdateIgnoreTimeScale)
|
||||
.BindToAnchoredPositionY((RectTransform)transform);
|
||||
|
||||
await _motionHandle.ToUniTask(cts);
|
||||
|
||||
gameObject.SetActive(false);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 91ac8575fc0f42faaad845dd9f30f1f4
|
||||
timeCreated: 1795128198
|
||||
Reference in new issue
Block a user