feat config
This commit is contained in:
@@ -40,7 +40,7 @@ func NewScene(sid int64, instanceID int) *Instance {
|
||||
UniqueNo: utils.SnowflakeInstance().Generate().Int64(),
|
||||
EventIn: make(chan proto.Message),
|
||||
}
|
||||
s.logger = log.GetLogger().Named(fmt.Sprintf("%v:%v", s.InstanceID, s.UniqueNo))
|
||||
s.logger = log.GetLogger().Named(fmt.Sprintf("instance %v:%v", s.InstanceID, s.UniqueNo))
|
||||
s.ctx, s.cancel = context.WithCancel(context.Background())
|
||||
return s
|
||||
}
|
||||
@@ -83,7 +83,7 @@ func (i *Instance) Start(ttl int64) {
|
||||
i.logger.Infof("new scene start")
|
||||
}
|
||||
|
||||
// 网络帧
|
||||
// 网络帧,将玩家的操作储存起来,到逻辑帧再处理玩家操作
|
||||
func (i *Instance) onEvent(e proto.Message) {
|
||||
switch v := e.(type) {
|
||||
case *grpc_pb.EnterReq:
|
||||
|
||||
Reference in New Issue
Block a user