背景

Actor 模式非常适合游戏服务器中的角色状态管理。

Actor 模式

1
2
3
4
5
type PlayerActor struct {
    ID    int64
    Gold  int64
    Level int
}