extends RichTextLabel @export var current_score = 0 @export var current_second_score = 0 @export var total_score = 0 @export var prev_second_scores: Array @onready var score_per_second = $"../Score Per Second" @onready var narration = $"../Narration" # 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): pass func update(score): if score >= 0: current_second_score += score current_score += score total_score += score update_text(current_score) func update_text(score_num): text = "Energy: " + str(current_score) func _on_interface_ready(): pass # Replace with function body. func _on_score_update(click_value): update(click_value)