Navigation

    Colyseus
    • Login
    • Search
    • Recent
    • Tags
    • Users
    1. Home
    2. yty
    yty

    yty

    @yty

    Chat Follow Unfollow
    0
    Reputation
    3
    Posts
    1350
    Profile views
    0
    Followers
    0
    Following
    Joined Last Online

    • Profile
    • More
      • Continue chat with yty
      • Flag Profile
      • Following
      • Followers
      • Topics
      • Posts
      • Best
      • Groups
    yty Follow

    Posts made by yty

    RE: MMO 技术演示

    @COCO
    麻烦可以在出一篇介绍Unity版MMO范例的吗?非常感谢....
    https://docs.colyseus.io/demo/mmo/

    我现在测试下来,装好Mongo后,在arena.env中添加了
    DEMO_DATABASE=mongodb://localhost:27017/demo?retryWrites=true&w=majority
    还是无法让Demo工作,我有不使用colyseus直接用c#去测试我的database是没问题的,感觉是不是还要进行其他配置?我看数据类型似乎是可以不预先指定的,不知道还需要做那些处理。

    posted in 中文 •
    在客户端(U3d)用OnMessage("*",...)接收来自服务器的消息和广播均无效...

    https://docs.colyseus.io/colyseus/server/room/#public-methods

    this.onMessage("*", (client, type, message) => {
    console.log(client.sessionId, "sent", type, message);
    }
    

    如文档所描述,会排除已经注册的,但实际测试下来无效。colyseus 14.20+unity2021.3

    0_1669953295448_14caa51f-46bb-4c37-b619-82b88210836a-image.png

    posted in 中文 •
    请问在客户端(Unity3d)要如何使用LobbyRoom?

    在u3d中定义Room要用泛型的方式。
    private static ColyseusRoom<LobbyRoom> _room = null;

    但客户端中并没有定义LobbyRoom这个类,在文档中有看到,“LobbyRoom 将改为使用 state.@filter()”
    但也找不到定义的State,不清楚是取消了吗?也就是要自己去Schema去实现?

    public partial class MyRoomState : Schema

    posted in 中文 •