MCPcopy Create free account
hub / github.com/IppClub/Dora-SSR / registerRemoveEvent

Method registerRemoveEvent

Source/Entity/Entity.cpp:307–314  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

305}
306
307void Entity::registerRemoveEvent(int index, Own<Value>&& old) {
308 auto& handler = SharedEntityPool.getRemoveHandler(index);
309 if (!handler.IsEmpty()) {
310 _oldComs[index] = std::move(old);
311 SharedEntityPool.updatedEntities.insert(MakeWRef(this));
312 handler(this);
313 }
314}
315
316Value* Entity::getComponent(String name) const {
317 int index = SharedEntityPool.tryGetIndex(name);

Callers 1

EntityPoolMethod · 0.80

Calls 5

moveFunction · 0.85
MakeWRefFunction · 0.85
handlerFunction · 0.85
IsEmptyMethod · 0.80
insertMethod · 0.65

Tested by

no test coverage detected