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?
DMD2542/HelloWorldProject_Wolf/Assets/Scripts/characterGen.cs
Go to fileThis commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
45 lines (34 sloc)
933 Bytes
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 characterGen : MonoBehaviour { | |
//Variables | |
//float DecimalBox = .1f; | |
string myName = "Andrew"; | |
//bool isDead = false' | |
string pNameWord = "YoYoYo"; | |
public float playerHealth = 8f; | |
public Text text; | |
public Text pName; | |
// Use this for initialization | |
void Start () { | |
playerHealth = Random.Range (1.0f, 10.0f); | |
Debug.Log ("My Player Health: " + playerHealth); | |
playerHealth = playerHealth * 100.0f; | |
Debug.Log ("My Player Health with multiplier: " + playerHealth); | |
text = text.GetComponent<Text>(); | |
text.text = myName; | |
pName.text = pNameWord; | |
} | |
// Update is called once per frame | |
void Update () { | |
/*if (myName != "Betty") { | |
Debug.Log ("You're name isn't Andrew!"); | |
} else { | |
Debug.Log ("You're name is andrew! Way to go"); | |
}*/ | |
} | |
public void myButtonwasclicked() { | |
Debug.Log ("Button Clicked"); | |
} | |
} |