Esempio n. 1
0
 /// <summary>
 /// 附加子实体
 /// </summary>
 /// <param name="childEntity">要附加的子实体</param>
 /// <param name="parentEntity">被附加的父实体</param>
 /// <param name="parentTransformPath">相对于被附加父实体的位置</param>
 public void AttachEntity(EntityBase childEntity, EntityBase parentEntity, string parentTransformPath)
 {
     AttachEntity(childEntity, parentEntity, parentTransformPath, null);
 }
Esempio n. 2
0
 /// <summary>
 /// 解除所有子实体
 /// </summary>
 /// <param name="parentEntity">被解除的父实体</param>
 public void DetachChildEntities(EntityBase parentEntity)
 {
     m_EntityManager.DetachChildEntities(parentEntity);
 }
Esempio n. 3
0
        protected internal override void OnAttached(EntityBase childEntity, Transform parentTransform, object userData)
        {
            base.OnAttached(childEntity, parentTransform, userData);

            m_OnAttached.Invoke(childEntity, parentTransform, userData);
        }
Esempio n. 4
0
 /// <summary>
 /// 附加子实体
 /// </summary>
 /// <param name="childEntityId">要附加的子实体的实体编号</param>
 /// <param name="parentEntity">被附加的父实体</param>
 /// <param name="parentTransform">相对于被附加父实体的位置</param>
 /// <param name="userData">用户自定义数据</param>
 public void AttachEntity(int childEntityId, EntityBase parentEntity, Transform parentTransform, object userData)
 {
     AttachEntity(GetEntity(childEntityId), parentEntity, parentTransform, userData);
 }
Esempio n. 5
0
 /// <summary>
 /// 解除子实体
 /// </summary>
 /// <param name="childEntity">要解除的子实体</param>
 public void DetachEntity(EntityBase childEntity)
 {
     m_EntityManager.DetachEntity(childEntity);
 }
Esempio n. 6
0
 /// <summary>
 /// 附加子实体
 /// </summary>
 /// <param name="childEntity">要附加的子实体</param>
 /// <param name="parentEntity">被附加的父实体</param>
 /// <param name="parentTransform">相对于被附加父实体的位置</param>
 public void AttachEntity(EntityBase childEntity, EntityBase parentEntity, Transform parentTransform)
 {
     AttachEntity(childEntity, parentEntity, parentTransform, null);
 }
Esempio n. 7
0
 /// <summary>
 /// 附加子实体
 /// </summary>
 /// <param name="childEntity">要附加的子实体</param>
 /// <param name="parentEntityId">被附加的父实体的实体编号</param>
 /// <param name="userData">用户自定义数据</param>
 public void AttachEntity(EntityBase childEntity, int parentEntityId, object userData)
 {
     AttachEntity(childEntity, GetEntity(parentEntityId), string.Empty, userData);
 }
Esempio n. 8
0
 /// <summary>
 /// 隐藏实体
 /// </summary>
 /// <param name="entity">实体</param>
 public void HideEntity(EntityBase entity)
 {
     m_EntityManager.HideEntity(entity);
 }
Esempio n. 9
0
 /// <summary>
 /// 隐藏实体
 /// </summary>
 /// <param name="entity">实体</param>
 /// <param name="userData">用户自定义数据</param>
 public void HideEntity(EntityBase entity, object userData)
 {
     m_EntityManager.HideEntity(entity, userData);
 }
Esempio n. 10
0
        protected internal override void OnDetached(EntityBase childEntity, object userData)
        {
            base.OnDetached(childEntity, userData);

            m_Owner.GetOrAddUnitComponent <AnimatorComponent>().SetBoolValue(Constant.AnimatorParam.IsRide, false);
        }
Esempio n. 11
0
 /// <summary>
 /// 是否是合法的实体
 /// </summary>
 /// <param name="entity">实体</param>
 /// <returns>实体是否合法</returns>
 public bool IsValidEntity(EntityBase entity)
 {
     return(m_EntityManager.IsValidEntity(entity));
 }
Esempio n. 12
0
        protected internal override void OnDetachFrom(EntityBase parentEntity, object userData)
        {
            base.OnDetachFrom(parentEntity, userData);

            m_OnDetachFrom.Invoke(parentEntity, userData);
        }
Esempio n. 13
0
        protected internal override void OnAttachTo(EntityBase parentEntity, Transform parentTransform, object userData)
        {
            base.OnAttachTo(parentEntity, parentTransform, userData);

            m_OnAttachTo.Invoke(parentEntity, parentTransform, userData);
        }
Esempio n. 14
0
        protected internal override void OnDetached(EntityBase childEntity, object userData)
        {
            base.OnDetached(childEntity, userData);

            m_OnDetached.Invoke(childEntity, userData);
        }
Esempio n. 15
0
 /// <summary>
 /// 附加子实体
 /// </summary>
 /// <param name="childEntityId">要附加的子实体的实体编号</param>
 /// <param name="parentEntity">被附加的父实体</param>
 /// <param name="parentTransform">相对于被附加父实体的位置</param>
 public void AttachEntity(int childEntityId, EntityBase parentEntity, Transform parentTransform)
 {
     AttachEntity(GetEntity(childEntityId), parentEntity, parentTransform, null);
 }
