Modified inheriting a class for Box2D