Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type GameFramework ¶
type GameFramework interface { gira.Framework GetConfig() *config.GameConfig SessionCount() int64 // 将消息推送给玩家, 不保证消息已经被处理,如果玩家当前不在线,消息将会推送失败,但不会返回错误 Push(ctx context.Context, userId string, req gira.ProtoPush) error // 会将消息推送到玩家的消息队列中,但不等待结果,如果玩家不在线,会返回错误 MustPush(ctx context.Context, userId string, req gira.ProtoPush) (err error) }
type HallHandler ¶
type Player ¶
type Player interface { // 加载数据 Load(ctx context.Context, memberId string, userId string) error // 断开连接,登出 Logout(ctx context.Context) error // 保存数据 BgSave(ctx context.Context) error Update() }
玩家接口
type UserAvatar ¶
Click to show internal directories.
Click to hide internal directories.