|
@@ -239,7 +239,7 @@ real_t StaticBody2D::get_bounce() const {
|
|
|
|
|
|
return physics_material_override->get_bounce();
|
|
|
}
|
|
|
-#endif
|
|
|
+#endif // DISABLE_DEPRECATED
|
|
|
|
|
|
void StaticBody2D::set_physics_material_override(const Ref<PhysicsMaterial> &p_physics_material_override) {
|
|
|
if (physics_material_override.is_valid()) {
|
|
@@ -264,11 +264,14 @@ void StaticBody2D::_bind_methods() {
|
|
|
ClassDB::bind_method(D_METHOD("set_constant_angular_velocity", "vel"), &StaticBody2D::set_constant_angular_velocity);
|
|
|
ClassDB::bind_method(D_METHOD("get_constant_linear_velocity"), &StaticBody2D::get_constant_linear_velocity);
|
|
|
ClassDB::bind_method(D_METHOD("get_constant_angular_velocity"), &StaticBody2D::get_constant_angular_velocity);
|
|
|
+
|
|
|
+#ifndef DISABLE_DEPRECATED
|
|
|
ClassDB::bind_method(D_METHOD("set_friction", "friction"), &StaticBody2D::set_friction);
|
|
|
ClassDB::bind_method(D_METHOD("get_friction"), &StaticBody2D::get_friction);
|
|
|
|
|
|
ClassDB::bind_method(D_METHOD("set_bounce", "bounce"), &StaticBody2D::set_bounce);
|
|
|
ClassDB::bind_method(D_METHOD("get_bounce"), &StaticBody2D::get_bounce);
|
|
|
+#endif // DISABLE_DEPRECATED
|
|
|
|
|
|
ClassDB::bind_method(D_METHOD("set_physics_material_override", "physics_material_override"), &StaticBody2D::set_physics_material_override);
|
|
|
ClassDB::bind_method(D_METHOD("get_physics_material_override"), &StaticBody2D::get_physics_material_override);
|
|
@@ -277,8 +280,10 @@ void StaticBody2D::_bind_methods() {
|
|
|
|
|
|
ADD_PROPERTY(PropertyInfo(Variant::VECTOR2, "constant_linear_velocity"), "set_constant_linear_velocity", "get_constant_linear_velocity");
|
|
|
ADD_PROPERTY(PropertyInfo(Variant::REAL, "constant_angular_velocity"), "set_constant_angular_velocity", "get_constant_angular_velocity");
|
|
|
+#ifndef DISABLE_DEPRECATED
|
|
|
ADD_PROPERTY(PropertyInfo(Variant::REAL, "friction", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_friction", "get_friction");
|
|
|
ADD_PROPERTY(PropertyInfo(Variant::REAL, "bounce", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_bounce", "get_bounce");
|
|
|
+#endif // DISABLE_DEPRECATED
|
|
|
ADD_PROPERTY(PropertyInfo(Variant::OBJECT, "physics_material_override", PROPERTY_HINT_RESOURCE_TYPE, "PhysicsMaterial"), "set_physics_material_override", "get_physics_material_override");
|
|
|
}
|
|
|
|
|
@@ -660,7 +665,7 @@ real_t RigidBody2D::get_bounce() const {
|
|
|
|
|
|
return physics_material_override->get_bounce();
|
|
|
}
|
|
|
-#endif
|
|
|
+#endif // DISABLE_DEPRECATED
|
|
|
|
|
|
void RigidBody2D::set_physics_material_override(const Ref<PhysicsMaterial> &p_physics_material_override) {
|
|
|
if (physics_material_override.is_valid()) {
|
|
@@ -963,11 +968,13 @@ void RigidBody2D::_bind_methods() {
|
|
|
ClassDB::bind_method(D_METHOD("set_weight", "weight"), &RigidBody2D::set_weight);
|
|
|
ClassDB::bind_method(D_METHOD("get_weight"), &RigidBody2D::get_weight);
|
|
|
|
|
|
+#ifndef DISABLE_DEPRECATED
|
|
|
ClassDB::bind_method(D_METHOD("set_friction", "friction"), &RigidBody2D::set_friction);
|
|
|
ClassDB::bind_method(D_METHOD("get_friction"), &RigidBody2D::get_friction);
|
|
|
|
|
|
ClassDB::bind_method(D_METHOD("set_bounce", "bounce"), &RigidBody2D::set_bounce);
|
|
|
ClassDB::bind_method(D_METHOD("get_bounce"), &RigidBody2D::get_bounce);
|
|
|
+#endif // DISABLE_DEPRECATED
|
|
|
|
|
|
ClassDB::bind_method(D_METHOD("set_physics_material_override", "physics_material_override"), &RigidBody2D::set_physics_material_override);
|
|
|
ClassDB::bind_method(D_METHOD("get_physics_material_override"), &RigidBody2D::get_physics_material_override);
|
|
@@ -1036,8 +1043,10 @@ void RigidBody2D::_bind_methods() {
|
|
|
ADD_PROPERTY(PropertyInfo(Variant::REAL, "mass", PROPERTY_HINT_EXP_RANGE, "0.01,65535,0.01"), "set_mass", "get_mass");
|
|
|
ADD_PROPERTY(PropertyInfo(Variant::REAL, "inertia", PROPERTY_HINT_EXP_RANGE, "0.01,65535,0.01", 0), "set_inertia", "get_inertia");
|
|
|
ADD_PROPERTY(PropertyInfo(Variant::REAL, "weight", PROPERTY_HINT_EXP_RANGE, "0.01,65535,0.01", PROPERTY_USAGE_EDITOR), "set_weight", "get_weight");
|
|
|
+#ifndef DISABLE_DEPRECATED
|
|
|
ADD_PROPERTY(PropertyInfo(Variant::REAL, "friction", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_friction", "get_friction");
|
|
|
ADD_PROPERTY(PropertyInfo(Variant::REAL, "bounce", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_bounce", "get_bounce");
|
|
|
+#endif // DISABLE_DEPRECATED
|
|
|
ADD_PROPERTY(PropertyInfo(Variant::OBJECT, "physics_material_override", PROPERTY_HINT_RESOURCE_TYPE, "PhysicsMaterial"), "set_physics_material_override", "get_physics_material_override");
|
|
|
ADD_PROPERTY(PropertyInfo(Variant::REAL, "gravity_scale", PROPERTY_HINT_RANGE, "-128,128,0.01"), "set_gravity_scale", "get_gravity_scale");
|
|
|
ADD_PROPERTY(PropertyInfo(Variant::BOOL, "custom_integrator"), "set_use_custom_integrator", "is_using_custom_integrator");
|