Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Part 1 of homework. Still need to work on NPC stats + Fight script.
  • Loading branch information
maf11003 committed Sep 12, 2015
1 parent c27509e commit 783d642
Show file tree
Hide file tree
Showing 36 changed files with 249 additions and 0 deletions.
Binary file added New Unity Project 1/Assets/DnD.unity
Binary file not shown.
8 changes: 8 additions & 0 deletions New Unity Project 1/Assets/DnD.unity.meta

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
56 changes: 56 additions & 0 deletions New Unity Project 1/Assets/Labyrinth Lord Character Sheet.jpg.meta

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 9 additions & 0 deletions New Unity Project 1/Assets/Materials.meta

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Binary file not shown.
8 changes: 8 additions & 0 deletions New Unity Project 1/Assets/Materials/Character Sheet.mat.meta

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Binary file not shown.
8 changes: 8 additions & 0 deletions New Unity Project 1/Assets/Materials/LLCharSheet1d.mat.meta

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Binary file not shown.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Binary file not shown.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Binary file not shown.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 9 additions & 0 deletions New Unity Project 1/Assets/Scripts.meta

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

78 changes: 78 additions & 0 deletions New Unity Project 1/Assets/Scripts/Generator.cs
@@ -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;
}
}
12 changes: 12 additions & 0 deletions New Unity Project 1/Assets/Scripts/Generator.cs.meta

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

23 changes: 23 additions & 0 deletions New Unity Project 1/Assets/Scripts/healthGlobal.cs
@@ -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);

}
}
12 changes: 12 additions & 0 deletions New Unity Project 1/Assets/Scripts/healthGlobal.cs.meta

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
2 changes: 2 additions & 0 deletions New Unity Project 1/ProjectSettings/ProjectVersion.txt
@@ -0,0 +1,2 @@
m_EditorVersion: 5.2.0f3
m_StandardAssetsVersion: 0
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.

0 comments on commit 783d642

Please sign in to comment.