Guest User

Untitled

a guest
Oct 23rd, 2017
95
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.59 KB | None | 0 0
  1. using System.Collections;
  2. using System.Collections.Generic;
  3. using UnityEngine;
  4.  
  5. public class SelectText : MonoBehaviour {
  6.  
  7. public enum TextOptions { sword, axe, wand };
  8. public TextOptions weapons;
  9.  
  10.  
  11. //0 Type1
  12. //1 Type2
  13. //2 wand
  14.  
  15.  
  16.  
  17.  
  18. // Update is called once per frame
  19. void Update () {
  20.  
  21. Debug.Log (weapons.ToString ());
  22.  
  23. //weapons = TextOptions.axe;
  24. //weapons = 0;
  25.  
  26. switch (weapons) {
  27.  
  28. case TextOptions.axe:
  29.  
  30. Debug.Log ("axe axe");
  31.  
  32. break;
  33.  
  34. /*
  35. case 0:
  36.  
  37. Debug.Log ("swod sord");
  38.  
  39. break;
  40. */
  41. }
  42.  
  43.  
  44. if ((int)weapons > 1) {
  45.  
  46. Debug.Log ("wand is > 1");
  47.  
  48. }
  49.  
  50. }
  51.  
  52.  
  53.  
  54. }
Add Comment
Please, Sign In to add comment