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
52 lines (39 sloc) 1011 Bytes
using UnityEngine;
using System.Collections;
using UnityEngine.UI;
public class RNG_Str : MonoBehaviour {
public Canvas GameCanvas;
public int StrValue = 0;
public int StrValue1 = 0;
public int StrValue2 = 0;
public int StrValue3 = 0;
public static string StrString;
Text updates;
void Awake()
{
updates = GetComponent<Text>();
StrString = "Str:";
}
// Use this for initialization
public void Roll()
{
//Strength Rolls
StrValue1 = Random.Range(1, 6);
StrValue2 = Random.Range(1, 6);
StrValue3 = Random.Range(1, 6);
StrValue = StrValue1 + StrValue2 + StrValue3;
//String Value
StrString = StrValue.ToString();
Debug.Log(StrString);
}
public Text strText;
public void SetText(string text)
{
strText.text = StrString;
}
// Update is called once per frame
void Update()
{
updates.text = "Str: " + StrString;
}
}