BulletEntityView.cs 936 B

123456789101112131415161718192021222324252627282930
  1. using FL.Battle.Components;
  2. using FL.Battle.Components.AI;
  3. using UnityEngine;
  4. using XGame.Framework.Map;
  5. using XGame.Framework.ObjectCollection;
  6. namespace FL.Map
  7. {
  8. /// <summary>
  9. /// 子弹实例
  10. /// </summary>
  11. public class BulletEntityView : SimpleEntityView<BulletEntityVM>, IVfxContext, IBulletAIContext
  12. {
  13. public BulletAI AI => GetComponent<BulletAI>();
  14. public VfxComponent Vfx => GetComponent<VfxComponent>();
  15. #region IVfxContext
  16. Transform IVfxContext.WorldTr => null;
  17. Transform IVfxContext.CenterTr => VM.Tr;
  18. Transform IVfxContext.CastTr => VM.Tr;
  19. #endregion
  20. }
  21. public class BulletEntityVM : EntityViewModel
  22. {
  23. //public Transform ActionRoot { get; private set; }
  24. protected override void OnInit(IObjectCollector collector)
  25. {
  26. //ActionRoot = collector.GetGameObject("ActionRoot").transform;
  27. }
  28. }
  29. }