Permalink
Cannot retrieve contributors at this time
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?
Intro_Scritping/DnD Project/Assets/RNG_Str.cs
Go to fileThis commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
51 lines (38 sloc)
1.03 KB
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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; | |
private string StrString; | |
// Use this for initialization | |
void Start() { | |
//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; | |
} | |
// Use this for initialization | |
void start () | |
{ | |
//setPropertyModification(RNG_Str as Text as strText); | |
// UnityEditor.PrefabUtility.ReplacePrefab(strText, strText); | |
//strText.guiText. | |
} | |
// Update is called once per frame | |
void Update() | |
{ | |
} | |
} |