diff options
| author | Rémi Verschelde | 2017-03-19 00:36:26 +0100 |
|---|---|---|
| committer | Rémi Verschelde | 2017-03-19 00:36:26 +0100 |
| commit | f8db8a3faa30b71dca33ced38be16d3f93f43e8a (patch) | |
| tree | 3b798318132cca7eccfbca5818ab55656a2896d7 /scene/resources/ray_shape.cpp | |
| parent | 1d418afe863c9e553b69174ce63aef203c46d2f0 (diff) | |
| download | godot-f8db8a3faa30b71dca33ced38be16d3f93f43e8a.tar.gz godot-f8db8a3faa30b71dca33ced38be16d3f93f43e8a.tar.zst godot-f8db8a3faa30b71dca33ced38be16d3f93f43e8a.zip | |
Bring that Whole New World to the Old Continent too
Applies the clang-format style to the 2.1 branch as done for master in
5dbf1809c6e3e905b94b8764e99491e608122261.
Diffstat (limited to '')
| -rw-r--r-- | scene/resources/ray_shape.cpp | 17 |
1 files changed, 8 insertions, 9 deletions
diff --git a/scene/resources/ray_shape.cpp b/scene/resources/ray_shape.cpp index cbf9c2c17..a66c93ba8 100644 --- a/scene/resources/ray_shape.cpp +++ b/scene/resources/ray_shape.cpp @@ -34,20 +34,20 @@ Vector<Vector3> RayShape::_gen_debug_mesh_lines() { Vector<Vector3> points; points.push_back(Vector3()); - points.push_back(Vector3(0,0,get_length())); + points.push_back(Vector3(0, 0, get_length())); return points; } void RayShape::_update_shape() { - PhysicsServer::get_singleton()->shape_set_data(get_shape(),length); + PhysicsServer::get_singleton()->shape_set_data(get_shape(), length); emit_changed(); } void RayShape::set_length(float p_length) { - length=p_length; + length = p_length; _update_shape(); notify_change_to_owners(); } @@ -57,17 +57,16 @@ float RayShape::get_length() const { return length; } - void RayShape::_bind_methods() { - ObjectTypeDB::bind_method(_MD("set_length","length"),&RayShape::set_length); - ObjectTypeDB::bind_method(_MD("get_length"),&RayShape::get_length); - - ADD_PROPERTY( PropertyInfo(Variant::REAL,"length",PROPERTY_HINT_RANGE,"0,4096,0.01"), _SCS("set_length"), _SCS("get_length") ); + ObjectTypeDB::bind_method(_MD("set_length", "length"), &RayShape::set_length); + ObjectTypeDB::bind_method(_MD("get_length"), &RayShape::get_length); + ADD_PROPERTY(PropertyInfo(Variant::REAL, "length", PROPERTY_HINT_RANGE, "0,4096,0.01"), _SCS("set_length"), _SCS("get_length")); } -RayShape::RayShape() : Shape( PhysicsServer::get_singleton()->shape_create(PhysicsServer::SHAPE_RAY)) { +RayShape::RayShape() + : Shape(PhysicsServer::get_singleton()->shape_create(PhysicsServer::SHAPE_RAY)) { set_length(1.0); } |
