整理代码

This commit is contained in:
flswld
2023-04-16 20:52:39 +08:00
parent e4a263a0a9
commit 9f10142c47
7 changed files with 291 additions and 100 deletions
+10 -3
View File
@@ -312,9 +312,16 @@ func (s *Scene) AddGroupSuite(groupId uint32, suiteId uint8, entityMap map[uint3
}
s.groupMap[groupId] = group
}
group.suiteMap[suiteId] = &Suite{
id: suiteId,
entityMap: entityMap,
suite, exist := group.suiteMap[suiteId]
if !exist {
suite = &Suite{
id: suiteId,
entityMap: make(map[uint32]*Entity),
}
group.suiteMap[suiteId] = suite
}
for k, v := range entityMap {
suite.entityMap[k] = v
}
}