Commit
- Loading branch information
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,78 @@ | ||
using UnityEngine; | ||
using System.Collections; | ||
using UnityEngine.UI; | ||
|
||
public class Generator : MonoBehaviour | ||
{ | ||
public float Str; | ||
public float Dex; | ||
public float Con; | ||
public float Int; | ||
public float Wis; | ||
public float Chr; | ||
public float HP; | ||
|
||
public string StrString; | ||
public string DexString; | ||
public string ConString; | ||
public string IntString; | ||
public string WisString; | ||
public string ChrString; | ||
public string HPString; | ||
|
||
public Text textStr; | ||
public Text textDex; | ||
public Text textCon; | ||
public Text textInt; | ||
public Text textWis; | ||
public Text textChr; | ||
public Text textHP; | ||
|
||
void Start () | ||
{ | ||
Str = 0; | ||
Dex = 0; | ||
Con = 0; | ||
Int = 0; | ||
Wis = 0; | ||
Chr = 0; | ||
HP = 0; | ||
} | ||
|
||
// Update is called once per frame | ||
void Update () | ||
{ | ||
} | ||
|
||
public void Click (string text) | ||
{ | ||
Str = (Random.Range(1, 6) + Random.Range (1,6) + Random.Range (1,6)); | ||
Dex = (Random.Range(1, 6) + Random.Range (1,6) + Random.Range (1,6)); | ||
Con = (Random.Range(1, 6) + Random.Range (1,6) + Random.Range (1,6)); | ||
Int = (Random.Range(1, 6) + Random.Range (1,6) + Random.Range (1,6)); | ||
Wis = (Random.Range(1, 6) + Random.Range (1,6) + Random.Range (1,6)); | ||
Chr = (Random.Range(1, 6) + Random.Range (1,6) + Random.Range (1,6)); | ||
HP = Mathf.Round ( ( Con * 0.10f ) + ( Random.Range (1, 8) ) ) ; | ||
|
||
StrString = Str.ToString(); | ||
textStr.text = StrString; | ||
|
||
DexString = Dex.ToString(); | ||
textDex.text = DexString; | ||
|
||
ConString = Con.ToString(); | ||
textCon.text = ChrString; | ||
|
||
IntString = Int.ToString(); | ||
textInt.text = IntString; | ||
|
||
WisString = Wis.ToString(); | ||
textWis.text = WisString; | ||
|
||
ChrString = Chr.ToString(); | ||
textChr.text = ChrString; | ||
|
||
HPString = HP.ToString(); | ||
textHP.text = HPString; | ||
} | ||
} |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
using UnityEngine; | ||
using System.Collections; | ||
using UnityEngine.UI; | ||
|
||
public class healthGlobal : MonoBehaviour { | ||
|
||
public int Health = 0; | ||
|
||
// Use this for initialization | ||
void Start () { | ||
|
||
} | ||
|
||
// Update is called once per frame | ||
void Update () { | ||
|
||
} | ||
void OnGui () { | ||
|
||
GUILayout.Label ("HP" + Health); | ||
|
||
} | ||
} |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
m_EditorVersion: 5.2.0f3 | ||
m_StandardAssetsVersion: 0 |