Files
berry-dash-godot-remake/Scripts/ScoreText.cs
T
Puppet 213dd83e24 Added a label for the effect timer
It looks a bit weird but I couldn't be bothered to fix it
2025-10-08 23:06:56 -07:00

24 lines
822 B
C#

using Godot;
using System;
public partial class ScoreText : Control {
public override void _Process(double delta) {
Label ScoreText = GetNode<Label>("ScoreLabel");
Label HighScoreText = GetNode<Label>("HighScoreLabel");
Label EffectTimerText = GetNode<Label>("EffectTimerLabel");
ScoreText.Text = "Score: " + Globals.Score;
HighScoreText.Text = "High Score: " + Globals.HighScore;
if (Globals.ActiveEffect == "none") {
EffectTimerText.Text = "";
} else {
string EffectTimerType = "";
if (Globals.ActiveEffect == "ultra") {
EffectTimerType = "Boost";
}
EffectTimerText.Text = EffectTimerType + " " + "expires in: " + Math.Floor(Globals.EffectTimer * 10) / 10 + "s";
}
}
}