MCPcopy Create free account
hub / github.com/Open-GD/OpenGD / destroyPlayer

Method destroyPlayer

Source/PlayLayer.cpp:797–808  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

795}
796
797void PlayLayer::destroyPlayer(PlayerObject* player)
798{
799 if (player->isDead() || player->noclip)
800 return;
801
802 player->setIsDead(true);
803 player->playDeathEffect();
804 player->stopRotation();
805 player->setVisible(false);
806
807 scheduleOnce([&](float d) { resetLevel(); }, 1.f, "playlayer_restart");
808}
809
810void PlayLayer::updateCamera(float dt)
811{

Callers 2

checkCollisionsMethod · 0.95
collidedWithObjectMethod · 0.45

Calls 4

isDeadMethod · 0.80
setIsDeadMethod · 0.80
playDeathEffectMethod · 0.80
stopRotationMethod · 0.80

Tested by

no test coverage detected