nc5432 3c2d81f584 Main Menu, music, and credits
- Got sprites for menu buttons
- Added buttons to the menu
- Added a manager script for the menu
- Created resources for playlists and credits
- Created a music player
- Created the root scene that everything will be loaded into
2024-05-09 22:21:58 -04:00

40 lines
1.0 KiB
GDScript

extends GPUParticles2D
class_name ChargingAnim
@export var top: Vector2
@export var bottom: Vector2
@onready var effect: AnimatedSprite2D = $AnimatedSprite2D
var charging: bool = false
var timer: float = 1
# Called when the node enters the scene tree for the first time.
func _ready():
pass # Replace with function body.
# Called every frame. 'delta' is the elapsed time since the previous frame.
func _process(delta):
if charging:
effect.position = lerp(bottom, top, timer)
else:
effect.position = lerp(top, bottom, timer)
timer = clampf(timer + delta, 0, 1)
func charge(strength: float, element: Data.Element) -> void:
charging = true
emitting = true
process_material.orbit_velocity_min = strength / 50
process_material.orbit_velocity_max = strength / 40
process_material.scale_min = strength / 5
process_material.scale_max = strength / 4
process_material.anim_speed_min = strength / 5
process_material.anim_speed_max = strength / 4
timer = 0
func disable() -> void:
charging = false
emitting = false
timer = 0