MCPcopy Create free account
hub / github.com/Prograda/Skybolt / setEntity

Method setEntity

src/SkyboltExamples/ExamplesCommon/HudSystem.cpp:222–238  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

220}
221
222void HudSystem::setEntity(sim::Entity* entity)
223{
224 if (mEntity != entity)
225 {
226 if (mEntity)
227 {
228 mEntity->removeListener(this);
229 }
230
231 mEntity = entity;
232
233 if (mEntity)
234 {
235 mEntity->addListener(this);
236 }
237 }
238}
239
240void HudSystem::onDestroy(Entity* entity)
241{

Callers 2

mainFunction · 0.45

Calls 2

removeListenerMethod · 0.80
addListenerMethod · 0.80

Tested by

no test coverage detected