IEntityView.cs 1.0 KB

12345678910111213141516171819202122232425262728293031323334353637
  1. using UnityEngine;
  2. using XGame.Framework.Components;
  3. using XGame.Framework.Interfaces;
  4. namespace XGame.Framework.Map
  5. {
  6. public interface IEntityView : IReference
  7. {
  8. /// <summary>
  9. /// 激活状态
  10. /// </summary>
  11. bool Active { get; }
  12. /// <summary>
  13. /// 激活
  14. /// </summary>
  15. void Enable(object intent = null);
  16. /// <summary>
  17. /// 隐藏
  18. /// </summary>
  19. void Disable();
  20. public Vector3 LocalPosition { get; set; }
  21. public Vector3 Position { get; set; }
  22. public Vector3 Rotation { get; set; }
  23. /// <summary>
  24. /// 获取组件
  25. /// </summary>
  26. /// <typeparam name="TComponent"></typeparam>
  27. /// <param name="autoCreate">是否自动创建</param>
  28. /// <returns></returns>
  29. TComponent GetComponent<TComponent>(bool autoCreate = true) where TComponent : class, IComponent;
  30. }
  31. public interface IEntityProxy
  32. {
  33. EntityBehaviour Behaviour { get; set; }
  34. }
  35. }