Files
berry-dash-godot-remake/Scripts/ScoreText.cs
T
Puppet 4593f4f122 Added the speedy berry
yes ik I have only added stuff from the original bd so far but at some
point I do I want to add some original stuff
2025-11-10 22:49:10 -08:00

28 lines
1.0 KiB
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";
} else if (Globals.ActiveEffect == "slow") {
EffectTimerType = "Slowness";
} else if (Globals.ActiveEffect == "speedy") {
EffectTimerType = "Speed";
}
EffectTimerText.Text = EffectTimerType + " " + "expires in: " + Math.Floor(Globals.EffectTimer * 10) / 10 + "s";
}
}
}