| 93 | } |
| 94 | |
| 95 | Unit::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 | |
| 106 | static inline Value* assertNotNull(Value* value) { |
| 107 | AssertUnless(value, "Value expected, got null"); |
nothing calls this directly
no test coverage detected