Skip to content
Permalink
19ad453044
Go to file
 
 
Cannot retrieve contributors at this time
41 lines (34 sloc) 873 Bytes
using UnityEngine;
using System.Collections;
using UnityEngine.UI;
public class RNG_Cha : MonoBehaviour {
//Base Values
public int ChaValue = 0;
public int ChaValue1 = 0;
public int ChaValue2 = 0;
public int ChaValue3 = 0;
public static string ChaString;
Text updates;
void Awake()
{
updates = GetComponent<Text>();
ChaString = "Cha:";
}
// Use this for initialization
public void Roll()
{
//Rolls
ChaValue1 = Random.Range(1, 6);
ChaValue2 = Random.Range(1, 6);
ChaValue3 = Random.Range(1, 6);
ChaValue = ChaValue1 + ChaValue2 + ChaValue3;
//String Value
ChaString = ChaValue.ToString();
Debug.Log(ChaString);
}
// Update is called once per frame
void Update()
{
updates.text = "Cha: " + ChaString;
}
}
You can’t perform that action at this time.