Files
Hasebe/Assets/Code/OfficeGame/BattleMode/Actions/EntityTimelineActor.cs
T
2026-10-23 20:09:32 +03:00

27 lines
782 B
C#

using System.Collections.Generic;
using System.Threading;
using Cysharp.Threading.Tasks;
using UnityEngine;
namespace Code.OfficeGame.BattleMode.Actions
{
public abstract class EntityTimelineActor : MonoBehaviour
{
public BattleAction CurrentAction { get; protected set;}
public bool Finished => CurrentAction == null || CurrentAction.Finished;
public abstract UniTask DecideAction(CancellationToken ctx);
public Animator animator;
protected readonly Dictionary<BattleActionType, BattleAction> BattleActions = new();
private void Awake()
{
foreach (var action in GetComponents<BattleAction>())
{
BattleActions.Add(action.ActionType, action);
}
}
}
}