Mark InterpolatedCamera as deprecated

InterpolatedCamera has already been removed from the `master` branch.
This adds a deprecation notice to inform people about the upcoming removal
in Godot 4.0.

Its functionality could be replicated in a GDScript add-on with relative
ease.
This commit is contained in:
Hugo Locurcio
2020-09-16 15:36:40 +02:00
parent 16eb7b95be
commit 369e5a7f35
3 changed files with 11 additions and 2 deletions

View File

@ -37,6 +37,8 @@ void InterpolatedCamera::_notification(int p_what) {
switch (p_what) {
case NOTIFICATION_ENTER_TREE: {
WARN_DEPRECATED_MSG("InterpolatedCamera has been deprecated and will be removed in Godot 4.0.");
if (Engine::get_singleton()->is_editor_hint() && enabled)
set_process_internal(false);
@ -131,6 +133,11 @@ real_t InterpolatedCamera::get_speed() const {
return speed;
}
String InterpolatedCamera::get_configuration_warning() const {
return TTR("InterpolatedCamera has been deprecated and will be removed in Godot 4.0.");
}
void InterpolatedCamera::_bind_methods() {
ClassDB::bind_method(D_METHOD("set_target_path", "target_path"), &InterpolatedCamera::set_target_path);

View File

@ -57,6 +57,8 @@ public:
void set_interpolation_enabled(bool p_enable);
bool is_interpolation_enabled() const;
String get_configuration_warning() const;
InterpolatedCamera();
};