Permalink
Cannot retrieve contributors at this time
using UnityEngine; | |
using System.Collections; | |
using UnityEngine.UI; | |
public class RNG_Wis : MonoBehaviour | |
{ | |
//Base Values | |
public int WisValue = 0; | |
public int WisValue1 = 0; | |
public int WisValue2 = 0; | |
public int WisValue3 = 0; | |
public static string WisString; | |
Text updates; | |
void Awake() | |
{ | |
updates = GetComponent<Text>(); | |
WisString = "Wis:"; | |
} | |
// Use this for initialization | |
public void Roll() | |
{ | |
//Rolls | |
WisValue1 = Random.Range(1, 6); | |
WisValue2 = Random.Range(1, 6); | |
WisValue3 = Random.Range(1, 6); | |
WisValue = WisValue1 + WisValue2 + WisValue3; | |
//String Value | |
WisString = WisValue.ToString(); | |
Debug.Log(WisString); | |
} | |
// Update is called once per frame | |
void Update() | |
{ | |
updates.text = "Wis: " + WisString; | |
} | |
} |