EntityViewUpdate.cs 629 B

12345678910111213141516171819202122232425
  1. using XGame.Framework.Interfaces;
  2. namespace XGame.Framework.Map
  3. {
  4. /// <summary>
  5. /// 带Update的EntityView
  6. /// </summary>
  7. public abstract class EntityViewUpdate<TViewModel> : EntityView<TViewModel>, IUpdate, ILateUpdate where TViewModel : class, IEntityViewModel
  8. {
  9. void IUpdate.Update(int millisecond)
  10. {
  11. if (Active)
  12. {
  13. Group.Update(millisecond);
  14. }
  15. }
  16. void ILateUpdate.LateUpdate(int millisecond)
  17. {
  18. if (Active)
  19. {
  20. Group.LateUpdate(millisecond);
  21. }
  22. }
  23. }
  24. }