Files
berry-dash-godot-remake/Scripts/ScoreText.cs
T
Puppet 870ede5eab Made the slow berry work
All of the berries work now which is nice. I need to add jumping tho and
that sounds annoying.
2025-10-10 13:51:32 -07:00

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