gate_model.go 452 B

123456789101112131415161718192021222324252627
  1. package model
  2. import (
  3. "rocommon"
  4. )
  5. var (
  6. updateList []interface{}
  7. ClientMag *ClientUserManager
  8. )
  9. type GateUpdate struct {
  10. rocommon.UpdateModule //eventqueue.go
  11. }
  12. func (this *GateUpdate) Init() {
  13. //不加到更新列表中,有多线程冲突
  14. ClientMag = NewClientUserManager()
  15. }
  16. func (this *GateUpdate) Update(ms uint64) {
  17. //对管理器进行更新操作
  18. for _, data := range updateList {
  19. data.(rocommon.UpdateLogic).Update(ms)
  20. }
  21. }