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_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;
}
}