01ea3af253
Apply Godot 4.6 automated conversion: renames Spatial.translate->position, margin_*->offset_*, tool->@tool, .empty()->.is_empty(), DynamicFont->FontFile, onready->@onready, export()->@export, and many more. 127 files changed by the tool. Manual fixes still required for: - godot_db_manager plugin (incompatible APIs: WindowDialog, Tabs, etc.) - lod plugin (Spatial -> Node3D renames) - ResourceLoader.load_interactive removed -> load_threaded_request - OS.set_window_fullscreen removed -> DisplayServer - Viewport.set_size_override removed Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
38 lines
1.6 KiB
GDScript
38 lines
1.6 KiB
GDScript
extends Node
|
|
|
|
var current_material = null
|
|
|
|
func level_hud_slide(node):
|
|
var animation = Animation.new()
|
|
var track_index = animation.add_track(Animation.TYPE_BEZIER)
|
|
var node_element = String(node.get_path()) + ":position:x"
|
|
|
|
animation.track_set_path(track_index, node_element)
|
|
animation.bezier_track_insert_key(track_index, 0.0, 0.0, Vector2(-0.25, 0), Vector2(0.031, 190.492))
|
|
animation.bezier_track_insert_key(track_index, 1.0, 170, Vector2(-0.349, 2.576), Vector2(0.25, 0))
|
|
|
|
return animation
|
|
|
|
func level_hud_warning(node):
|
|
var animation = Animation.new()
|
|
var track_index = animation.add_track(Animation.TYPE_BEZIER)
|
|
var node_element = String(node.get_path()) + ":position:x"
|
|
|
|
animation.track_set_path(track_index, node_element)
|
|
animation.bezier_track_insert_key(track_index, 0.0, 0.0, Vector2(-0.25, 0), Vector2(0, 78.1))
|
|
animation.bezier_track_insert_key(track_index, 0.2, 34.9, Vector2(-0.25, 0), Vector2(0, -66))
|
|
animation.bezier_track_insert_key(track_index, 0.4, 12.1, Vector2(0, 73.2), Vector2(0, -124.8))
|
|
animation.bezier_track_insert_key(track_index, 0.6, -41.9, Vector2(-0.095, 109.2), Vector2(0.062, -58.8))
|
|
animation.bezier_track_insert_key(track_index, 0.8, 13.3, Vector2(-0.188, 93.6), Vector2(0.196, 104.4))
|
|
animation.bezier_track_insert_key(track_index, 1.0, 0.0, Vector2(-0.155, -135.5), Vector2(0.25, 0))
|
|
|
|
return animation
|
|
|
|
func start_dissolve(node, material):
|
|
current_material = material
|
|
node.interpolate_method(self, "animate_dissolve", 0, 1, 1.5, Tween.TRANS_LINEAR, Tween.EASE_IN_OUT)
|
|
node.start()
|
|
|
|
func animate_dissolve(progress: float) -> void:
|
|
current_material.set_shader_parameter("dissolve_amount", ease(progress, 0.4))
|