Advertisement
Guest User

Untitled

a guest
Jul 26th, 2014
214
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.07 KB | None | 0 0
  1. using UnityEngine;
  2. using System.Collections;
  3. using System; //ENUM NIGGA
  4.  
  5. public class CharacterGenerator : MonoBehaviour {
  6.  
  7. private PlayerCharacter _faget;
  8.  
  9.  
  10.  
  11. // Use this for initialization
  12. void Start () {
  13. _faget = new PlayerCharacter ();
  14. _faget.Awake ();
  15. }
  16.  
  17. // Update is called once per frame
  18. void Update () {
  19.  
  20. }
  21.  
  22. void OnGUI(){
  23. DisplayName ();
  24. DisplayAttributes ();
  25. DisplayVitals ();
  26. DisplaySkills ();
  27.  
  28.  
  29. }
  30.  
  31.  
  32.  
  33.  
  34. private void DisplayName () {
  35. GUI.Label (new Rect (10, 10, 50, 25), "Name:");
  36. _faget.Name = GUI.TextArea (new Rect (65, 10, 100, 35), _faget.Name);
  37. }
  38. private void DisplayAttributes ()
  39. {
  40. for (int cnt = 0; cnt < Enum.GetValues(typeof(AttributeName)).Length; cnt++) {
  41. GUI.Label (new Rect (10, 40 + (cnt * 25), 100, 25), ((AttributeName)cnt).ToString ());
  42. GUI.Label (new Rect (115, 40 + (cnt * 25), 30, 25), _faget.GetPrimaryAttribute (cnt).AdjustedBaseValue.ToString ());
  43. }
  44. }
  45. private void DisplayVitals() { }
  46. private void DisplaySkills(){ }
  47.  
  48. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement