|
|
@@ -24,9 +24,6 @@ static unsigned int next_id() {
|
|
|
collidable::collidable(graphics::object const & obj)
|
|
|
: identity<collidable>(next_id()), render_info_(obj) {}
|
|
|
|
|
|
-collidable::collidable(Json::Value const & json, graphics::manager const & mgr)
|
|
|
- : identity<collidable>(next_id()), render_info_(to_object(json, mgr)) {}
|
|
|
-
|
|
|
void collidable::move(math::vec2 const & delta) {
|
|
|
render_info_.location.origin += delta;
|
|
|
render_info_.points.ll += delta;
|
|
|
@@ -35,8 +32,8 @@ void collidable::move(math::vec2 const & delta) {
|
|
|
render_info_.points.ul += delta;
|
|
|
}
|
|
|
|
|
|
-entity::entity(Json::Value const & json, graphics::manager const & mgr)
|
|
|
- : collidable(json, mgr), velocity(to_vec2(json["velocity"])),
|
|
|
+entity::entity(Json::Value const & json, graphics::object const & obj)
|
|
|
+ : collidable(obj), velocity(to_vec2(json["velocity"])),
|
|
|
frame_texture_coords({make_vector(0.f, 0.f)}),
|
|
|
scale(json["size"].asFloat()), collides_with(0), collides_as(0) {
|
|
|
render_info_.location.size *= scale;
|