Convert demos to Godot 4 using regular expressions in a script

This commit is contained in:
Aaron Franke
2022-03-26 05:00:50 -05:00
parent 410d783126
commit bbe50fc9da
1095 changed files with 13628 additions and 13557 deletions

View File

@@ -10,7 +10,7 @@ func _physics_process(delta):
if is_on_floor():
floor_snap_length = 0.2
else:
motion_velocity += Vector3.DOWN * _gravity * delta
velocity += Vector3.DOWN * _gravity * delta
floor_snap_length = 0.0
floor_stop_on_slope = _stop_on_slopes

View File

@@ -7,7 +7,7 @@ var _entry_template
func _enter_tree():
Log.connect("entry_logged", Callable(self, "_on_log_entry"))
Log.connect(&"entry_logged", Callable(self, "_on_log_entry"))
_entry_template = get_child(0) as Label
remove_child(_entry_template)

View File

@@ -8,7 +8,7 @@ var _attachment
func _ready():
_pos_offset = rect_position
_pos_offset = position
_attachment = get_parent() as Node3D
@@ -27,4 +27,4 @@ func _process(_delta):
var world_pos = world_offset + _attachment.global_transform.origin
var screen_pos = camera.unproject_position(world_pos)
rect_position = _pos_offset + screen_pos - 0.5 * rect_size
position = _pos_offset + screen_pos - 0.5 * size

View File

@@ -44,7 +44,7 @@ func _add_popup(parent_popup, path, label):
parent_popup.add_child(popup_menu)
parent_popup.add_submenu_item(label, label)
popup_menu.connect("index_pressed", Callable(self, "_on_item_pressed"), [popup_menu, path])
popup_menu.connect(&"index_pressed", Callable(self, "_on_item_pressed"), [popup_menu, path])
return popup_menu

View File

@@ -1,10 +1,10 @@
extends ScrollContainer
@export var auto_scroll = false
@export var auto_scroll: bool = false
func _process(_delta):
if auto_scroll:
var scrollbar = get_v_scrollbar()
var scrollbar = get_v_scroll_bar()
scrollbar.value = scrollbar.max_value