Skip to content
Permalink
master
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Go to file
 
 
Cannot retrieve contributors at this time
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;
}
}