message SSPlayerOnlineNtf{ //project social|fruit
message SSPlayerOfflineNtf{ //project social|battleboss|fruit
buildproto.bat
29 lines
582 B
Go
29 lines
582 B
Go
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)
|
||
}
|
||
}
|