diff options
Diffstat (limited to 'scene/2d')
-rw-r--r-- | scene/2d/audio_stream_player_2d.cpp | 8 | ||||
-rw-r--r-- | scene/2d/camera_2d.cpp | 12 | ||||
-rw-r--r-- | scene/2d/physics_body_2d.cpp | 2 | ||||
-rw-r--r-- | scene/2d/ray_cast_2d.cpp | 10 | ||||
-rw-r--r-- | scene/2d/visibility_notifier_2d.cpp | 18 | ||||
-rw-r--r-- | scene/2d/visibility_notifier_2d.h | 2 |
6 files changed, 26 insertions, 26 deletions
diff --git a/scene/2d/audio_stream_player_2d.cpp b/scene/2d/audio_stream_player_2d.cpp index c40aeb764e..73e633139b 100644 --- a/scene/2d/audio_stream_player_2d.cpp +++ b/scene/2d/audio_stream_player_2d.cpp @@ -113,7 +113,7 @@ void AudioStreamPlayer2D::_notification(int p_what) { AudioServer::get_singleton()->remove_callback(_mix_audios, this); } - if (p_what == NOTIFICATION_INTERNAL_FIXED_PROCESS) { + if (p_what == NOTIFICATION_INTERNAL_PHYSICS_PROCESS) { //update anything related to position first, if possible of course @@ -203,7 +203,7 @@ void AudioStreamPlayer2D::_notification(int p_what) { //stop playing if no longer active if (!active) { - set_fixed_process_internal(false); + set_physics_process_internal(false); //do not update, this makes it easier to animate (will shut off otherise) //_change_notify("playing"); //update property in editor emit_signal("finished"); @@ -255,7 +255,7 @@ void AudioStreamPlayer2D::play(float p_from_pos) { if (stream_playback.is_valid()) { setplay = p_from_pos; output_ready = false; - set_fixed_process_internal(true); + set_physics_process_internal(true); } } @@ -270,7 +270,7 @@ void AudioStreamPlayer2D::stop() { if (stream_playback.is_valid()) { active = false; - set_fixed_process_internal(false); + set_physics_process_internal(false); setplay = -1; } } diff --git a/scene/2d/camera_2d.cpp b/scene/2d/camera_2d.cpp index 0d04967f1c..4fcd6893b8 100644 --- a/scene/2d/camera_2d.cpp +++ b/scene/2d/camera_2d.cpp @@ -138,7 +138,7 @@ Transform2D Camera2D::get_camera_transform() { if (smoothing_enabled && !Engine::get_singleton()->is_editor_hint()) { - float c = smoothing * get_fixed_process_delta_time(); + float c = smoothing * get_physics_process_delta_time(); smoothed_camera_pos = ((camera_pos - smoothed_camera_pos) * c) + smoothed_camera_pos; ret_camera_pos = smoothed_camera_pos; //camera_pos=camera_pos*(1.0-smoothing)+new_camera_pos*smoothing; @@ -212,14 +212,14 @@ void Camera2D::_notification(int p_what) { switch (p_what) { - case NOTIFICATION_FIXED_PROCESS: { + case NOTIFICATION_PHYSICS_PROCESS: { _update_scroll(); } break; case NOTIFICATION_TRANSFORM_CHANGED: { - if (!is_fixed_processing()) + if (!is_physics_processing()) _update_scroll(); } break; @@ -241,7 +241,7 @@ void Camera2D::_notification(int p_what) { add_to_group(canvas_group_name); if (Engine::get_singleton()->is_editor_hint()) { - set_fixed_process(false); + set_physics_process(false); } _update_scroll(); @@ -498,9 +498,9 @@ void Camera2D::set_follow_smoothing(float p_speed) { smoothing = p_speed; if (smoothing > 0 && !(is_inside_tree() && Engine::get_singleton()->is_editor_hint())) - set_fixed_process(true); + set_physics_process(true); else - set_fixed_process(false); + set_physics_process(false); } float Camera2D::get_follow_smoothing() const { diff --git a/scene/2d/physics_body_2d.cpp b/scene/2d/physics_body_2d.cpp index c6cd3677cd..d3b37ae903 100644 --- a/scene/2d/physics_body_2d.cpp +++ b/scene/2d/physics_body_2d.cpp @@ -999,7 +999,7 @@ bool KinematicBody2D::move_and_collide(const Vector2 &p_motion, Collision &r_col Vector2 KinematicBody2D::move_and_slide(const Vector2 &p_linear_velocity, const Vector2 &p_floor_direction, float p_slope_stop_min_velocity, int p_max_slides, float p_floor_max_angle) { - Vector2 motion = (floor_velocity + p_linear_velocity) * get_fixed_process_delta_time(); + Vector2 motion = (floor_velocity + p_linear_velocity) * get_physics_process_delta_time(); Vector2 lv = p_linear_velocity; on_floor = false; diff --git a/scene/2d/ray_cast_2d.cpp b/scene/2d/ray_cast_2d.cpp index f90331c411..b272da46f8 100644 --- a/scene/2d/ray_cast_2d.cpp +++ b/scene/2d/ray_cast_2d.cpp @@ -95,7 +95,7 @@ void RayCast2D::set_enabled(bool p_enabled) { enabled = p_enabled; if (is_inside_tree() && !Engine::get_singleton()->is_editor_hint()) - set_fixed_process(p_enabled); + set_physics_process(p_enabled); if (!p_enabled) collided = false; } @@ -135,9 +135,9 @@ void RayCast2D::_notification(int p_what) { case NOTIFICATION_ENTER_TREE: { if (enabled && !Engine::get_singleton()->is_editor_hint()) - set_fixed_process(true); + set_physics_process(true); else - set_fixed_process(false); + set_physics_process(false); if (Object::cast_to<PhysicsBody2D>(get_parent())) { if (exclude_parent_body) @@ -149,7 +149,7 @@ void RayCast2D::_notification(int p_what) { case NOTIFICATION_EXIT_TREE: { if (enabled) - set_fixed_process(false); + set_physics_process(false); } break; @@ -177,7 +177,7 @@ void RayCast2D::_notification(int p_what) { } break; - case NOTIFICATION_FIXED_PROCESS: { + case NOTIFICATION_PHYSICS_PROCESS: { if (!enabled) break; diff --git a/scene/2d/visibility_notifier_2d.cpp b/scene/2d/visibility_notifier_2d.cpp index 8fc8b65217..ca7b6aa0e4 100644 --- a/scene/2d/visibility_notifier_2d.cpp +++ b/scene/2d/visibility_notifier_2d.cpp @@ -154,8 +154,8 @@ void VisibilityEnabler2D::_screen_enter() { _change_node_state(E->key(), true); } - if (enabler[ENABLER_PARENT_FIXED_PROCESS] && get_parent()) - get_parent()->set_fixed_process(true); + if (enabler[ENABLER_PARENT_PHYSICS_PROCESS] && get_parent()) + get_parent()->set_physics_process(true); if (enabler[ENABLER_PARENT_PROCESS] && get_parent()) get_parent()->set_process(true); @@ -169,8 +169,8 @@ void VisibilityEnabler2D::_screen_exit() { _change_node_state(E->key(), false); } - if (enabler[ENABLER_PARENT_FIXED_PROCESS] && get_parent()) - get_parent()->set_fixed_process(false); + if (enabler[ENABLER_PARENT_PHYSICS_PROCESS] && get_parent()) + get_parent()->set_physics_process(false); if (enabler[ENABLER_PARENT_PROCESS] && get_parent()) get_parent()->set_process(false); @@ -246,8 +246,8 @@ void VisibilityEnabler2D::_notification(int p_what) { _find_nodes(from); - if (enabler[ENABLER_PARENT_FIXED_PROCESS] && get_parent()) - get_parent()->set_fixed_process(false); + if (enabler[ENABLER_PARENT_PHYSICS_PROCESS] && get_parent()) + get_parent()->set_physics_process(false); if (enabler[ENABLER_PARENT_PROCESS] && get_parent()) get_parent()->set_process(false); } @@ -339,14 +339,14 @@ void VisibilityEnabler2D::_bind_methods() { ADD_PROPERTYI(PropertyInfo(Variant::BOOL, "pause_particles"), "set_enabler", "is_enabler_enabled", ENABLER_PAUSE_PARTICLES); ADD_PROPERTYI(PropertyInfo(Variant::BOOL, "pause_animated_sprites"), "set_enabler", "is_enabler_enabled", ENABLER_PAUSE_ANIMATED_SPRITES); ADD_PROPERTYI(PropertyInfo(Variant::BOOL, "process_parent"), "set_enabler", "is_enabler_enabled", ENABLER_PARENT_PROCESS); - ADD_PROPERTYI(PropertyInfo(Variant::BOOL, "fixed_process_parent"), "set_enabler", "is_enabler_enabled", ENABLER_PARENT_FIXED_PROCESS); + ADD_PROPERTYI(PropertyInfo(Variant::BOOL, "physics_process_parent"), "set_enabler", "is_enabler_enabled", ENABLER_PARENT_PHYSICS_PROCESS); BIND_ENUM_CONSTANT(ENABLER_FREEZE_BODIES); BIND_ENUM_CONSTANT(ENABLER_PAUSE_ANIMATIONS); BIND_ENUM_CONSTANT(ENABLER_PAUSE_PARTICLES); BIND_ENUM_CONSTANT(ENABLER_PAUSE_ANIMATED_SPRITES); BIND_ENUM_CONSTANT(ENABLER_PARENT_PROCESS); - BIND_ENUM_CONSTANT(ENABLER_PARENT_FIXED_PROCESS); + BIND_ENUM_CONSTANT(ENABLER_PARENT_PHYSICS_PROCESS); BIND_ENUM_CONSTANT(ENABLER_MAX); } @@ -366,7 +366,7 @@ VisibilityEnabler2D::VisibilityEnabler2D() { for (int i = 0; i < ENABLER_MAX; i++) enabler[i] = true; enabler[ENABLER_PARENT_PROCESS] = false; - enabler[ENABLER_PARENT_FIXED_PROCESS] = false; + enabler[ENABLER_PARENT_PHYSICS_PROCESS] = false; visible = false; } diff --git a/scene/2d/visibility_notifier_2d.h b/scene/2d/visibility_notifier_2d.h index ef0e1affd3..ee5152978b 100644 --- a/scene/2d/visibility_notifier_2d.h +++ b/scene/2d/visibility_notifier_2d.h @@ -74,7 +74,7 @@ public: ENABLER_FREEZE_BODIES, ENABLER_PAUSE_PARTICLES, ENABLER_PARENT_PROCESS, - ENABLER_PARENT_FIXED_PROCESS, + ENABLER_PARENT_PHYSICS_PROCESS, ENABLER_PAUSE_ANIMATED_SPRITES, ENABLER_MAX }; |