Esempio n. 16
0
 /// <summary>
 /// 获取父实体
 /// </summary>
 /// <param name="childEntity">要获取父实体的子实体</param>
 /// <returns>子实体的父实体</returns>
 public EntityBase GetParentEntity(EntityBase childEntity)
 {
     return(m_EntityManager.GetParentEntity(childEntity));
 }
Esempio n. 17
0
 /// <summary>
 /// 附加子实体
 /// </summary>
 /// <param name="childEntity">要附加的子实体</param>
 /// <param name="parentEntityId">被附加的父实体的实体编号</param>
 /// <param name="parentTransform">相对于被附加父实体的位置</param>
 public void AttachEntity(EntityBase childEntity, int parentEntityId, Transform parentTransform)
 {
     AttachEntity(childEntity, GetEntity(parentEntityId), parentTransform, null);
 }
Esempio n. 18
0
 /// <summary>
 /// 附加子实体
 /// </summary>
 /// <param name="childEntityId">要附加的子实体的实体编号</param>
 /// <param name="parentEntity">被附加的父实体</param>
 public void AttachEntity(int childEntityId, EntityBase parentEntity)
 {
     AttachEntity(GetEntity(childEntityId), parentEntity, string.Empty, null);
 }
Esempio n. 19
0
 /// <summary>
 /// 附加子实体
 /// </summary>
 /// <param name="childEntityId">要附加的子实体的实体编号</param>
 /// <param name="parentEntity">被附加的父实体</param>
 /// <param name="userData">用户自定义数据</param>
 public void AttachEntity(int childEntityId, EntityBase parentEntity, object userData)
 {
     AttachEntity(GetEntity(childEntityId), parentEntity, string.Empty, userData);
 }
Esempio n. 20
0
 /// <summary>
 /// 附加子实体
 /// </summary>
 /// <param name="childEntity">要附加的子实体</param>
 /// <param name="parentEntityId">被附加的父实体的实体编号</param>
 public void AttachEntity(EntityBase childEntity, int parentEntityId)
 {
     AttachEntity(childEntity, GetEntity(parentEntityId), string.Empty, null);
 }
Esempio n. 21
0
 /// <summary>
 /// 附加子实体
 /// </summary>
 /// <param name="childEntity">要附加的子实体</param>
 /// <param name="parentEntity">被附加的父实体</param>
 /// <param name="userData">用户自定义数据</param>
 public void AttachEntity(EntityBase childEntity, EntityBase parentEntity, object userData)
 {
     AttachEntity(childEntity, parentEntity, string.Empty, userData);
 }
Esempio n. 22
0
 /// <summary>
 /// 附加子实体
 /// </summary>
 /// <param name="childEntity">要附加的子实体</param>
 /// <param name="parentEntity">被附加的父实体</param>
 public void AttachEntity(EntityBase childEntity, EntityBase parentEntity)
 {
     AttachEntity(childEntity, parentEntity, string.Empty, null);
 }
Esempio n. 23
0
 /// <summary>
 /// 附加子实体
 /// </summary>
 /// <param name="childEntity">要附加的子实体</param>
 /// <param name="parentEntityId">被附加的父实体的实体编号</param>
 /// <param name="parentTransform">相对于被附加父实体的位置</param>
 /// <param name="userData">用户自定义数据</param>
 public void AttachEntity(EntityBase childEntity, int parentEntityId, Transform parentTransform, object userData)
 {
     AttachEntity(childEntity, GetEntity(parentEntityId), parentTransform, userData);
 }
Esempio n. 24
0
 /// <summary>
 /// 附加子实体
 /// </summary>
 /// <param name="childEntityId">要附加的子实体的实体编号</param>
 /// <param name="parentEntity">被附加的父实体</param>
 /// <param name="parentTransformPath">相对于被附加父实体的位置</param>
 public void AttachEntity(int childEntityId, EntityBase parentEntity, string parentTransformPath)
 {
     AttachEntity(GetEntity(childEntityId), parentEntity, parentTransformPath, null);
 }
Esempio n. 25
0
 /// <summary>
 /// 解除子实体
 /// </summary>
 /// <param name="childEntity">要解除的子实体</param>
 /// <param name="userData">用户自定义数据</param>
 public void DetachEntity(EntityBase childEntity, object userData)
 {
     m_EntityManager.DetachEntity(childEntity, userData);
 }
Esempio n. 26
0
 /// <summary>
 /// 附加子实体
 /// </summary>
 /// <param name="childEntity">要附加的子实体</param>
 /// <param name="parentEntityId">被附加的父实体的实体编号</param>
 /// <param name="parentTransformPath">相对于被附加父实体的位置</param>
 public void AttachEntity(EntityBase childEntity, int parentEntityId, string parentTransformPath)
 {
     AttachEntity(childEntity, GetEntity(parentEntityId), parentTransformPath, null);
 }
Esempio n. 27
0
 /// <summary>
 /// 解除所有子实体
 /// </summary>
 /// <param name="parentEntity">被解除的父实体</param>
 /// <param name="userData">用户自定义数据</param>
 public void DetachChildEntities(EntityBase parentEntity, object userData)
 {
     m_EntityManager.DetachChildEntities(parentEntity, userData);
 }
Esempio n. 28
0
        protected internal override void OnAttachTo(EntityBase parentEntity, Transform parentTransform, object userData)
        {
            base.OnAttachTo(parentEntity, parentTransform, userData);

            Name = TextUtil.Format("Wing of {0}", parentEntity.Name);
        }