Skip to content
Snippets Groups Projects
Commit 36be951c authored by Julius Fredrik Einum's avatar Julius Fredrik Einum
Browse files

Renamed StatPanel script

parent 6d7823de
No related branches found
No related tags found
2 merge requests!41Pushing new changes in main into master,!38Juliuses nye super branch merge
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;
}
}
}
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()
{
}
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment