/// <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); }
/// <summary> /// 解除所有子实体 /// </summary> /// <param name="parentEntity">被解除的父实体</param> public void DetachChildEntities(EntityBase parentEntity) { m_EntityManager.DetachChildEntities(parentEntity); }
protected internal override void OnAttached(EntityBase childEntity, Transform parentTransform, object userData) { base.OnAttached(childEntity, parentTransform, userData); m_OnAttached.Invoke(childEntity, parentTransform, userData); }
/// <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); }
/// <summary> /// 解除子实体 /// </summary> /// <param name="childEntity">要解除的子实体</param> public void DetachEntity(EntityBase childEntity) { m_EntityManager.DetachEntity(childEntity); }
/// <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); }
/// <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); }
/// <summary> /// 隐藏实体 /// </summary> /// <param name="entity">实体</param> public void HideEntity(EntityBase entity) { m_EntityManager.HideEntity(entity); }
/// <summary> /// 隐藏实体 /// </summary> /// <param name="entity">实体</param> /// <param name="userData">用户自定义数据</param> public void HideEntity(EntityBase entity, object userData) { m_EntityManager.HideEntity(entity, userData); }
protected internal override void OnDetached(EntityBase childEntity, object userData) { base.OnDetached(childEntity, userData); m_Owner.GetOrAddUnitComponent <AnimatorComponent>().SetBoolValue(Constant.AnimatorParam.IsRide, false); }
/// <summary> /// 是否是合法的实体 /// </summary> /// <param name="entity">实体</param> /// <returns>实体是否合法</returns> public bool IsValidEntity(EntityBase entity) { return(m_EntityManager.IsValidEntity(entity)); }
protected internal override void OnDetachFrom(EntityBase parentEntity, object userData) { base.OnDetachFrom(parentEntity, userData); m_OnDetachFrom.Invoke(parentEntity, userData); }
protected internal override void OnAttachTo(EntityBase parentEntity, Transform parentTransform, object userData) { base.OnAttachTo(parentEntity, parentTransform, userData); m_OnAttachTo.Invoke(parentEntity, parentTransform, userData); }
protected internal override void OnDetached(EntityBase childEntity, object userData) { base.OnDetached(childEntity, userData); m_OnDetached.Invoke(childEntity, userData); }
/// <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); }
/// <summary> /// 获取父实体 /// </summary> /// <param name="childEntity">要获取父实体的子实体</param> /// <returns>子实体的父实体</returns> public EntityBase GetParentEntity(EntityBase childEntity) { return(m_EntityManager.GetParentEntity(childEntity)); }
/// <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); }
/// <summary> /// 附加子实体 /// </summary> /// <param name="childEntityId">要附加的子实体的实体编号</param> /// <param name="parentEntity">被附加的父实体</param> public void AttachEntity(int childEntityId, EntityBase parentEntity) { AttachEntity(GetEntity(childEntityId), parentEntity, string.Empty, null); }
/// <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); }
/// <summary> /// 附加子实体 /// </summary> /// <param name="childEntity">要附加的子实体</param> /// <param name="parentEntityId">被附加的父实体的实体编号</param> public void AttachEntity(EntityBase childEntity, int parentEntityId) { AttachEntity(childEntity, GetEntity(parentEntityId), string.Empty, null); }
/// <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); }
/// <summary> /// 附加子实体 /// </summary> /// <param name="childEntity">要附加的子实体</param> /// <param name="parentEntity">被附加的父实体</param> public void AttachEntity(EntityBase childEntity, EntityBase parentEntity) { AttachEntity(childEntity, parentEntity, string.Empty, null); }
/// <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); }
/// <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); }
/// <summary> /// 解除子实体 /// </summary> /// <param name="childEntity">要解除的子实体</param> /// <param name="userData">用户自定义数据</param> public void DetachEntity(EntityBase childEntity, object userData) { m_EntityManager.DetachEntity(childEntity, userData); }
/// <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); }
/// <summary> /// 解除所有子实体 /// </summary> /// <param name="parentEntity">被解除的父实体</param> /// <param name="userData">用户自定义数据</param> public void DetachChildEntities(EntityBase parentEntity, object userData) { m_EntityManager.DetachChildEntities(parentEntity, userData); }
protected internal override void OnAttachTo(EntityBase parentEntity, Transform parentTransform, object userData) { base.OnAttachTo(parentEntity, parentTransform, userData); Name = TextUtil.Format("Wing of {0}", parentEntity.Name); }