Fantasy
搜索结果

    显示/隐藏目录

    RouteComponent 类

    自定义Route组件、如果要自定义Route协议必须使用这个组件

    继承
    object
    Entity
    RouteComponent
    实现
    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.Network
    程序集: Fantasy.Net.dll
    语法
    public sealed class RouteComponent : Entity, IEntity, IDisposable, IPool

    字段

    | 编辑本文 查看源代码

    RouteAddress

    存储路由类型和路由ID的映射关系。

    声明
    public readonly Dictionary<long, long> RouteAddress
    字段值
    类型 描述
    Dictionary<long, long>

    方法

    | 编辑本文 查看源代码

    AddAddress(long, long)

    添加路由类型和路由ID的映射关系。

    声明
    public void AddAddress(long routeType, long routeId)
    参数
    类型 名称 描述
    long routeType

    路由类型。

    long routeId

    路由ID。

    | 编辑本文 查看源代码

    Dispose()

    释放组件资源,清空映射关系。

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

    GetRouteId(long)

    获取指定路由类型的路由ID。

    声明
    public long GetRouteId(long routeType)
    参数
    类型 名称 描述
    long routeType

    路由类型。

    返回
    类型 描述
    long

    路由ID。

    | 编辑本文 查看源代码

    RemoveAddress(long)

    移除指定路由类型的映射关系。

    声明
    public void RemoveAddress(long routeType)
    参数
    类型 名称 描述
    long routeType

    路由类型。

    | 编辑本文 查看源代码

    TryGetRouteId(long, out long)

    尝试获取指定路由类型的路由ID。

    声明
    public bool TryGetRouteId(long routeType, out long routeId)
    参数
    类型 名称 描述
    long routeType

    路由类型。

    long routeId

    输出的路由ID。

    返回
    类型 描述
    bool

    如果获取成功返回true,否则返回false。

    实现

    IEntity
    IDisposable
    IPool

    扩展方法

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