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