场景物件实体状态更新

This commit is contained in:
flswld
2023-03-27 20:58:38 +08:00
parent f4802e1448
commit ca79a5bbf0
6 changed files with 87 additions and 29 deletions
+15
View File
@@ -508,6 +508,17 @@ func (g *Group) GetAllEntity() map[uint32]*Entity {
return entityMap
}
func (g *Group) GetEntityByConfigId(configId uint32) *Entity {
for _, suite := range g.suiteMap {
for _, entity := range suite.entityMap {
if entity.configId == configId {
return entity
}
}
}
return nil
}
func (s *Suite) GetEntityById(entityId uint32) *Entity {
return s.entityMap[entityId]
}
@@ -662,6 +673,10 @@ func (g *GadgetEntity) GetGadgetState() uint32 {
return g.gadgetState
}
func (g *GadgetEntity) SetGadgetState(v uint32) {
g.gadgetState = v
}
func (g *GadgetEntity) GetGadgetClientEntity() *GadgetClientEntity {
return g.gadgetClientEntity
}