using Godot; using System; public partial class ManagerPanel : Panel { public bool _hovered = false; public void SetManager(Manager MANAGER) { SetPosition(new Vector2(100, 150)); SetSprite(MANAGER._imagePath); SetValue(MANAGER._health); SetMax(MANAGER._healthMax); } public void SetPosition(Vector2 POSITION) { Position = POSITION; } public void SetSprite(string IMAGEPATH) { GetNode("Image").Texture = GD.Load(IMAGEPATH); } public void SetValue(int VALUE) { GetNode("Health").GetNode("Value").Text = VALUE.ToString(); GetNode("Health").GetNode("Bar").Value = VALUE; } public void SetMax(int MAX) { GetNode("Health").GetNode("Max").Text = MAX.ToString(); GetNode("Health").GetNode("Bar").MaxValue = MAX; } private void OnMouseEntered() { _hovered = true; } private void OnMouseExited() { _hovered = false; } }