| 296 | } |
| 297 | |
| 298 | void Entity::registerUpdateEvent(int index, Own<Value>&& old) { |
| 299 | auto& handler = SharedEntityPool.getChangeHandler(index); |
| 300 | if (!handler.IsEmpty()) { |
| 301 | _oldComs[index] = std::move(old); |
| 302 | SharedEntityPool.updatedEntities.insert(MakeWRef(this)); |
| 303 | handler(this); |
| 304 | } |
| 305 | } |
| 306 | |
| 307 | void Entity::registerRemoveEvent(int index, Own<Value>&& old) { |
| 308 | auto& handler = SharedEntityPool.getRemoveHandler(index); |