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

Method Hit

Source/Platformer/UnitAction.cpp:496–505  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

494}
495
496Hit::Hit(Unit* unit)
497 : UnitAction(ActionSetting::UnitActionHit, ActionSetting::PriorityHit, true, unit)
498 , _effect(nullptr) {
499 UnitAction::recovery = ActionSetting::RecoveryHit;
500 auto hitEffect = _owner->getUnitDef()->get(ActionSetting::HitEffect, Slice::Empty);
501 if (!hitEffect.empty()) {
502 _effect = Visual::create(hitEffect);
503 _effect->addTo(_owner);
504 }
505}
506
507Hit::~Hit() { }
508

Callers

nothing calls this directly

Calls 5

getUnitDefMethod · 0.80
addToMethod · 0.80
getMethod · 0.65
createFunction · 0.50
emptyMethod · 0.45

Tested by

no test coverage detected