Fantasy
搜索结果

    显示/隐藏目录

    MessagePoolComponent 类

    消息的对象池组件

    继承
    object
    Entity
    MessagePoolComponent
    实现
    IEntity
    IDisposable
    IPool
    继承成员
    Entity.Id
    Entity.RunTimeId
    Entity.IsDisposed
    Entity.Scene
    Entity.Parent
    Entity.Type
    Entity.GetParent<T>()
    Entity.Create<T>(Scene, bool, bool)
    Entity.Create<T>(Scene, long, bool, bool)
    Entity.AddComponent<T>(bool)
    Entity.AddComponent<T>(long, bool)
    Entity.AddComponent(Entity)
    Entity.AddComponent<T>(T)
    Entity.GetComponent<T>()
    Entity.GetComponent(Type)
    Entity.GetComponent<T>(long)
    Entity.GetOrAddComponent<T>(bool)
    Entity.RemoveComponent<T>(bool)
    Entity.RemoveComponent<T>(long, bool)
    Entity.RemoveComponent(Entity, bool)
    Entity.RemoveComponent<T>(T, bool)
    Entity.Deserialize(Scene, bool)
    Entity.ForEachSingleCollection
    Entity.ForEachTransfer
    Entity.ForEachMultiEntity
    Entity.ForEachEntity
    Entity.IsPool()
    Entity.SetIsPool(bool)
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.ReferenceEquals(object, object)
    object.ToString()
    命名空间: Fantasy.Entitas
    程序集: Fantasy.Net.dll
    语法
    public sealed class MessagePoolComponent : Entity, IEntity, IDisposable, IPool

    方法

    | 编辑本文 查看源代码

    Dispose()

    销毁组件

    声明
    public override void Dispose()
    重写
    Entity.Dispose()
    | 编辑本文 查看源代码

    Rent(Type)

    Rent(Type)

    声明
    [MethodImpl(MethodImplOptions.AggressiveInlining)]
    public AMessage Rent(Type type)
    参数
    类型 名称 描述
    Type type

    消息的类型

    返回
    类型 描述
    AMessage
    异常
    类型 条件
    NotSupportedException
    | 编辑本文 查看源代码

    Rent<T>()

    从对象池里获取一个消息,如果没有就创建一个新的

    声明
    public T Rent<T>() where T : AMessage, new()
    返回
    类型 描述
    T
    类型参数
    名称 描述
    T

    消息的泛型类型

    | 编辑本文 查看源代码

    Return(AMessage)

    返还一个消息到对象池中

    声明
    public void Return(AMessage obj)
    参数
    类型 名称 描述
    AMessage obj
    | 编辑本文 查看源代码

    Return<T>(T)

    Return(AMessage)

    声明
    public void Return<T>(T obj) where T : AMessage
    参数
    类型 名称 描述
    T obj

    返还的消息

    类型参数
    名称 描述
    T

    返还的消息泛型类型

    实现

    IEntity
    IDisposable
    IPool

    扩展方法

    JsonHelper.ToJson<T>(T)
    • 编辑本文
    • 查看源代码
    本文内容
    Back to top Generated by DocFX