Deprecate a typo for a new method introduced in 3.0.1
This commit is contained in:
parent
a850ebf352
commit
7e5a374825
|
@ -29,6 +29,15 @@
|
|||
<description>
|
||||
</description>
|
||||
</method>
|
||||
<method name="apply_torqe_impulse">
|
||||
<return type="void">
|
||||
</return>
|
||||
<argument index="0" name="j" type="Vector3">
|
||||
</argument>
|
||||
<description>
|
||||
This method is deprecated. Please use [method apply_torque_impulse] instead.
|
||||
</description>
|
||||
</method>
|
||||
<method name="apply_torque_impulse">
|
||||
<return type="void">
|
||||
</return>
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<class name="@C#" category="Core" version="3.0-stable">
|
||||
<class name="@C#" category="Core" version="3.0.2">
|
||||
<brief_description>
|
||||
</brief_description>
|
||||
<description>
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<class name="CSharpScript" inherits="Script" category="Core" version="3.0-stable">
|
||||
<class name="CSharpScript" inherits="Script" category="Core" version="3.0.2">
|
||||
<brief_description>
|
||||
</brief_description>
|
||||
<description>
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<class name="GodotSharp" inherits="Object" category="Core" version="3.0-stable">
|
||||
<class name="GodotSharp" inherits="Object" category="Core" version="3.0.2">
|
||||
<brief_description>
|
||||
</brief_description>
|
||||
<description>
|
||||
|
|
|
@ -94,6 +94,8 @@ void PhysicsDirectBodyState::_bind_methods() {
|
|||
|
||||
ClassDB::bind_method(D_METHOD("add_force", "force", "position"), &PhysicsDirectBodyState::add_force);
|
||||
ClassDB::bind_method(D_METHOD("apply_impulse", "position", "j"), &PhysicsDirectBodyState::apply_impulse);
|
||||
// This typo made it into 3.0.1. We'll leave it in until 3.1
|
||||
ClassDB::bind_method(D_METHOD("apply_torqe_impulse", "j"), &PhysicsDirectBodyState::_apply_torqe_impulse_deprecated);
|
||||
ClassDB::bind_method(D_METHOD("apply_torque_impulse", "j"), &PhysicsDirectBodyState::apply_torque_impulse);
|
||||
|
||||
ClassDB::bind_method(D_METHOD("set_sleep_state", "enabled"), &PhysicsDirectBodyState::set_sleep_state);
|
||||
|
|
|
@ -65,6 +65,13 @@ public:
|
|||
|
||||
virtual void add_force(const Vector3 &p_force, const Vector3 &p_pos) = 0;
|
||||
virtual void apply_impulse(const Vector3 &p_pos, const Vector3 &p_j) = 0;
|
||||
|
||||
void _apply_torqe_impulse_deprecated(const Vector3 &p_j) {
|
||||
WARN_PRINT("This method is deprecated and will be removed in 3.1. Use `apply_torque_impulse` instead.");
|
||||
|
||||
apply_torque_impulse(p_j);
|
||||
}
|
||||
|
||||
virtual void apply_torque_impulse(const Vector3 &p_j) = 0;
|
||||
|
||||
virtual void set_sleep_state(bool p_enable) = 0;
|
||||
|
|
Loading…
Reference in New Issue