Skip to content
Permalink
19ad453044
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
42 lines (35 sloc) 873 Bytes
using UnityEngine;
using System.Collections;
using UnityEngine.UI;
public class RNG_Int : MonoBehaviour
{
//Base Values
public int IntValue = 0;
public int IntValue1 = 0;
public int IntValue2 = 0;
public int IntValue3 = 0;
public static string IntString;
Text updates;
void Awake()
{
updates = GetComponent<Text>();
IntString = "Int:";
}
// Use this for initialization
public void Roll()
{
//Rolls
IntValue1 = Random.Range(1, 6);
IntValue2 = Random.Range(1, 6);
IntValue3 = Random.Range(1, 6);
IntValue = IntValue1 + IntValue2 + IntValue3;
//String Value
IntString = IntValue.ToString();
Debug.Log(IntString);
}
// Update is called once per frame
void Update()
{
updates.text = "Int: " + IntString;
}
}