using System.Collections.Generic; using System.Threading; using Cysharp.Threading.Tasks; using Unity.VisualScripting; 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 abstract void ForceDecideAction(BattleActionType actionType); [DoNotSerialize] public Animator animator; protected readonly Dictionary BattleActions = new(); private void Awake() { animator = GetComponentInChildren(); foreach (var action in GetComponents()) { BattleActions.Add(action.ActionType, action); } } } }