Skip to content
Permalink
3f7d701646
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
59 lines (49 sloc) 1.36 KB
using UnityEngine;
using System.Collections;
using UnityEngine.UI;
public class DNDFight : MonoBehaviour {
public Text pName;
public Text pHitPoints;
public Text pDMG;
public Text pAcc;
public Text eName;
public Text eHitPoints;
public Text eDMG;
public Text eAcc;
public string pNameStr;
public int pHitPointsInt;
public int pDMGLow;
public int pDMGHigh;
public float pAccf;
public string eNameStr;
public int eHitPointsInt;
public int eDMGLow;
public int eDMGHigh;
public float eAccf;
// Use this for initializations
void Start () {
Debug.Log ("HI");
pName = pName.GetComponent<Text> ();
pHitPoints = pHitPoints.GetComponent<Text> ();
pDMG = pDMG.GetComponent<Text> ();
pAcc = pAcc.GetComponent<Text> ();
eName = eName.GetComponent<Text> ();
eHitPoints = eHitPoints.GetComponent<Text> ();
eDMG = eDMG.GetComponent<Text> ();
eAcc = eAcc.GetComponent<Text> ();
}
void set () {
pName.text = pNameStr;
pHitPoints.text = "HP: " + pHitPointsInt.ToString ();
pDMG.text = pDMGLow.ToString () + " - " + pDMGHigh.ToString ();
pAcc.text = "Accuracy: " + pAccf.ToString ();
eName.text = eNameStr;
eHitPoints.text = "HP: " + eHitPointsInt.ToString ();
eDMG.text = eDMGLow.ToString () + " - " + eDMGHigh.ToString ();
eAcc.text = "Accuracy: " + eAccf.ToString ();
}
// Update is called once per frame
void Update () {
set ();
}
}