using XGame.Framework.Interfaces;

namespace XGame.Framework.Map
{
    /// <summary>
    /// 带Update的EntityView
    /// </summary>
    public abstract class EntityViewUpdate<TViewModel> : EntityView<TViewModel>, IUpdate, ILateUpdate where TViewModel : class, IEntityViewModel
    {
        void IUpdate.Update(int millisecond)
        {
            if (Active)
            {
                Group.Update(millisecond);
            }
        }
        void ILateUpdate.LateUpdate(int millisecond)
        {
            if (Active)
            {
                Group.LateUpdate(millisecond);
            }
        }
    }
}
