diff --git a/MrBigsock/Assets/Code/UI/StatPanel.cs b/MrBigsock/Assets/Code/UI/StatPanel.cs new file mode 100644 index 0000000000000000000000000000000000000000..6b5939497b5adecde1c4814b6a51894840bb0246 --- /dev/null +++ b/MrBigsock/Assets/Code/UI/StatPanel.cs @@ -0,0 +1,60 @@ +using System.Collections; +using System.Collections.Generic; +using TMPro; +using UnityEngine; +using UnityEngine.UI; + +namespace BigSock.UI +{ + public class StatPanel : MonoBehaviour + { + //Variables for game objects. + public Slider hpSlider, mpSlider, spSlider, dmgSlider, speedSlider, luckSlider, concSlider; + public Button hpUp, hpDown, mpUp, mpDown, spUp, spDown, dmgUp, dmgDown, speedUp, speedDown, luckUp, luckDown, concUp, concDown, save; + public GameObject pointIndicator; + + //holds text component of text mesh pro object. + private TextMeshProUGUI pointIndicatorText; + + //used to show the player how many points they have left. + public int xpPoints; + + private void Start() + { + //Sets text component of point indicator. + pointIndicatorText = pointIndicator.GetComponent<TextMeshProUGUI>(); + + } + + private void Update() + { + pointIndicatorText.text = xpPoints.ToString(); + } + + /* + Renders up-buttons unclickable + */ + private void SetUpUnclicable() + { + hpUp.enabled = false; + mpUp.enabled = false; + spUp.enabled = false; + dmgUp.enabled = false; + speedUp.enabled = false; + luckUp.enabled = false; + concUp.enabled = false; + } + + private void SetUpClicable() + { + hpUp.enabled = true; + mpUp.enabled = true; + spUp.enabled = true; + dmgUp.enabled = true; + speedUp.enabled = true; + luckUp.enabled = true; + concUp.enabled = true; + } + } +} + diff --git a/MrBigsock/Assets/Code/UI/StatPanelScript.cs.meta b/MrBigsock/Assets/Code/UI/StatPanel.cs.meta similarity index 100% rename from MrBigsock/Assets/Code/UI/StatPanelScript.cs.meta rename to MrBigsock/Assets/Code/UI/StatPanel.cs.meta diff --git a/MrBigsock/Assets/Code/UI/StatPanelScript.cs b/MrBigsock/Assets/Code/UI/StatPanelScript.cs deleted file mode 100644 index c60b15e6ea7d4e515551535bd1ac08386c408a15..0000000000000000000000000000000000000000 --- a/MrBigsock/Assets/Code/UI/StatPanelScript.cs +++ /dev/null @@ -1,18 +0,0 @@ -using System.Collections; -using System.Collections.Generic; -using UnityEngine; - -public class StatPanelScript : MonoBehaviour -{ - // Start is called before the first frame update - void Start() - { - - } - - // Update is called once per frame - void Update() - { - - } -}