初始化对象

This commit is contained in:
duanhf2012
2020-04-08 21:04:44 +08:00
parent 4445b583fb
commit eecb20ab6c

View File

@@ -38,6 +38,9 @@ type EventProcessor struct {
}
func (slf *EventProcessor) RegEventReciverFunc(eventType EventType,reciverFunc EventReciverFunc){
if slf.mapEventReciverFunc == nil {
slf.mapEventReciverFunc = map[EventType]EventReciverFunc{}
}
slf.mapEventReciverFunc[eventType] = reciverFunc
}