【IBP灯组件问题】

This commit is contained in:
weizhihong 2023-11-02 13:21:14 +08:00
parent d3c2cfd003
commit 6a9bb6b286

View File

@ -33,7 +33,7 @@ func NewButtonEntity(w ecs.World, data *repository.Button, entityMap map[string]
component.UidType.SetValue(entry, component.Uid{Id: uid}) component.UidType.SetValue(entry, component.Uid{Id: uid})
// 带灯按钮 // 带灯按钮
if data.HasLight() { if data.HasLight() {
entry.AddComponent(component.SingleLightType, unsafe.Pointer(NewLightEntity(w))) entry.AddComponent(component.SingleLightType, unsafe.Pointer(&component.SingleLight{Light: NewLightEntity(w)}))
} }
entityMap[uid] = entry entityMap[uid] = entry
} }