| 546 | } |
| 547 | |
| 548 | bool EntityCommandBuffer::DestroyEntity(EntityHandle entity) |
| 549 | { |
| 550 | if (HandleGenerator->IsEntityAlive(entity)) { |
| 551 | auto change = Data.GetOrAddEntityChange(entity); |
| 552 | if ((change->Flags & EntityChangeFlags::Create) == EntityChangeFlags::Create) { |
| 553 | ERR("Cannot create and destroy an entity in the same frame"); |
| 554 | } else { |
| 555 | change->Flags |= EntityChangeFlags::Destroy; |
| 556 | return true; |
| 557 | } |
| 558 | } |
| 559 | |
| 560 | return false; |
| 561 | } |
| 562 | |
| 563 | void* EntityCommandBuffer::GetComponentChange(ComponentTypeIndex type, ComponentFrameStorageIndex const& index) const |
| 564 | { |
nothing calls this directly
no test coverage detected