/*
 *Copyright(C) 2023 by Chief All rights reserved.
 *Unity版本：2023.2.5f1c1 
 *作者:Chief  
 *创建日期: 2024-01-19 
 *模块说明：通用并行命令
 *版本: 1.0
*/

using System;

namespace Aster.AsterTask
{
    /// <summary>
    /// 主线程调用的回调函数
    /// </summary>
    public class AsterMainthreadCommand : AsterCommand<AsterMainthreadCommand>
    {
        public override bool InParallel => false;

        public bool SlowCmd = false;

        public override bool IsSlowCmd => SlowCmd;

        public bool FascCmd = false;
        public override bool IsFascCmd => FascCmd;


        public Action CallBack;

        public override void Execude()
        {
            CallBack?.Invoke();
        }
    }

    public class AsterMainthreadCommandWithParam : AsterCommand<AsterMainthreadCommandWithParam>
    {

        public override bool InParallel => false;

        public bool SlowCmd = false;

        public override bool IsSlowCmd => SlowCmd;

        public bool FascCmd = false;
        public override bool IsFascCmd => FascCmd;


        public Action<object> CallBack;
        public object param;

        public override void Execude()
        {
            CallBack?.Invoke(param);
        }
    }

}