Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Combat System Project
Submission of Combat System Project.
  • Loading branch information
jaf13010 committed Sep 15, 2015
1 parent 32a800f commit 41c9a7f
Show file tree
Hide file tree
Showing 125 changed files with 3,196 additions and 114 deletions.
1 change: 1 addition & 0 deletions Assembly-CSharp-vs.csproj
Expand Up @@ -47,6 +47,7 @@
</ItemGroup>
<ItemGroup>
<Compile Include="Assets\Scripts\HelloWorld.cs" />
<Compile Include="Assets\TextBox.cs" />
<Reference Include="UnityEngine.UI">
<HintPath>/Applications/Unity/Unity.app/Contents/UnityExtensions/Unity/GUISystem/UnityEngine.UI.dll</HintPath>
</Reference>
Expand Down
1 change: 1 addition & 0 deletions Assembly-CSharp.csproj
Expand Up @@ -47,6 +47,7 @@
</ItemGroup>
<ItemGroup>
<Compile Include="Assets\Scripts\HelloWorld.cs" />
<Compile Include="Assets\TextBox.cs" />
<Reference Include="UnityEngine.UI">
<HintPath>/Applications/Unity/Unity.app/Contents/UnityExtensions/Unity/GUISystem/UnityEngine.UI.dll</HintPath>
</Reference>
Expand Down
Binary file added Assets/Class2.unity
Binary file not shown.
8 changes: 8 additions & 0 deletions Assets/Class2.unity.meta

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

9 changes: 9 additions & 0 deletions Assets/Fonts.meta

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

Binary file added Assets/Fonts/OpenSans-ExtraBold.ttf
Binary file not shown.
18 changes: 18 additions & 0 deletions Assets/Fonts/OpenSans-ExtraBold.ttf.meta

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

Binary file added Assets/Fonts/nevis.ttf
Binary file not shown.
18 changes: 18 additions & 0 deletions Assets/Fonts/nevis.ttf.meta

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

Binary file added Assets/Materials/Background.mat
Binary file not shown.
8 changes: 8 additions & 0 deletions Assets/Materials/Background.mat.meta

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

24 changes: 23 additions & 1 deletion Assets/Scripts/HelloWorld.cs
Expand Up @@ -3,9 +3,31 @@ using System.Collections;

public class HelloWorld : MonoBehaviour {

public bool isDead = false;
public int startingHealth = 100;
public int currentHealth;
public float dmg = 3.14f;
public string Name = "Terrence the Terrible";
public GameObject Camera;
public int strength = 0;
public int RandomNum = 0;
public string theText;
//public Text constText;

private Texture txtRef;
//public GameObject ConstText:
//public void

// Use this for initialization
void Start () {
Debug.Log ("Hello World");
RandomNum = Random.Range (1, 8);

theText = RandomNum.ToString ();

Debug.Log (theText);


//Texture.text
}

// Update is called once per frame
Expand Down
164 changes: 164 additions & 0 deletions Assets/TextBox.cs
@@ -0,0 +1,164 @@
using UnityEngine;


//YOU MUST USE THIS LINE TO GET ACCESS TO UI STUFF
using UnityEngine.UI;



using System.Collections;

public class TextBox : MonoBehaviour {

public float Str;
public string StrString;
public float Dex;
public string DexString;
public float Con;
public string ConString;
public float Int;
public string IntString;
public float Wis;
public string WisString;
public float Chr;
public string ChrString;
public int Damage;
public string MinDamageString;
public string MaxDamageString;
public int MinDamage;
public int MaxDamage;
public int HP;
public string HPString;
public int EnemyHP;
public int EnemyHPString;
public float Hit;
public string HitString;

public Text textRef;

private float ConValuef;




// Use this for initialization
void Start () {
Str = 0;
Dex = 0;
Con = 0;
Int = 0;
Wis = 0;
Chr = 0;
Damage = 0;
EnemyHP = 0;
Hit = 0;
}

// Update is called once per frame
void Update () {

}
//----------------------------Hit Points--------------------------------

public void ClickTestHP(string text){
Debug.Log (text);
HP = Random.Range (1, 8); //+ ((ConValuef *10)/100);
HPString = HP.ToString ();
textRef.text = HPString;
}

//----------------------------Attributes--------------------------------

public void ClickTestStr(string text){
Debug.Log (text);
Str = Random.Range (1, 6) + Random.Range (1, 6) + Random.Range (1, 6);
StrString = Str.ToString ();
textRef.text = StrString;
}

public void ClickTestDex(string text){
Debug.Log (text);
Dex = Random.Range (1, 6) + Random.Range (1, 6) + Random.Range (1, 6);
DexString = Dex.ToString ();
textRef.text = DexString;

}

public void ClickTestCon(string text){
Debug.Log (text);
Con = Random.Range (1, 6) + Random.Range (1, 6) + Random.Range (1, 6);
ConString = Con.ToString ();
textRef.text = ConString;
}

public void ClickTestInt(string text){
Debug.Log (text);
Int = Random.Range (1, 6) + Random.Range (1, 6) + Random.Range (1, 6);
IntString = Int.ToString ();
textRef.text = IntString;
}

public void ClickTestWis(string text){
Debug.Log (text);
Wis = Random.Range (1, 6) + Random.Range (1, 6) + Random.Range (1, 6);
WisString = Wis.ToString ();
textRef.text = WisString;
}

public void ClickTestChr(string text){
Debug.Log (text);
Chr = Random.Range (1, 6) + Random.Range (1, 6) + Random.Range (1, 6);
ChrString = Chr.ToString ();
textRef.text = ChrString;
}

//----------------------------Damage----------------------------------
//Minimum
public void MinDamageButtonDown(){
MinDamage--;
MinDamageString = MinDamage.ToString ();
textRef.text = MinDamageString;

}
public void MinDamageButtonUp(){
MinDamage++;
MinDamageString = MinDamage.ToString ();
textRef.text = MinDamageString;

}
//Maximum
public void MaxDamageButtonDown(){
MaxDamage--;
MaxDamageString = MaxDamage.ToString ();
textRef.text = MaxDamageString;

}
public void MaxDamageButtonUp(){
MaxDamage++;
MaxDamageString = MaxDamage.ToString ();
textRef.text = MaxDamageString;

}


//----------------------------Enemy----------------------------------

public void ClickTestEnemyHP(string text){
Debug.Log (text);
EnemyHP = Random.Range (1, 10); //+ ((ConValuef *10)/100);
HPString = HP.ToString ();
textRef.text = HPString;
}

//----------------------------Fight-------------------------------

public void Clicktest(string text){
Debug.Log (text);
Hit = Mathf.Round (Random.Range (0f, 100f));
HitString = Hit.ToString ();
textRef.text = HitString + "%";
}
}
//percentToHit
//HitTrue
//if(
12 changes: 12 additions & 0 deletions Assets/TextBox.cs.meta

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

Binary file not shown.
55 changes: 0 additions & 55 deletions Assets/Textures/tileable_wood_planks_texture_DIFFUSE.jpg.meta

This file was deleted.

Binary file not shown.

0 comments on commit 41c9a7f

Please sign in to comment.