Advertisement
Guest User

Untitled

a guest
Dec 4th, 2016
53
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.12 KB | None | 0 0
  1. using UnityEngine;
  2. using System.Collections;
  3.  
  4. public class spiel : MonoBehaviour
  5. {
  6. public int zahl;
  7. public bool papier = false;
  8. public bool stein = false;
  9. public bool schere = false;
  10.  
  11. void OnEnable()
  12. {
  13. zahl = Random.Range(0, 3);
  14. Debug.Log(zahl);
  15. }
  16.  
  17. void Schere()// 1//
  18. {
  19. schere = true;
  20. if (zahl == 3)
  21. {
  22. Debug.Log("Du hast Gewonnen du Cheater");
  23. }
  24. else
  25. {
  26. Debug.Log("schere");
  27. Debug.Log("Du hast verloren du loser");
  28. }
  29. }
  30.  
  31. void Stein()// 2 //
  32. {
  33. stein = true;
  34. if (zahl == 1)
  35. {
  36. Debug.Log("Gewonnen du Cheater");
  37. }
  38. else
  39. {
  40. Debug.Log("stein");
  41. Debug.Log("verloren du loser");
  42. }
  43. }
  44.  
  45. void Papier()//3 //
  46. {
  47. papier = true;
  48. if (zahl == 2)
  49. {
  50. Debug.Log("Gewonnen du Cheater");
  51. }
  52. else
  53. {
  54. Debug.Log("papier");
  55. Debug.Log("verloren du loser");
  56. }
  57. }
  58. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement