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

Method Unit

Source/Platformer/Unit.cpp:95–104  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

93}
94
95Unit::Unit(NotNull<Dictionary, 1> unitDef, NotNull<PhysicsWorld, 2> physicsWorld, NotNull<Entity, 3> entity, const Vec2& pos, float rot)
96 : Body(getBodyDef(unitDef), physicsWorld, pos, rot)
97 , _playable(nullptr)
98 , _groundSensor(nullptr)
99 , _detectSensor(nullptr)
100 , _attackSensor(nullptr)
101 , _currentAction(nullptr)
102 , _unitDef(unitDef)
103 , _entity(entity)
104 , _size(unitDef->get(Def::Size, Size::zero)) { }
105
106static inline Value* assertNotNull(Value* value) {
107 AssertUnless(value, "Value expected, got null");

Callers

nothing calls this directly

Calls 3

assertNotNullFunction · 0.85
getStoreMethod · 0.80
getMethod · 0.65

Tested by

no test coverage detected