Merge pull request #42778 from madmiraal/remove-get_layers
Remove old RigidBody get_layers() methods.
This commit is contained in:
commit
14e3d68dd9
5 changed files with 0 additions and 34 deletions
|
@ -86,9 +86,6 @@
|
|||
The physics layers this area scans for collisions. See [url=https://docs.godotengine.org/en/latest/tutorials/physics/physics_introduction.html#collision-layers-and-masks]Collision layers and masks[/url] in the documentation for more information.
|
||||
</member>
|
||||
<member name="input_pickable" type="bool" setter="set_pickable" getter="is_pickable" override="true" default="false" />
|
||||
<member name="layers" type="int" setter="_set_layers" getter="_get_layers">
|
||||
Both [member collision_layer] and [member collision_mask]. Returns [member collision_layer] when accessed. Updates [member collision_layer] and [member collision_mask] when modified.
|
||||
</member>
|
||||
</members>
|
||||
<constants>
|
||||
</constants>
|
||||
|
|
|
@ -42,15 +42,6 @@
|
|||
void PhysicsBody2D::_notification(int p_what) {
|
||||
}
|
||||
|
||||
void PhysicsBody2D::_set_layers(uint32_t p_mask) {
|
||||
set_collision_layer(p_mask);
|
||||
set_collision_mask(p_mask);
|
||||
}
|
||||
|
||||
uint32_t PhysicsBody2D::_get_layers() const {
|
||||
return get_collision_layer();
|
||||
}
|
||||
|
||||
void PhysicsBody2D::_bind_methods() {
|
||||
ClassDB::bind_method(D_METHOD("set_collision_layer", "layer"), &PhysicsBody2D::set_collision_layer);
|
||||
ClassDB::bind_method(D_METHOD("get_collision_layer"), &PhysicsBody2D::get_collision_layer);
|
||||
|
@ -63,13 +54,9 @@ void PhysicsBody2D::_bind_methods() {
|
|||
ClassDB::bind_method(D_METHOD("set_collision_layer_bit", "bit", "value"), &PhysicsBody2D::set_collision_layer_bit);
|
||||
ClassDB::bind_method(D_METHOD("get_collision_layer_bit", "bit"), &PhysicsBody2D::get_collision_layer_bit);
|
||||
|
||||
ClassDB::bind_method(D_METHOD("_set_layers", "mask"), &PhysicsBody2D::_set_layers);
|
||||
ClassDB::bind_method(D_METHOD("_get_layers"), &PhysicsBody2D::_get_layers);
|
||||
|
||||
ClassDB::bind_method(D_METHOD("get_collision_exceptions"), &PhysicsBody2D::get_collision_exceptions);
|
||||
ClassDB::bind_method(D_METHOD("add_collision_exception_with", "body"), &PhysicsBody2D::add_collision_exception_with);
|
||||
ClassDB::bind_method(D_METHOD("remove_collision_exception_with", "body"), &PhysicsBody2D::remove_collision_exception_with);
|
||||
ADD_PROPERTY(PropertyInfo(Variant::INT, "layers", PROPERTY_HINT_LAYERS_2D_PHYSICS, "", 0), "_set_layers", "_get_layers"); //for backwards compat
|
||||
|
||||
ADD_GROUP("Collision", "collision_");
|
||||
ADD_PROPERTY(PropertyInfo(Variant::INT, "collision_layer", PROPERTY_HINT_LAYERS_2D_PHYSICS), "set_collision_layer", "get_collision_layer");
|
||||
|
|
|
@ -44,9 +44,6 @@ class PhysicsBody2D : public CollisionObject2D {
|
|||
uint32_t collision_layer;
|
||||
uint32_t collision_mask;
|
||||
|
||||
void _set_layers(uint32_t p_mask);
|
||||
uint32_t _get_layers() const;
|
||||
|
||||
protected:
|
||||
void _notification(int p_what);
|
||||
PhysicsBody2D(PhysicsServer2D::BodyMode p_mode);
|
||||
|
|
|
@ -130,15 +130,6 @@ void PhysicsBody3D::remove_collision_exception_with(Node *p_node) {
|
|||
PhysicsServer3D::get_singleton()->body_remove_collision_exception(get_rid(), collision_object->get_rid());
|
||||
}
|
||||
|
||||
void PhysicsBody3D::_set_layers(uint32_t p_mask) {
|
||||
set_collision_layer(p_mask);
|
||||
set_collision_mask(p_mask);
|
||||
}
|
||||
|
||||
uint32_t PhysicsBody3D::_get_layers() const {
|
||||
return get_collision_layer();
|
||||
}
|
||||
|
||||
void PhysicsBody3D::_bind_methods() {
|
||||
ClassDB::bind_method(D_METHOD("set_collision_layer", "layer"), &PhysicsBody3D::set_collision_layer);
|
||||
ClassDB::bind_method(D_METHOD("get_collision_layer"), &PhysicsBody3D::get_collision_layer);
|
||||
|
@ -152,9 +143,6 @@ void PhysicsBody3D::_bind_methods() {
|
|||
ClassDB::bind_method(D_METHOD("set_collision_layer_bit", "bit", "value"), &PhysicsBody3D::set_collision_layer_bit);
|
||||
ClassDB::bind_method(D_METHOD("get_collision_layer_bit", "bit"), &PhysicsBody3D::get_collision_layer_bit);
|
||||
|
||||
ClassDB::bind_method(D_METHOD("_set_layers", "mask"), &PhysicsBody3D::_set_layers);
|
||||
ClassDB::bind_method(D_METHOD("_get_layers"), &PhysicsBody3D::_get_layers);
|
||||
|
||||
ADD_GROUP("Collision", "collision_");
|
||||
ADD_PROPERTY(PropertyInfo(Variant::INT, "collision_layer", PROPERTY_HINT_LAYERS_3D_PHYSICS), "set_collision_layer", "get_collision_layer");
|
||||
ADD_PROPERTY(PropertyInfo(Variant::INT, "collision_mask", PROPERTY_HINT_LAYERS_3D_PHYSICS), "set_collision_mask", "get_collision_mask");
|
||||
|
|
|
@ -43,9 +43,6 @@ class PhysicsBody3D : public CollisionObject3D {
|
|||
uint32_t collision_layer;
|
||||
uint32_t collision_mask;
|
||||
|
||||
void _set_layers(uint32_t p_mask);
|
||||
uint32_t _get_layers() const;
|
||||
|
||||
protected:
|
||||
static void _bind_methods();
|
||||
PhysicsBody3D(PhysicsServer3D::BodyMode p_mode);
|
||||
|
|
Loading…
Reference in a new issue