Skip to content
Permalink
19ad453044
Go to file
 
 
Cannot retrieve contributors at this time
43 lines (35 sloc) 874 Bytes
using UnityEngine;
using System.Collections;
using UnityEngine.UI;
public class RNG_Dex : MonoBehaviour
{
//Base Values
public int DexValue = 0;
public int DexValue1 = 0;
public int DexValue2 = 0;
public int DexValue3 = 0;
public static string DexString;
Text updates;
void Awake()
{
updates = GetComponent<Text>();
DexString = "Dex:";
}
// Use this for initialization
public void Roll()
{
//Rolls
DexValue1 = Random.Range(1, 6);
DexValue2 = Random.Range(1, 6);
DexValue3 = Random.Range(1, 6);
DexValue = DexValue1 + DexValue2 + DexValue3;
//String Value
DexString = DexValue.ToString();
Debug.Log(DexString);
}
// Update is called once per frame
void Update()
{
updates.text = "Dex: " + DexString;
}
}
You can’t perform that action at this time.