fatiao 9c39586fbb 为fruit增加一个服务消息
message SSPlayerOnlineNtf{  //project social|fruit
message SSPlayerOfflineNtf{ //project social|battleboss|fruit
buildproto.bat
2025-06-09 11:19:43 +08:00

29 lines
582 B
Go
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

package model
import (
"rocommon"
)
var (
updateList []interface{}
fruitManager *FruitManager = nil
)
type FruitUpdate struct {
rocommon.UpdateModule //eventqueue.go
}
// 定义初始化模块比方说角色管理模块任务模块等然后通过update来处理定时器相关的处理
func (self *FruitUpdate) Init() {
fruitManager = newFruitManager()
updateList = append(updateList, fruitManager)
}
func (self *FruitUpdate) Update(ms uint64) {
//对管理器进行更新操作
for _, data := range updateList {
data.(rocommon.UpdateLogic).Update(ms)
}
}