Advertisement
Guest User

Switch

a guest
Jun 28th, 2018
110
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 5.77 KB | None | 0 0
  1. using System.Collections;
  2. using System.Collections.Generic;
  3. using UnityEngine;
  4.  
  5. public class Switch : MonoBehaviour
  6. {
  7.  
  8. public GameObject VladHead;
  9. public GameObject VladRightArm;
  10. public GameObject VladLeftArm;
  11. public GameObject VladRightUpperLeg;
  12. public GameObject VladRightLeg;
  13. public GameObject VladRightFoot;
  14. public GameObject VladLeftUpperLeg;
  15. public GameObject VladLeftLeg;
  16. public GameObject VladLeftFoot;
  17. public GameObject VladTorso;
  18. public GameObject GabrielaHead;
  19. public GameObject GabrielaRightArm;
  20. public GameObject GabrielaLeftArm;
  21. public GameObject GabrielaRightUpperLeg;
  22. public GameObject GabrielaRightLeg;
  23. public GameObject GabrielaRightFoot;
  24. public GameObject GabrielaLeftUpperLeg;
  25. public GameObject GabrielaLeftLeg;
  26. public GameObject GabrielaLeftFoot;
  27. public GameObject GabrielaTorso;
  28. public GameObject AlinHead;
  29. public GameObject AlinRightArm;
  30. public GameObject AlinLeftArm;
  31. public GameObject AlinRightUpperLeg;
  32. public GameObject AlinRightLeg;
  33. public GameObject AlinRightFoot;
  34. public GameObject AlinLeftUpperLeg;
  35. public GameObject AlinLeftLeg;
  36. public GameObject AlinLeftFoot;
  37. public GameObject AlinTorso;
  38. public GameObject Character;
  39.  
  40. // Use this for initialization
  41. void Start()
  42. {
  43.  
  44. Character.tag = "Vlad";
  45. VladHead.SetActive(true);
  46. VladRightArm.SetActive(true);
  47. VladLeftArm.SetActive(true);
  48. VladRightUpperLeg.SetActive(true);
  49. VladRightLeg.SetActive(true);
  50. VladRightFoot.SetActive(true);
  51. VladLeftUpperLeg.SetActive(true);
  52. VladLeftLeg.SetActive(true);
  53. VladLeftFoot.SetActive(true);
  54. VladTorso.SetActive(true);
  55. GabrielaHead.SetActive(false);
  56. GabrielaRightArm.SetActive(false);
  57. GabrielaLeftArm.SetActive(false);
  58. GabrielaRightUpperLeg.SetActive(false);
  59. GabrielaRightLeg.SetActive(false);
  60. GabrielaRightFoot.SetActive(false);
  61. GabrielaLeftUpperLeg.SetActive(false);
  62. GabrielaLeftLeg.SetActive(false);
  63. GabrielaLeftFoot.SetActive(false);
  64. GabrielaTorso.SetActive(false);
  65. AlinHead.SetActive(false);
  66. AlinRightArm.SetActive(false);
  67. AlinLeftArm.SetActive(false);
  68. AlinRightUpperLeg.SetActive(false);
  69. AlinRightLeg.SetActive(false);
  70. AlinRightFoot.SetActive(false);
  71. AlinLeftUpperLeg.SetActive(false);
  72. AlinLeftLeg.SetActive(false);
  73. AlinLeftFoot.SetActive(false);
  74. AlinTorso.SetActive(false);
  75.  
  76. }
  77.  
  78. // Update is called once per frame
  79. void Update()
  80. {
  81.  
  82. if (Input.GetKeyDown(KeyCode.P))
  83. {
  84. Character.tag = "Vlad";
  85. VladHead.SetActive(true);
  86. VladRightArm.SetActive(true);
  87. VladLeftArm.SetActive(true);
  88. VladRightUpperLeg.SetActive(true);
  89. VladRightLeg.SetActive(true);
  90. VladRightFoot.SetActive(true);
  91. VladLeftUpperLeg.SetActive(true);
  92. VladLeftLeg.SetActive(true);
  93. VladLeftFoot.SetActive(true);
  94. VladTorso.SetActive(true);
  95. GabrielaHead.SetActive(false);
  96. GabrielaRightArm.SetActive(false);
  97. GabrielaLeftArm.SetActive(false);
  98. GabrielaRightUpperLeg.SetActive(false);
  99. GabrielaRightLeg.SetActive(false);
  100. GabrielaRightFoot.SetActive(false);
  101. GabrielaLeftUpperLeg.SetActive(false);
  102. GabrielaLeftLeg.SetActive(false);
  103. GabrielaLeftFoot.SetActive(false);
  104. GabrielaTorso.SetActive(false);
  105. AlinHead.SetActive(false);
  106. AlinRightArm.SetActive(false);
  107. AlinLeftArm.SetActive(false);
  108. AlinRightUpperLeg.SetActive(false);
  109. AlinRightLeg.SetActive(false);
  110. AlinRightFoot.SetActive(false);
  111. AlinLeftUpperLeg.SetActive(false);
  112. AlinLeftLeg.SetActive(false);
  113. AlinLeftFoot.SetActive(false);
  114. AlinTorso.SetActive(false);
  115. }
  116.  
  117. if (Input.GetKeyDown(KeyCode.O))
  118. {
  119. Character.tag = "Gabriela";
  120. VladHead.SetActive(false);
  121. VladRightArm.SetActive(false);
  122. VladLeftArm.SetActive(false);
  123. VladRightUpperLeg.SetActive(false);
  124. VladRightLeg.SetActive(false);
  125. VladRightFoot.SetActive(false);
  126. VladLeftUpperLeg.SetActive(false);
  127. VladLeftLeg.SetActive(false);
  128. VladLeftFoot.SetActive(false);
  129. VladTorso.SetActive(false);
  130. GabrielaHead.SetActive(true);
  131. GabrielaRightArm.SetActive(true);
  132. GabrielaLeftArm.SetActive(true);
  133. GabrielaRightUpperLeg.SetActive(true);
  134. GabrielaRightLeg.SetActive(true);
  135. GabrielaRightFoot.SetActive(true);
  136. GabrielaLeftUpperLeg.SetActive(true);
  137. GabrielaLeftLeg.SetActive(true);
  138. GabrielaLeftFoot.SetActive(true);
  139. GabrielaTorso.SetActive(true);
  140. AlinHead.SetActive(false);
  141. AlinRightArm.SetActive(false);
  142. AlinLeftArm.SetActive(false);
  143. AlinRightUpperLeg.SetActive(false);
  144. AlinRightLeg.SetActive(false);
  145. AlinRightFoot.SetActive(false);
  146. AlinLeftUpperLeg.SetActive(false);
  147. AlinLeftLeg.SetActive(false);
  148. AlinLeftFoot.SetActive(false);
  149. AlinTorso.SetActive(false);
  150. }
  151.  
  152. if (Input.GetKeyDown(KeyCode.I))
  153. {
  154. Character.tag = "Alin";
  155. VladHead.SetActive(false);
  156. VladRightArm.SetActive(false);
  157. VladLeftArm.SetActive(false);
  158. VladRightUpperLeg.SetActive(false);
  159. VladRightLeg.SetActive(false);
  160. VladRightFoot.SetActive(false);
  161. VladLeftUpperLeg.SetActive(false);
  162. VladLeftLeg.SetActive(false);
  163. VladLeftFoot.SetActive(false);
  164. VladTorso.SetActive(false);
  165. GabrielaHead.SetActive(false);
  166. GabrielaRightArm.SetActive(false);
  167. GabrielaLeftArm.SetActive(false);
  168. GabrielaRightUpperLeg.SetActive(false);
  169. GabrielaRightLeg.SetActive(false);
  170. GabrielaRightFoot.SetActive(false);
  171. GabrielaLeftUpperLeg.SetActive(false);
  172. GabrielaLeftLeg.SetActive(false);
  173. GabrielaLeftFoot.SetActive(false);
  174. GabrielaTorso.SetActive(false);
  175. AlinHead.SetActive(true);
  176. AlinRightArm.SetActive(true);
  177. AlinLeftArm.SetActive(true);
  178. AlinRightUpperLeg.SetActive(true);
  179. AlinRightLeg.SetActive(true);
  180. AlinRightFoot.SetActive(true);
  181. AlinLeftUpperLeg.SetActive(true);
  182. AlinLeftLeg.SetActive(true);
  183. AlinLeftFoot.SetActive(true);
  184. AlinTorso.SetActive(true);
  185. }
  186.  
  187. }
  188. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement