123456789101112131415161718192021222324252627282930313233343536373839404142 |
- using FL.Battle;
- using FL.Battle.Components;
- using UnityEngine;
- using XGame.Framework.Map;
- using XGame.Framework.Time;
- namespace FL.Map
- {
- /// <summary>
- /// 没有IEntity的对象基类
- /// </summary>
- /// <typeparam name="TViewModel"></typeparam>
- public abstract class SimpleEntityView<TViewModel> : EntityView<TViewModel>, IMoveContext where TViewModel : EntityViewModel
- {
- /// <summary>
- /// 召唤者的EntityId
- /// </summary>
- public long MasterId { get; set; }
- /// <summary>
- /// 配置表Id
- /// </summary>
- public int TableId { get; set; }
- /// <summary>
- /// 实例id
- /// </summary>
- public long UID { get; set; }
- public ITargetSelector Selector { get; set; }
- public ITimeModule Time => Context.Time;
- public IMapAssetModule Asset => Context.Asset;
- Transform IMoveContext.OwnerTr => VM.Tr;
- public MoveComponent Move => GetComponent<MoveComponent>();
- protected override void OnEnable(object intent)
- {
- }
- protected override void OnDisable()
- {
- Selector = null;
- }
- }
- }
|