Initial commit

This commit is contained in:
2020-10-26 00:50:16 -04:00
commit e3358f6dd1
707 changed files with 12028 additions and 0 deletions

24
scripts/PlayerGui.cs Normal file
View File

@@ -0,0 +1,24 @@
using Godot;
using System;
public class PlayerGui : CanvasLayer
{
ProgressBar healtbar;
public override void _Ready()
{
healtbar = GetNode<ProgressBar>("Control/HealthBar");
}
public void OnUpdatePlayerGui(Player player)
{
// Update healthbar
if(healtbar != null)
{
healtbar.MaxValue = player.health.max;
healtbar.MinValue = player.health.min;
healtbar.Value = player.health.value;
} else { GD.Print("WARNING: Healtbar not set!"); }
}
}