using System;
using System.Threading.Tasks;
using UnityEngine;

namespace Plugins.JNGame.Sync.Frame.game
{
    public abstract class IJNSyncFrameComponent : MonoBehaviour
    {
        //标识
        [HideInInspector]
        public int _nId;
        [HideInInspector]
        public int NID => _nId;
        
        //是否执行Start方法
        [HideInInspector]
        public Boolean IsRunStart = false;
        
        public abstract void OnSyncStart();

        public abstract Boolean IsInput();
        
        //清空输入
        public abstract void ClearInput();
        
        //获取同步类
        protected abstract JNSyncFrame GetSync();

        public abstract byte[] Encoder();

        public abstract Task OnSyncUpdateThread(int dt, JNFrameInfo frame);

    }
}