using CombatLibrary.CombatLibrary.CombatCore.CustomizeTimeLogic.FxLogic;

namespace GameLogic.Combat.Hero
{
    public class CombatHeroTimeLineControl
    {
        public TimeLienData TimeLineData { get; }

        public TimeLienData _timeLineData;

        private BetterList<TimeLineEventLogicGroupBasic> _currRunEventLogicGroupList =
            new BetterList<TimeLineEventLogicGroupBasic>();

        public void Init(TimeLienData timeLienData)
        {
            _timeLineData = timeLienData;
        }

        public void AddEventLogicGroup(TimeLineEventLogicGroupBasic eventLogicGroup)
        {
            _currRunEventLogicGroupList.Add(eventLogicGroup);
        }

        public void RemoveEventLogicGroup(TimeLineEventLogicGroupBasic eventLogicGroup)
        {
            _currRunEventLogicGroupList.Remove(eventLogicGroup);
        }

        public void Update(float deltaTime)
        {
            for (int i = 0; i < _currRunEventLogicGroupList.size; i++)
            {
                _currRunEventLogicGroupList[i].Update(deltaTime);
            }
        }
    }
}