31 lines
607 B
C#
31 lines
607 B
C#
using System.Collections;
|
|
using System.Collections.Generic;
|
|
using UnityEngine;
|
|
using TMPro;
|
|
using UnityEngine.UI;
|
|
public class XpPass : MonoBehaviour
|
|
{
|
|
public TMP_Text nextLevelTxt;
|
|
public Slider levelSlider;
|
|
|
|
public int maxLevels;
|
|
void Start()
|
|
{
|
|
Refresh();
|
|
}
|
|
|
|
public void Show(){
|
|
Refresh();
|
|
gameObject.SetActive(true);
|
|
}
|
|
|
|
public void Hide(){
|
|
gameObject.SetActive(false);
|
|
}
|
|
|
|
void Refresh(){
|
|
nextLevelTxt.text = (DBmanager.LevelInt +1).ToString();
|
|
levelSlider.value = DBmanager.Level / (float)maxLevels;
|
|
}
|
|
}
|