namespace XGame.Framework
{
    internal class CLRGameLogicProxy : IGameLogicProxy
    {
        private IGameLogic _gameLogic;

        public CLRGameLogicProxy(IGameLogic gameLogic)
        {
            _gameLogic = gameLogic;
        }
        #region 接口实现
        public void Init()
        {
            _gameLogic?.Init();
        }
        public void Start()
        {
            _gameLogic?.Start();
        }
        public void Update(int millisecond)
        {
            _gameLogic?.Update(millisecond);
        }
        public void LateUpdate(int millisecond)
        {
            _gameLogic?.LateUpdate(millisecond);
        }

        public void Dispose()
        {
            _gameLogic?.Dispose();
            _gameLogic = null;
        }
        #endregion
    }
}
