Destroy a component at a given index
| 145 | |
| 146 | // Destroy a component at a given index |
| 147 | void TransformComponents::destroyComponent(uint32 index) { |
| 148 | |
| 149 | Components::destroyComponent(index); |
| 150 | |
| 151 | assert(mMapEntityToComponentIndex[mBodies[index]] == index); |
| 152 | |
| 153 | mMapEntityToComponentIndex.remove(mBodies[index]); |
| 154 | |
| 155 | mBodies[index].~Entity(); |
| 156 | mTransforms[index].~Transform(); |
| 157 | } |