mirror of
https://gitlab.com/MaddoScientisto/cirnogodot.git
synced 2026-06-11 06:18:54 +00:00
Motivation
This commit is contained in:
parent
c9b703a0ae
commit
e73596e464
13 changed files with 100 additions and 34 deletions
|
|
@ -33,6 +33,8 @@ public partial class Hud : CanvasLayer
|
|||
|
||||
[Export] private Label _shieldLabel;
|
||||
[Export] private ProgressBar _shieldBar;
|
||||
|
||||
[Export] private Label _motivationLabel;
|
||||
|
||||
[Export] private Container _itemsContainer;
|
||||
|
||||
|
|
@ -91,18 +93,6 @@ public partial class Hud : CanvasLayer
|
|||
{
|
||||
_gameOverPanel.Show();
|
||||
_playerDead = true;
|
||||
|
||||
// ShowMessage("Game Over");
|
||||
//
|
||||
// var messageTimer = GetNode<Timer>("MessageTimer");
|
||||
// await ToSignal(messageTimer, Timer.SignalName.Timeout);
|
||||
//
|
||||
// var message = GetNode<Label>("Message");
|
||||
// message.Text = "Dodge the Creeps!";
|
||||
// message.Show();
|
||||
//
|
||||
// await ToSignal(GetTree().CreateTimer(1.0), SceneTreeTimer.SignalName.Timeout);
|
||||
// GetNode<Button>("StartButton").Show();
|
||||
}
|
||||
|
||||
public void HideGameOver()
|
||||
|
|
@ -135,6 +125,11 @@ public partial class Hud : CanvasLayer
|
|||
_shieldBar.Value = newValue;
|
||||
}
|
||||
}
|
||||
|
||||
public void UpdateMotivation(float newValue, float maxValue)
|
||||
{
|
||||
_motivationLabel.Text = $"{newValue}%";
|
||||
}
|
||||
|
||||
public void UpdateInteractable(Interactable interactable) {
|
||||
GD.Print($"Interactable ${interactable.Name} entered in HUD");
|
||||
|
|
@ -339,4 +334,6 @@ public partial class Hud : CanvasLayer
|
|||
|
||||
AddInventoryItem(item.Item, item.Count);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue