Advertisement
Guest User

Untitled

a guest
Dec 13th, 2018
164
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 136.76 KB | None | 0 0
  1. using System.Collections;
  2. using System.Collections.Generic;
  3. using UnityEngine;
  4.  
  5. public class St : MonoBehaviour
  6. {
  7. private bool visibleButton1 = true;
  8. private bool visibleButton2 = true;
  9. private bool visibleButton3 = true;
  10. private bool visibleButton4 = true;
  11. private bool visibleButton5 = true;
  12. private bool visibleButton6 = true;
  13. private bool visibleButton7 = true;
  14. private bool visibleButton8 = true;
  15. private bool visibleButtonp1 = true;
  16. private bool visibleButtonch = true;
  17. private bool visibleButton = true;
  18. private int pr3 = 0;
  19. private bool errorShow = false;
  20. public float mSec = 1;
  21. private int tru = 0;
  22. private int fal = 0;
  23. private int np = 0,n;
  24. private bool snp = true;
  25. private int[] truOtvets2 = new int[] { 1, 2, 3, 4, 5, 6, 7 };
  26. private int k = 0;
  27. private int z2 = 0;
  28. private int z1 = 0;
  29. private int z3 = 0;
  30. public KeyCode upKey = KeyCode.F1;
  31. void Start()
  32. {
  33. if (np == 0)
  34. {
  35. z2 = Random.Range(1, 4);
  36. np = Random.Range(1, 4);
  37.  
  38. pr3 = Random.Range(1, 4);
  39. // n = Random.Range(0, 7);
  40. }
  41. }
  42.  
  43.  
  44. void OnGUI()
  45. {
  46. if (k == 7)
  47. {
  48.  
  49. GUI.Box(new Rect((Screen.width-200) / 2 , (Screen.height-600) / 2 , 200,100), "Тест пройден!!!");
  50. GUI.color = Color.red;
  51. GUI.Label(new Rect((Screen.width-175) / 2, (Screen.height -550) / 2 , 100, 20), "Правильные ответы:");
  52. GUI.Label(new Rect((Screen.width ) / 2 , (Screen.height -550) / 2, 20, 20), tru.ToString());
  53. GUI.Label(new Rect((Screen.width-175)/2 , (Screen.height -500) / 2, 100, 20), "Кол-во ошибок:");
  54. GUI.Label(new Rect((Screen.width+20) / 2, (Screen.height -500) / 2 , 100, 20), fal.ToString());
  55. }
  56. else
  57. {
  58. if ((k == 6) && (np == 3))
  59. {
  60. GUI.Box(new Rect((Screen.width + 220) / 2 + 20, (Screen.height - 730) / 2 + 100, 350, 530), "Тест пройден!!!");
  61. GUI.color = Color.red;
  62. GUI.Label(new Rect((Screen.width - 175) / 2, (Screen.height - 550) / 2, 100, 20), "Правильные ответы:");
  63. GUI.Label(new Rect((Screen.width) / 2, (Screen.height - 550) / 2, 20, 20), tru.ToString());
  64. GUI.Label(new Rect((Screen.width - 175) / 2, (Screen.height - 500) / 2, 100, 20), "Кол-во ошибок:");
  65. GUI.Label(new Rect((Screen.width + 20) / 2, (Screen.height - 500) / 2, 100, 20), fal.ToString());
  66. }
  67. }
  68. if (errorShow)
  69. {
  70. GUI.Box(new Rect(0, 0 , (Screen.width), (Screen.height)), " "); //мигание экрана
  71. GUI.color = Color.red;
  72. }
  73. switch (np)
  74. {
  75. case 1:
  76. {
  77. if (k!=7)
  78. {
  79. GUI.Box(new Rect((Screen.width)- (Screen.width)/3, 0,(Screen.width) / 3, (Screen.height)), "Компрессор");
  80. zapoln1();
  81.  
  82. break;
  83. }
  84. break;
  85.  
  86. }
  87. case 2:
  88. {
  89. if (k != 7)
  90. {
  91. GUI.Box(new Rect((Screen.width) - (Screen.width) / 3, 0, (Screen.width) / 3, (Screen.height)), "Терморегулятор");
  92. zapoln2();
  93. break;
  94. }
  95. break;
  96.  
  97. }
  98. case 3:
  99. {
  100. if ((k != 6)&&(np==3))
  101. {
  102. GUI.Box(new Rect((Screen.width) - (Screen.width) / 3, 0, (Screen.width) / 3, (Screen.height)), "Пусковое реле");
  103. zapoln3();
  104. break;
  105. }
  106. else
  107. {
  108. visibleButtonp1 = false;
  109. break;
  110. }
  111. }
  112. }
  113. }
  114. void zapoln2()
  115. {
  116. switch (z2)
  117. {
  118.  
  119. case 1:
  120. {
  121. GUI.Label(new Rect((Screen.width + 6) - (Screen.width) / 3, (Screen.height + 200) / 2 + 130, 100, 20), "Правильные ответы:");
  122. GUI.Label(new Rect((Screen.width + 110) - (Screen.width) / 3, (Screen.height + 200) / 2 + 130, 100, 20), tru.ToString());
  123. GUI.Label(new Rect((Screen.width + 6) - (Screen.width) / 3, (Screen.height + 200) / 2 + 100, 100, 20), "Кол-во ошибок:");
  124. GUI.Label(new Rect((Screen.width + 110) - (Screen.width) / 3, (Screen.height + 200) / 2 + 100, 100, 20), fal.ToString());
  125. if (visibleButton1)
  126. {
  127. if (GUI.Button(new Rect((Screen.width + 6) - (Screen.width) / 3, (Screen.height - 750) / 2 + 130, (Screen.width - 30) / 3, (Screen.height) / 27), "1.Отключить холодильник от сети."))
  128. {
  129. if (truOtvets2[k] == 1)
  130. {
  131. k++;
  132. Debug.Log("КРАСАВА, МОЛОДЕЦ!");
  133. visibleButton1 = false;
  134. tru++;
  135. GUI.Label(new Rect((Screen.width + 110) - (Screen.width) / 3, (Screen.height + 200) / 2 + 130, 100, 20), tru.ToString());
  136.  
  137. }
  138. else
  139. {
  140. fal++;
  141. GUI.Label(new Rect((Screen.width + 110) - (Screen.width) / 3, (Screen.height + 200) / 2 + 100, 100, 20), fal.ToString());
  142. errorShow = true;
  143. Debug.Log("НЕ КРАСАВА И НЕ МОЛОДЕЦ!");
  144. }
  145. }
  146. }
  147.  
  148. if (visibleButton2)
  149. {
  150. if (GUI.Button(new Rect((Screen.width + 6) - (Screen.width) / 3, (Screen.height - 675) / 2 + 130, (Screen.width - 30) / 3, (Screen.height) / 27), "2.Снять корпус холодильника. "))
  151. {
  152. if (truOtvets2[k] == 2)
  153. {
  154. k++;
  155. Debug.Log("КРАСАВА, МОЛОДЕЦ!");
  156. visibleButton2 = false;
  157. tru++;
  158. GUI.Label(new Rect((Screen.width + 110) - (Screen.width) / 3, (Screen.height + 200) / 2 + 130, 100, 20), tru.ToString());
  159.  
  160. }
  161. else
  162. {
  163. errorShow = true;
  164. Debug.Log("НЕ КРАСАВА И НЕ МОЛОДЕЦ!");
  165. fal++;
  166. GUI.Label(new Rect((Screen.width + 110) - (Screen.width) / 3, (Screen.height + 200) / 2 + 100, 100, 20), fal.ToString());
  167. }
  168. }
  169. }
  170. if (visibleButton3)
  171. {
  172. if (GUI.Button(new Rect((Screen.width + 6) - (Screen.width) / 3, (Screen.height - 600) / 2 + 130, (Screen.width - 30) / 3, (Screen.height) / 27), "3.Осмотреть на дефекты. "))
  173. {
  174. if (truOtvets2[k] == 3)
  175. {
  176. k++;
  177. Debug.Log("КРАСАВА, МОЛОДЕЦ!");
  178. visibleButton3 = false;
  179. tru++;
  180. GUI.Label(new Rect((Screen.width + 110) - (Screen.width) / 3, (Screen.height + 200) / 2 + 130, 100, 20), tru.ToString());
  181.  
  182. }
  183. else
  184. {
  185. errorShow = true;
  186. Debug.Log("НЕ КРАСАВА И НЕ МОЛОДЕЦ!");
  187. fal++;
  188. GUI.Label(new Rect((Screen.width + 110) - (Screen.width) / 3, (Screen.height + 200) / 2 + 100, 100, 20), fal.ToString());
  189. }
  190.  
  191. }
  192. }
  193. if (visibleButton4)
  194. {
  195. if (GUI.Button(new Rect((Screen.width + 6) - (Screen.width) / 3, (Screen.height - 525) / 2 + 130, (Screen.width - 30) / 3, (Screen.height) / 27), "4.Заменить детали."))
  196. {
  197. if (truOtvets2[k] == 4)
  198. {
  199. k++;
  200. Debug.Log("КРАСАВА, МОЛОДЕЦ!");
  201. visibleButton4 = false;
  202. tru++;
  203. GUI.Label(new Rect((Screen.width + 110) - (Screen.width) / 3, (Screen.height + 200) / 2 + 130, 100, 20), tru.ToString());
  204.  
  205. }
  206. else
  207. {
  208. errorShow = true;
  209. Debug.Log("НЕ КРАСАВА И НЕ МОЛОДЕЦ!");
  210. fal++;
  211. GUI.Label(new Rect((Screen.width + 110) - (Screen.width) / 3, (Screen.height + 200) / 2 + 100, 100, 20), fal.ToString());
  212. }
  213.  
  214. }
  215. }
  216.  
  217.  
  218.  
  219. if (visibleButtonch)
  220. {
  221.  
  222. if (GUI.Button(new Rect((Screen.width + 6) - (Screen.width) / 3, (Screen.height - 450) / 2 + 130, (Screen.width - 30) / 3, (Screen.height) / 27), "5.5. Нарушение регулировки терморегулятора."))
  223. {
  224.  
  225. if (truOtvets2[k] == 5)
  226. {
  227. k++;
  228. Debug.Log("КРАСАВА, МОЛОДЕЦ!");
  229. visibleButtonch = false;
  230. tru++;
  231. GUI.Label(new Rect((Screen.width + 110) - (Screen.width) / 3, (Screen.height + 200) / 2 + 130, 100, 20), tru.ToString());
  232.  
  233. }
  234. else
  235. {
  236. errorShow = true;
  237. Debug.Log("НЕ КРАСАВА И НЕ МОЛОДЕЦ!");
  238. fal++;
  239. GUI.Label(new Rect((Screen.width + 110) - (Screen.width) / 3, (Screen.height + 200) / 2 + 100, 100, 20), fal.ToString());
  240. }
  241. }
  242.  
  243. }
  244.  
  245.  
  246.  
  247.  
  248. if (visibleButton6)
  249. {
  250. if (GUI.Button(new Rect((Screen.width + 6) - (Screen.width) / 3, (Screen.height - 375) / 2 + 130, (Screen.width - 30) / 3, (Screen.height) / 27), "6.Установка и запуск холодильника."))
  251. {
  252. if (truOtvets2[k] == 6)
  253. {
  254. k++;
  255. Debug.Log("КРАСАВА, МОЛОДЕЦ!");
  256. visibleButton6 = false;
  257. tru++;
  258. GUI.Label(new Rect((Screen.width + 110) - (Screen.width) / 3, (Screen.height + 200) / 2 + 130, 100, 20), tru.ToString());
  259.  
  260. }
  261. else
  262. {
  263. errorShow = true;
  264. Debug.Log("НЕ КРАСАВА И НЕ МОЛОДЕЦ!");
  265. fal++;
  266. GUI.Label(new Rect((Screen.width + 110) - (Screen.width) / 3, (Screen.height + 200) / 2 + 100, 100, 20), fal.ToString());
  267. }
  268. }
  269. }
  270. if (visibleButton7)
  271. {
  272. if (GUI.Button(new Rect((Screen.width + 6) - (Screen.width) / 3, (Screen.height - 300) / 2 + 130, (Screen.width - 30) / 3, (Screen.height) / 27), "7.Сборка в обратном порядке."))
  273. {
  274. if (truOtvets2[k] == 7)
  275. {
  276. k++;
  277. Debug.Log("КРАСАВА, МОЛОДЕЦ!");
  278. visibleButton7 = false;
  279. tru++;
  280. GUI.Label(new Rect((Screen.width + 110) - (Screen.width) / 3, (Screen.height + 200) / 2 + 130, 100, 20), tru.ToString());
  281. }
  282. else
  283. {
  284. errorShow = true;
  285. Debug.Log("НЕ КРАСАВА И НЕ МОЛОДЕЦ!");
  286. fal++;
  287. GUI.Label(new Rect((Screen.width + 110) - (Screen.width) / 3, (Screen.height + 200) / 2 + 100, 100, 20), fal.ToString());
  288. }
  289. }
  290. }
  291. break;
  292. }
  293. case 2:
  294. {
  295. GUI.Label(new Rect((Screen.width + 6) - (Screen.width) / 3, (Screen.height + 200) / 2 + 130, 100, 20), "Правильные ответы:");
  296. GUI.Label(new Rect((Screen.width + 110) - (Screen.width) / 3, (Screen.height + 200) / 2 + 130, 100, 20), tru.ToString());
  297. GUI.Label(new Rect((Screen.width + 6) - (Screen.width) / 3, (Screen.height + 200) / 2 + 100, 100, 20), "Кол-во ошибок:");
  298. GUI.Label(new Rect((Screen.width + 110) - (Screen.width) / 3, (Screen.height + 200) / 2 + 100, 100, 20), fal.ToString());
  299. if (visibleButton1)
  300. {
  301. if (GUI.Button(new Rect((Screen.width + 6) - (Screen.width) / 3, (Screen.height - 300) / 2 + 130, (Screen.width - 30) / 3, (Screen.height) / 27), "1.Отключить холодильник от сети."))
  302. {
  303. if (truOtvets2[k] == 1)
  304. {
  305. k++;
  306. Debug.Log("КРАСАВА, МОЛОДЕЦ!");
  307. visibleButton1 = false;
  308. tru++;
  309. GUI.Label(new Rect((Screen.width + 110) - (Screen.width) / 3, (Screen.height + 200) / 2 + 130, 100, 20), tru.ToString());
  310.  
  311. }
  312. else
  313. {
  314. fal++;
  315. GUI.Label(new Rect((Screen.width + 110) - (Screen.width) / 3, (Screen.height + 200) / 2 + 100, 100, 20), fal.ToString());
  316. errorShow = true;
  317. Debug.Log("НЕ КРАСАВА И НЕ МОЛОДЕЦ!");
  318. }
  319. }
  320. }
  321.  
  322. if (visibleButton2)
  323. {
  324. if (GUI.Button(new Rect((Screen.width + 6) - (Screen.width) / 3, (Screen.height - 600) / 2 + 130, (Screen.width - 30) / 3, (Screen.height) / 27), "2.Снять корпус холодильника. "))
  325. {
  326. if (truOtvets2[k] == 2)
  327. {
  328. k++;
  329. Debug.Log("КРАСАВА, МОЛОДЕЦ!");
  330. visibleButton2 = false;
  331. tru++;
  332. GUI.Label(new Rect((Screen.width + 110) - (Screen.width) / 3, (Screen.height + 200) / 2 + 130, 100, 20), tru.ToString());
  333.  
  334. }
  335. else
  336. {
  337. errorShow = true;
  338. Debug.Log("НЕ КРАСАВА И НЕ МОЛОДЕЦ!");
  339. fal++;
  340. GUI.Label(new Rect((Screen.width + 110) - (Screen.width) / 3, (Screen.height + 200) / 2 + 100, 100, 20), fal.ToString());
  341. }
  342. }
  343. }
  344. if (visibleButton3)
  345. {
  346. if (GUI.Button(new Rect((Screen.width + 6) - (Screen.width) / 3, (Screen.height - 450) / 2 + 130, (Screen.width - 30) / 3, (Screen.height) / 27), "3.Осмотреть на дефекты. "))
  347. {
  348. if (truOtvets2[k] == 3)
  349. {
  350. k++;
  351. Debug.Log("КРАСАВА, МОЛОДЕЦ!");
  352. visibleButton3 = false;
  353. tru++;
  354. GUI.Label(new Rect((Screen.width + 110) - (Screen.width) / 3, (Screen.height + 200) / 2 + 130, 100, 20), tru.ToString());
  355.  
  356. }
  357. else
  358. {
  359. errorShow = true;
  360. Debug.Log("НЕ КРАСАВА И НЕ МОЛОДЕЦ!");
  361. fal++;
  362. GUI.Label(new Rect((Screen.width + 110) - (Screen.width) / 3, (Screen.height + 200) / 2 + 100, 100, 20), fal.ToString());
  363. }
  364.  
  365. }
  366. }
  367. if (visibleButton4)
  368. {
  369. if (GUI.Button(new Rect((Screen.width + 6) - (Screen.width) / 3, (Screen.height - 375) / 2 + 130, (Screen.width - 30) / 3, (Screen.height) / 27), "4.Заменить детали."))
  370. {
  371. if (truOtvets2[k] == 4)
  372. {
  373. k++;
  374. Debug.Log("КРАСАВА, МОЛОДЕЦ!");
  375. visibleButton4 = false;
  376. tru++;
  377. GUI.Label(new Rect((Screen.width + 110) - (Screen.width) / 3, (Screen.height + 200) / 2 + 130, 100, 20), tru.ToString());
  378.  
  379. }
  380. else
  381. {
  382. errorShow = true;
  383. Debug.Log("НЕ КРАСАВА И НЕ МОЛОДЕЦ!");
  384. fal++;
  385. GUI.Label(new Rect((Screen.width + 110) - (Screen.width) / 3, (Screen.height + 200) / 2 + 100, 100, 20), fal.ToString());
  386. }
  387.  
  388. }
  389. }
  390.  
  391.  
  392.  
  393. if (visibleButtonch)
  394. {
  395.  
  396. if (GUI.Button(new Rect((Screen.width + 6) - (Screen.width) / 3, (Screen.height - 675) / 2 + 130, (Screen.width - 30) / 3, (Screen.height) / 27), "5.5. Нарушение регулировки терморегулятора."))
  397. {
  398.  
  399. if (truOtvets2[k] == 5)
  400. {
  401. k++;
  402. Debug.Log("КРАСАВА, МОЛОДЕЦ!");
  403. visibleButtonch = false;
  404. tru++;
  405. GUI.Label(new Rect((Screen.width + 110) - (Screen.width) / 3, (Screen.height + 200) / 2 + 130, 100, 20), tru.ToString());
  406.  
  407. }
  408. else
  409. {
  410. errorShow = true;
  411. Debug.Log("НЕ КРАСАВА И НЕ МОЛОДЕЦ!");
  412. fal++;
  413. GUI.Label(new Rect((Screen.width + 110) - (Screen.width) / 3, (Screen.height + 200) / 2 + 100, 100, 20), fal.ToString());
  414. }
  415. }
  416.  
  417. }
  418.  
  419.  
  420.  
  421.  
  422. if (visibleButton6)
  423. {
  424. if (GUI.Button(new Rect((Screen.width + 6) - (Screen.width) / 3, (Screen.height - 750) / 2 + 130, (Screen.width - 30) / 3, (Screen.height) / 27), "6.Установка и запуск холодильника."))
  425. {
  426. if (truOtvets2[k] == 6)
  427. {
  428. k++;
  429. Debug.Log("КРАСАВА, МОЛОДЕЦ!");
  430. visibleButton6 = false;
  431. tru++;
  432. GUI.Label(new Rect((Screen.width + 110) - (Screen.width) / 3, (Screen.height + 200) / 2 + 130, 100, 20), tru.ToString());
  433.  
  434. }
  435. else
  436. {
  437. errorShow = true;
  438. Debug.Log("НЕ КРАСАВА И НЕ МОЛОДЕЦ!");
  439. fal++;
  440. GUI.Label(new Rect((Screen.width + 110) - (Screen.width) / 3, (Screen.height + 200) / 2 + 100, 100, 20), fal.ToString());
  441. }
  442. }
  443. }
  444. if (visibleButton7)
  445. {
  446. if (GUI.Button(new Rect((Screen.width + 6) - (Screen.width) / 3, (Screen.height - 525) / 2 + 130, (Screen.width - 30) / 3, (Screen.height) / 27), "7.Сборка в обратном порядке."))
  447. {
  448. if (truOtvets2[k] == 7)
  449. {
  450. k++;
  451. Debug.Log("КРАСАВА, МОЛОДЕЦ!");
  452. visibleButton7 = false;
  453. tru++;
  454. GUI.Label(new Rect((Screen.width + 110) - (Screen.width) / 3, (Screen.height + 200) / 2 + 130, 100, 20), tru.ToString());
  455. }
  456. else
  457. {
  458. errorShow = true;
  459. Debug.Log("НЕ КРАСАВА И НЕ МОЛОДЕЦ!");
  460. fal++;
  461. GUI.Label(new Rect((Screen.width + 110) - (Screen.width) / 3, (Screen.height + 200) / 2 + 100, 100, 20), fal.ToString());
  462. }
  463. }
  464. }
  465. break;
  466. }
  467. case 3:
  468. {
  469. GUI.Label(new Rect((Screen.width + 6) - (Screen.width) / 3, (Screen.height + 200) / 2 + 130, 100, 20), "Правильные ответы:");
  470. GUI.Label(new Rect((Screen.width + 110) - (Screen.width) / 3, (Screen.height + 200) / 2 + 130, 100, 20), tru.ToString());
  471. GUI.Label(new Rect((Screen.width + 6) - (Screen.width) / 3, (Screen.height + 200) / 2 + 100, 100, 20), "Кол-во ошибок:");
  472. GUI.Label(new Rect((Screen.width + 110) - (Screen.width) / 3, (Screen.height + 200) / 2 + 100, 100, 20), fal.ToString());
  473. if (visibleButton1)
  474. {
  475. if (GUI.Button(new Rect((Screen.width + 6) - (Screen.width) / 3, (Screen.height - 675) / 2 + 130, (Screen.width - 30) / 3, (Screen.height) / 27), "1.Отключить холодильник от сети."))
  476. {
  477. if (truOtvets2[k] == 1)
  478. {
  479. k++;
  480. Debug.Log("КРАСАВА, МОЛОДЕЦ!");
  481. visibleButton1 = false;
  482. tru++;
  483. GUI.Label(new Rect((Screen.width + 110) - (Screen.width) / 3, (Screen.height + 200) / 2 + 130, 100, 20), tru.ToString());
  484.  
  485. }
  486. else
  487. {
  488. fal++;
  489. GUI.Label(new Rect((Screen.width + 110) - (Screen.width) / 3, (Screen.height + 200) / 2 + 100, 100, 20), fal.ToString());
  490. errorShow = true;
  491. Debug.Log("НЕ КРАСАВА И НЕ МОЛОДЕЦ!");
  492. }
  493. }
  494. }
  495.  
  496. if (visibleButton2)
  497. {
  498. if (GUI.Button(new Rect((Screen.width + 6) - (Screen.width) / 3, (Screen.height - 375) / 2 + 130, (Screen.width - 30) / 3, (Screen.height) / 27), "2.Снять корпус холодильника. "))
  499. {
  500. if (truOtvets2[k] == 2)
  501. {
  502. k++;
  503. Debug.Log("КРАСАВА, МОЛОДЕЦ!");
  504. visibleButton2 = false;
  505. tru++;
  506. GUI.Label(new Rect((Screen.width + 110) - (Screen.width) / 3, (Screen.height + 200) / 2 + 130, 100, 20), tru.ToString());
  507.  
  508. }
  509. else
  510. {
  511. errorShow = true;
  512. Debug.Log("НЕ КРАСАВА И НЕ МОЛОДЕЦ!");
  513. fal++;
  514. GUI.Label(new Rect((Screen.width + 110) - (Screen.width) / 3, (Screen.height + 200) / 2 + 100, 100, 20), fal.ToString());
  515. }
  516. }
  517. }
  518. if (visibleButton3)
  519. {
  520. if (GUI.Button(new Rect((Screen.width + 6) - (Screen.width) / 3, (Screen.height - 600) / 2 + 130, (Screen.width - 30) / 3, (Screen.height) / 27), "3.Осмотреть на дефекты. "))
  521. {
  522. if (truOtvets2[k] == 3)
  523. {
  524. k++;
  525. Debug.Log("КРАСАВА, МОЛОДЕЦ!");
  526. visibleButton3 = false;
  527. tru++;
  528. GUI.Label(new Rect((Screen.width + 110) - (Screen.width) / 3, (Screen.height + 200) / 2 + 130, 100, 20), tru.ToString());
  529.  
  530. }
  531. else
  532. {
  533. errorShow = true;
  534. Debug.Log("НЕ КРАСАВА И НЕ МОЛОДЕЦ!");
  535. fal++;
  536. GUI.Label(new Rect((Screen.width + 110) - (Screen.width) / 3, (Screen.height + 200) / 2 + 100, 100, 20), fal.ToString());
  537. }
  538.  
  539. }
  540. }
  541. if (visibleButton4)
  542. {
  543. if (GUI.Button(new Rect((Screen.width + 6) - (Screen.width) / 3, (Screen.height - 750) / 2 + 130, (Screen.width - 30) / 3, (Screen.height) / 27), "4.Заменить детали."))
  544. {
  545. if (truOtvets2[k] == 4)
  546. {
  547. k++;
  548. Debug.Log("КРАСАВА, МОЛОДЕЦ!");
  549. visibleButton4 = false;
  550. tru++;
  551. GUI.Label(new Rect((Screen.width + 110) - (Screen.width) / 3, (Screen.height + 200) / 2 + 130, 100, 20), tru.ToString());
  552.  
  553. }
  554. else
  555. {
  556. errorShow = true;
  557. Debug.Log("НЕ КРАСАВА И НЕ МОЛОДЕЦ!");
  558. fal++;
  559. GUI.Label(new Rect((Screen.width + 110) - (Screen.width) / 3, (Screen.height + 200) / 2 + 100, 100, 20), fal.ToString());
  560. }
  561.  
  562. }
  563. }
  564.  
  565.  
  566.  
  567. if (visibleButtonch)
  568. {
  569.  
  570. if (GUI.Button(new Rect((Screen.width + 6) - (Screen.width) / 3, (Screen.height - 450) / 2 + 130, (Screen.width - 30) / 3, (Screen.height) / 27), "5.5. Нарушение регулировки терморегулятора."))
  571. {
  572.  
  573. if (truOtvets2[k] == 5)
  574. {
  575. k++;
  576. Debug.Log("КРАСАВА, МОЛОДЕЦ!");
  577. visibleButtonch = false;
  578. tru++;
  579. GUI.Label(new Rect((Screen.width + 110) - (Screen.width) / 3, (Screen.height + 200) / 2 + 130, 100, 20), tru.ToString());
  580.  
  581. }
  582. else
  583. {
  584. errorShow = true;
  585. Debug.Log("НЕ КРАСАВА И НЕ МОЛОДЕЦ!");
  586. fal++;
  587. GUI.Label(new Rect((Screen.width + 110) - (Screen.width) / 3, (Screen.height + 200) / 2 + 100, 100, 20), fal.ToString());
  588. }
  589. }
  590.  
  591. }
  592.  
  593.  
  594.  
  595.  
  596. if (visibleButton6)
  597. {
  598. if (GUI.Button(new Rect((Screen.width + 6) - (Screen.width) / 3, (Screen.height - 525) / 2 + 130, (Screen.width - 30) / 3, (Screen.height) / 27), "6.Установка и запуск холодильника."))
  599. {
  600. if (truOtvets2[k] == 6)
  601. {
  602. k++;
  603. Debug.Log("КРАСАВА, МОЛОДЕЦ!");
  604. visibleButton6 = false;
  605. tru++;
  606. GUI.Label(new Rect((Screen.width + 110) - (Screen.width) / 3, (Screen.height + 200) / 2 + 130, 100, 20), tru.ToString());
  607.  
  608. }
  609. else
  610. {
  611. errorShow = true;
  612. Debug.Log("НЕ КРАСАВА И НЕ МОЛОДЕЦ!");
  613. fal++;
  614. GUI.Label(new Rect((Screen.width + 110) - (Screen.width) / 3, (Screen.height + 200) / 2 + 100, 100, 20), fal.ToString());
  615. }
  616. }
  617. }
  618. if (visibleButton7)
  619. {
  620. if (GUI.Button(new Rect((Screen.width + 6) - (Screen.width) / 3, (Screen.height - 300) / 2 + 130, (Screen.width - 30) / 3, (Screen.height) / 27), "7.Сборка в обратном порядке."))
  621. {
  622. if (truOtvets2[k] == 7)
  623. {
  624. k++;
  625. Debug.Log("КРАСАВА, МОЛОДЕЦ!");
  626. visibleButton7 = false;
  627. tru++;
  628. GUI.Label(new Rect((Screen.width + 110) - (Screen.width) / 3, (Screen.height + 200) / 2 + 130, 100, 20), tru.ToString());
  629. }
  630. else
  631. {
  632. errorShow = true;
  633. Debug.Log("НЕ КРАСАВА И НЕ МОЛОДЕЦ!");
  634. fal++;
  635. GUI.Label(new Rect((Screen.width + 110) - (Screen.width) / 3, (Screen.height + 200) / 2 + 100, 100, 20), fal.ToString());
  636. }
  637. }
  638. }
  639. break;
  640. }
  641. case 4:
  642. {
  643. GUI.Label(new Rect((Screen.width + 6) - (Screen.width) / 3, (Screen.height + 200) / 2 + 130, 100, 20), "Правильные ответы:");
  644. GUI.Label(new Rect((Screen.width + 110) - (Screen.width) / 3, (Screen.height + 200) / 2 + 130, 100, 20), tru.ToString());
  645. GUI.Label(new Rect((Screen.width + 6) - (Screen.width) / 3, (Screen.height + 200) / 2 + 100, 100, 20), "Кол-во ошибок:");
  646. GUI.Label(new Rect((Screen.width + 110) - (Screen.width) / 3, (Screen.height + 200) / 2 + 100, 100, 20), fal.ToString());
  647. if (visibleButton1)
  648. {
  649. if (GUI.Button(new Rect((Screen.width + 6) - (Screen.width) / 3, (Screen.height - 300) / 2 + 130, (Screen.width - 30) / 3, (Screen.height) / 27), "1.Отключить холодильник от сети."))
  650. {
  651. if (truOtvets2[k] == 1)
  652. {
  653. k++;
  654. Debug.Log("КРАСАВА, МОЛОДЕЦ!");
  655. visibleButton1 = false;
  656. tru++;
  657. GUI.Label(new Rect((Screen.width + 110) - (Screen.width) / 3, (Screen.height + 200) / 2 + 130, 100, 20), tru.ToString());
  658.  
  659. }
  660. else
  661. {
  662. fal++;
  663. GUI.Label(new Rect((Screen.width + 110) - (Screen.width) / 3, (Screen.height + 200) / 2 + 100, 100, 20), fal.ToString());
  664. errorShow = true;
  665. Debug.Log("НЕ КРАСАВА И НЕ МОЛОДЕЦ!");
  666. }
  667. }
  668. }
  669.  
  670. if (visibleButton2)
  671. {
  672. if (GUI.Button(new Rect((Screen.width + 6) - (Screen.width) / 3, (Screen.height - 750) / 2 + 130, (Screen.width - 30) / 3, (Screen.height) / 27), "2.Снять корпус холодильника. "))
  673. {
  674. if (truOtvets2[k] == 2)
  675. {
  676. k++;
  677. Debug.Log("КРАСАВА, МОЛОДЕЦ!");
  678. visibleButton2 = false;
  679. tru++;
  680. GUI.Label(new Rect((Screen.width + 110) - (Screen.width) / 3, (Screen.height + 200) / 2 + 130, 100, 20), tru.ToString());
  681.  
  682. }
  683. else
  684. {
  685. errorShow = true;
  686. Debug.Log("НЕ КРАСАВА И НЕ МОЛОДЕЦ!");
  687. fal++;
  688. GUI.Label(new Rect((Screen.width + 110) - (Screen.width) / 3, (Screen.height + 200) / 2 + 100, 100, 20), fal.ToString());
  689. }
  690. }
  691. }
  692. if (visibleButton3)
  693. {
  694. if (GUI.Button(new Rect((Screen.width + 6) - (Screen.width) / 3, (Screen.height - 600) / 2 + 130, (Screen.width - 30) / 3, (Screen.height) / 27), "3.Осмотреть на дефекты. "))
  695. {
  696. if (truOtvets2[k] == 3)
  697. {
  698. k++;
  699. Debug.Log("КРАСАВА, МОЛОДЕЦ!");
  700. visibleButton3 = false;
  701. tru++;
  702. GUI.Label(new Rect((Screen.width + 110) - (Screen.width) / 3, (Screen.height + 200) / 2 + 130, 100, 20), tru.ToString());
  703.  
  704. }
  705. else
  706. {
  707. errorShow = true;
  708. Debug.Log("НЕ КРАСАВА И НЕ МОЛОДЕЦ!");
  709. fal++;
  710. GUI.Label(new Rect((Screen.width + 110) - (Screen.width) / 3, (Screen.height + 200) / 2 + 100, 100, 20), fal.ToString());
  711. }
  712.  
  713. }
  714. }
  715. if (visibleButton4)
  716. {
  717. if (GUI.Button(new Rect((Screen.width + 6) - (Screen.width) / 3, (Screen.height - 675) / 2 + 130, (Screen.width - 30) / 3, (Screen.height) / 27), "4.Заменить детали."))
  718. {
  719. if (truOtvets2[k] == 4)
  720. {
  721. k++;
  722. Debug.Log("КРАСАВА, МОЛОДЕЦ!");
  723. visibleButton4 = false;
  724. tru++;
  725. GUI.Label(new Rect((Screen.width + 110) - (Screen.width) / 3, (Screen.height + 200) / 2 + 130, 100, 20), tru.ToString());
  726.  
  727. }
  728. else
  729. {
  730. errorShow = true;
  731. Debug.Log("НЕ КРАСАВА И НЕ МОЛОДЕЦ!");
  732. fal++;
  733. GUI.Label(new Rect((Screen.width + 110) - (Screen.width) / 3, (Screen.height + 200) / 2 + 100, 100, 20), fal.ToString());
  734. }
  735.  
  736. }
  737. }
  738.  
  739.  
  740.  
  741. if (visibleButtonch)
  742. {
  743.  
  744. if (GUI.Button(new Rect((Screen.width + 6) - (Screen.width) / 3, (Screen.height - 525) / 2 + 130, (Screen.width - 30) / 3, (Screen.height) / 27), "5.5. Нарушение регулировки терморегулятора."))
  745. {
  746.  
  747. if (truOtvets2[k] == 5)
  748. {
  749. k++;
  750. Debug.Log("КРАСАВА, МОЛОДЕЦ!");
  751. visibleButtonch = false;
  752. tru++;
  753. GUI.Label(new Rect((Screen.width + 110) - (Screen.width) / 3, (Screen.height + 200) / 2 + 130, 100, 20), tru.ToString());
  754.  
  755. }
  756. else
  757. {
  758. errorShow = true;
  759. Debug.Log("НЕ КРАСАВА И НЕ МОЛОДЕЦ!");
  760. fal++;
  761. GUI.Label(new Rect((Screen.width + 110) - (Screen.width) / 3, (Screen.height + 200) / 2 + 100, 100, 20), fal.ToString());
  762. }
  763. }
  764.  
  765. }
  766.  
  767.  
  768.  
  769.  
  770. if (visibleButton6)
  771. {
  772. if (GUI.Button(new Rect((Screen.width + 6) - (Screen.width) / 3, (Screen.height - 450) / 2 + 130, (Screen.width - 30) / 3, (Screen.height) / 27), "6.Установка и запуск холодильника."))
  773. {
  774. if (truOtvets2[k] == 6)
  775. {
  776. k++;
  777. Debug.Log("КРАСАВА, МОЛОДЕЦ!");
  778. visibleButton6 = false;
  779. tru++;
  780. GUI.Label(new Rect((Screen.width + 110) - (Screen.width) / 3, (Screen.height + 200) / 2 + 130, 100, 20), tru.ToString());
  781.  
  782. }
  783. else
  784. {
  785. errorShow = true;
  786. Debug.Log("НЕ КРАСАВА И НЕ МОЛОДЕЦ!");
  787. fal++;
  788. GUI.Label(new Rect((Screen.width + 110) - (Screen.width) / 3, (Screen.height + 200) / 2 + 100, 100, 20), fal.ToString());
  789. }
  790. }
  791. }
  792. if (visibleButton7)
  793. {
  794. if (GUI.Button(new Rect((Screen.width + 6) - (Screen.width) / 3, (Screen.height - 375) / 2 + 130, (Screen.width - 30) / 3, (Screen.height) / 27), "7.Сборка в обратном порядке."))
  795. {
  796. if (truOtvets2[k] == 7)
  797. {
  798. k++;
  799. Debug.Log("КРАСАВА, МОЛОДЕЦ!");
  800. visibleButton7 = false;
  801. tru++;
  802. GUI.Label(new Rect((Screen.width + 110) - (Screen.width) / 3, (Screen.height + 200) / 2 + 130, 100, 20), tru.ToString());
  803. }
  804. else
  805. {
  806. errorShow = true;
  807. Debug.Log("НЕ КРАСАВА И НЕ МОЛОДЕЦ!");
  808. fal++;
  809. GUI.Label(new Rect((Screen.width + 110) - (Screen.width) / 3, (Screen.height + 200) / 2 + 100, 100, 20), fal.ToString());
  810. }
  811. }
  812. }
  813. break;
  814. }
  815. }
  816.  
  817. }
  818. void zapoln3()
  819. {
  820. switch (z2)
  821. {
  822.  
  823. case 1:
  824. {
  825. GUI.Label(new Rect((Screen.width + 6) - (Screen.width) / 3, (Screen.height + 200) / 2 + 130, 100, 20), "Правильные ответы:");
  826. GUI.Label(new Rect((Screen.width + 110) - (Screen.width) / 3, (Screen.height + 200) / 2 + 130, 100, 20), tru.ToString());
  827. GUI.Label(new Rect((Screen.width + 6) - (Screen.width) / 3, (Screen.height + 200) / 2 + 100, 100, 20), "Кол-во ошибок:");
  828. GUI.Label(new Rect((Screen.width + 110) - (Screen.width) / 3, (Screen.height + 200) / 2 + 100, 100, 20), fal.ToString());
  829. if (visibleButton1)
  830. {
  831. if (GUI.Button(new Rect((Screen.width + 6) - (Screen.width) / 3, (Screen.height - 750) / 2 + 130, (Screen.width - 30) / 3, (Screen.height) / 27), "1.Отключить холодильник от сети."))
  832. {
  833. if (truOtvets2[k] == 1)
  834. {
  835. k++;
  836. Debug.Log("КРАСАВА, МОЛОДЕЦ!");
  837. visibleButton1 = false;
  838. tru++;
  839. GUI.Label(new Rect((Screen.width + 110) - (Screen.width) / 3, (Screen.height + 200) / 2 + 130, 100, 20), tru.ToString());
  840.  
  841. }
  842. else
  843. {
  844. fal++;
  845. GUI.Label(new Rect((Screen.width + 110) - (Screen.width) / 3, (Screen.height + 200) / 2 + 100, 100, 20), fal.ToString());
  846. errorShow = true;
  847. Debug.Log("НЕ КРАСАВА И НЕ МОЛОДЕЦ!");
  848. }
  849. }
  850. }
  851.  
  852. if (visibleButton2)
  853. {
  854. if (GUI.Button(new Rect((Screen.width + 6) - (Screen.width) / 3, (Screen.height - 675) / 2 + 130, (Screen.width - 30) / 3, (Screen.height) / 27), "2.Снять корпус холодильника. "))
  855. {
  856. if (truOtvets2[k] == 2)
  857. {
  858. k++;
  859. Debug.Log("КРАСАВА, МОЛОДЕЦ!");
  860. visibleButton2 = false;
  861. tru++;
  862. GUI.Label(new Rect((Screen.width + 110) - (Screen.width) / 3, (Screen.height + 200) / 2 + 130, 100, 20), tru.ToString());
  863.  
  864. }
  865. else
  866. {
  867. errorShow = true;
  868. Debug.Log("НЕ КРАСАВА И НЕ МОЛОДЕЦ!");
  869. fal++;
  870. GUI.Label(new Rect((Screen.width + 110) - (Screen.width) / 3, (Screen.height + 200) / 2 + 100, 100, 20), fal.ToString());
  871. }
  872. }
  873. }
  874. if (visibleButton3)
  875. {
  876. if (GUI.Button(new Rect((Screen.width + 6) - (Screen.width) / 3, (Screen.height - 600) / 2 + 130, (Screen.width - 30) / 3, (Screen.height) / 27), "3.Осмотреть на дефекты. "))
  877. {
  878. if (truOtvets2[k] == 3)
  879. {
  880. k++;
  881. Debug.Log("КРАСАВА, МОЛОДЕЦ!");
  882. visibleButton3 = false;
  883. tru++;
  884. GUI.Label(new Rect((Screen.width + 110) - (Screen.width) / 3, (Screen.height + 200) / 2 + 130, 100, 20), tru.ToString());
  885.  
  886. }
  887. else
  888. {
  889. errorShow = true;
  890. Debug.Log("НЕ КРАСАВА И НЕ МОЛОДЕЦ!");
  891. fal++;
  892. GUI.Label(new Rect((Screen.width + 110) - (Screen.width) / 3, (Screen.height + 200) / 2 + 100, 100, 20), fal.ToString());
  893. }
  894.  
  895. }
  896. }
  897. if (visibleButton4)
  898. {
  899. if (GUI.Button(new Rect((Screen.width + 6) - (Screen.width) / 3, (Screen.height - 525) / 2 + 130, (Screen.width - 30) / 3, (Screen.height) / 27), "4.Заменить детали."))
  900. {
  901. if (truOtvets2[k] == 4)
  902. {
  903. k++;
  904. Debug.Log("КРАСАВА, МОЛОДЕЦ!");
  905. visibleButton4 = false;
  906. tru++;
  907. GUI.Label(new Rect((Screen.width + 110) - (Screen.width) / 3, (Screen.height + 200) / 2 + 130, 100, 20), tru.ToString());
  908.  
  909. }
  910. else
  911. {
  912. errorShow = true;
  913. Debug.Log("НЕ КРАСАВА И НЕ МОЛОДЕЦ!");
  914. fal++;
  915. GUI.Label(new Rect((Screen.width + 110) - (Screen.width) / 3, (Screen.height + 200) / 2 + 100, 100, 20), fal.ToString());
  916. }
  917.  
  918. }
  919. }
  920.  
  921. if ((!visibleButton4) && (visibleButton))
  922. {
  923. GUI.Label(new Rect((Screen.width + 6) - (Screen.width) / 3, (Screen.height - 850) / 2 + 130, (Screen.width - 30) / 3, (Screen.height) / 27), "Выберите дефект");
  924. }
  925.  
  926. if (visibleButtonch)
  927. {
  928.  
  929. if (GUI.Button(new Rect((Screen.width + 6) - (Screen.width) / 3, (Screen.height - 450) / 2 + 130, (Screen.width - 30) / 3, (Screen.height) / 27), "5. Дефект биметаллической пластины защитного реле: "))
  930. {
  931.  
  932. if ((truOtvets2[k] == 5) && (pr3 == 1))
  933. {
  934. k++;
  935. Debug.Log("КРАСАВА, МОЛОДЕЦ!");
  936. visibleButtonch = false;
  937. visibleButton = false;
  938. tru++;
  939. GUI.Label(new Rect((Screen.width + 110) - (Screen.width) / 3, (Screen.height + 200) / 2 + 130, 100, 20), tru.ToString());
  940.  
  941. }
  942. else
  943. {
  944. errorShow = true;
  945. Debug.Log("НЕ КРАСАВА И НЕ МОЛОДЕЦ!");
  946. fal++;
  947. GUI.Label(new Rect((Screen.width + 110) - (Screen.width) / 3, (Screen.height + 200) / 2 + 100, 100, 20), fal.ToString());
  948. }
  949. }
  950. if (GUI.Button(new Rect((Screen.width + 6) - (Screen.width) / 3, (Screen.height - 375) / 2 + 130, (Screen.width - 30) / 3, (Screen.height) / 27), "Дефект катушки (или иного датчика силы тока) пускового реле"))
  951. {
  952. if ((truOtvets2[k] == 5) && (pr3 == 2))
  953. {
  954. k++;
  955. Debug.Log("КРАСАВА, МОЛОДЕЦ!");
  956. visibleButtonch = false;
  957. visibleButton = false;
  958. tru++;
  959. GUI.Label(new Rect((Screen.width + 110) - (Screen.width) / 3, (Screen.height + 200) / 2 + 130, 100, 20), tru.ToString());
  960.  
  961. }
  962. else
  963. {
  964. errorShow = true;
  965. Debug.Log("НЕ КРАСАВА И НЕ МОЛОДЕЦ!");
  966. fal++;
  967. GUI.Label(new Rect((Screen.width + 110) - (Screen.width) / 3, (Screen.height + 200) / 2 + 100, 100, 20), fal.ToString());
  968. }
  969. }
  970. if (GUI.Button(new Rect((Screen.width + 6) - (Screen.width) / 3, (Screen.height - 300) / 2 + 130, (Screen.width - 30) / 3, (Screen.height) / 27), "Обрыв пусковой обмотки электродвигателя"))
  971. {
  972. if ((truOtvets2[k] == 5) && (pr3 == 3))
  973. {
  974. k++;
  975. Debug.Log("КРАСАВА, МОЛОДЕЦ!");
  976. visibleButtonch = false;
  977. visibleButton = false;
  978. tru++;
  979. GUI.Label(new Rect((Screen.width + 110) - (Screen.width) / 3, (Screen.height + 200) / 2 + 130, 100, 20), tru.ToString());
  980.  
  981. }
  982. else
  983. {
  984. errorShow = true;
  985. Debug.Log("НЕ КРАСАВА И НЕ МОЛОДЕЦ!");
  986. fal++;
  987. GUI.Label(new Rect((Screen.width + 110) - (Screen.width) / 3, (Screen.height + 200) / 2 + 100, 100, 20), fal.ToString());
  988. }
  989. }
  990. }
  991.  
  992.  
  993.  
  994.  
  995. if (visibleButton6)
  996. {
  997. if (GUI.Button(new Rect((Screen.width + 6) - (Screen.width) / 3, (Screen.height - 225) / 2 + 130, (Screen.width - 30) / 3, (Screen.height) / 27), "6.Установка и запуск холодильника."))
  998. {
  999. if (truOtvets2[k] == 6)
  1000. {
  1001. k++;
  1002. Debug.Log("КРАСАВА, МОЛОДЕЦ!");
  1003. visibleButton6 = false;
  1004. tru++;
  1005. GUI.Label(new Rect((Screen.width + 110) - (Screen.width) / 3, (Screen.height + 200) / 2 + 130, 100, 20), tru.ToString());
  1006.  
  1007. }
  1008. else
  1009. {
  1010. errorShow = true;
  1011. Debug.Log("НЕ КРАСАВА И НЕ МОЛОДЕЦ!");
  1012. fal++;
  1013. GUI.Label(new Rect((Screen.width + 110) - (Screen.width) / 3, (Screen.height + 200) / 2 + 100, 100, 20), fal.ToString());
  1014. }
  1015. }
  1016. }
  1017.  
  1018. break;
  1019. }
  1020. case 2:
  1021. {
  1022. GUI.Label(new Rect((Screen.width + 6) - (Screen.width) / 3, (Screen.height + 200) / 2 + 130, 100, 20), "Правильные ответы:");
  1023. GUI.Label(new Rect((Screen.width + 110) - (Screen.width) / 3, (Screen.height + 200) / 2 + 130, 100, 20), tru.ToString());
  1024. GUI.Label(new Rect((Screen.width + 6) - (Screen.width) / 3, (Screen.height + 200) / 2 + 100, 100, 20), "Кол-во ошибок:");
  1025. GUI.Label(new Rect((Screen.width + 110) - (Screen.width) / 3, (Screen.height + 200) / 2 + 100, 100, 20), fal.ToString());
  1026. if (visibleButton1)
  1027. {
  1028. if (GUI.Button(new Rect((Screen.width + 6) - (Screen.width) / 3, (Screen.height - 300) / 2 + 130, (Screen.width - 30) / 3, (Screen.height) / 27), "1.Отключить холодильник от сети."))
  1029. {
  1030. if (truOtvets2[k] == 1)
  1031. {
  1032. k++;
  1033. Debug.Log("КРАСАВА, МОЛОДЕЦ!");
  1034. visibleButton1 = false;
  1035. tru++;
  1036. GUI.Label(new Rect((Screen.width + 110) - (Screen.width) / 3, (Screen.height + 200) / 2 + 130, 100, 20), tru.ToString());
  1037.  
  1038. }
  1039. else
  1040. {
  1041. fal++;
  1042. GUI.Label(new Rect((Screen.width + 110) - (Screen.width) / 3, (Screen.height + 200) / 2 + 100, 100, 20), fal.ToString());
  1043. errorShow = true;
  1044. Debug.Log("НЕ КРАСАВА И НЕ МОЛОДЕЦ!");
  1045. }
  1046. }
  1047. }
  1048.  
  1049. if (visibleButton2)
  1050. {
  1051. if (GUI.Button(new Rect((Screen.width + 6) - (Screen.width) / 3, (Screen.height - 600) / 2 + 130, (Screen.width - 30) / 3, (Screen.height) / 27), "2.Снять корпус холодильника. "))
  1052. {
  1053. if (truOtvets2[k] == 2)
  1054. {
  1055. k++;
  1056. Debug.Log("КРАСАВА, МОЛОДЕЦ!");
  1057. visibleButton2 = false;
  1058. tru++;
  1059. GUI.Label(new Rect((Screen.width + 110) - (Screen.width) / 3, (Screen.height + 200) / 2 + 130, 100, 20), tru.ToString());
  1060.  
  1061. }
  1062. else
  1063. {
  1064. errorShow = true;
  1065. Debug.Log("НЕ КРАСАВА И НЕ МОЛОДЕЦ!");
  1066. fal++;
  1067. GUI.Label(new Rect((Screen.width + 110) - (Screen.width) / 3, (Screen.height + 200) / 2 + 100, 100, 20), fal.ToString());
  1068. }
  1069. }
  1070. }
  1071. if (visibleButton3)
  1072. {
  1073. if (GUI.Button(new Rect((Screen.width + 6) - (Screen.width) / 3, (Screen.height - 450) / 2 + 130, (Screen.width - 30) / 3, (Screen.height) / 27), "3.Осмотреть на дефекты. "))
  1074. {
  1075. if (truOtvets2[k] == 3)
  1076. {
  1077. k++;
  1078. Debug.Log("КРАСАВА, МОЛОДЕЦ!");
  1079. visibleButton3 = false;
  1080. tru++;
  1081. GUI.Label(new Rect((Screen.width + 110) - (Screen.width) / 3, (Screen.height + 200) / 2 + 130, 100, 20), tru.ToString());
  1082.  
  1083. }
  1084. else
  1085. {
  1086. errorShow = true;
  1087. Debug.Log("НЕ КРАСАВА И НЕ МОЛОДЕЦ!");
  1088. fal++;
  1089. GUI.Label(new Rect((Screen.width + 110) - (Screen.width) / 3, (Screen.height + 200) / 2 + 100, 100, 20), fal.ToString());
  1090. }
  1091.  
  1092. }
  1093. }
  1094. if (visibleButton4)
  1095. {
  1096. if (GUI.Button(new Rect((Screen.width + 6) - (Screen.width) / 3, (Screen.height - 225) / 2 + 130, (Screen.width - 30) / 3, (Screen.height) / 27), "4.Заменить детали."))
  1097. {
  1098. if (truOtvets2[k] == 4)
  1099. {
  1100. k++;
  1101. Debug.Log("КРАСАВА, МОЛОДЕЦ!");
  1102. visibleButton4 = false;
  1103. tru++;
  1104. GUI.Label(new Rect((Screen.width + 110) - (Screen.width) / 3, (Screen.height + 200) / 2 + 130, 100, 20), tru.ToString());
  1105.  
  1106. }
  1107. else
  1108. {
  1109. errorShow = true;
  1110. Debug.Log("НЕ КРАСАВА И НЕ МОЛОДЕЦ!");
  1111. fal++;
  1112. GUI.Label(new Rect((Screen.width + 110) - (Screen.width) / 3, (Screen.height + 200) / 2 + 100, 100, 20), fal.ToString());
  1113. }
  1114.  
  1115. }
  1116. }
  1117.  
  1118. if ((!visibleButton4) && (visibleButton))
  1119. {
  1120. GUI.Label(new Rect((Screen.width + 6) - (Screen.width) / 3, (Screen.height - 850) / 2 + 130, (Screen.width - 30) / 3, (Screen.height) / 27), "Выберите дефект");
  1121. }
  1122.  
  1123. if (visibleButtonch)
  1124. {
  1125.  
  1126. if (GUI.Button(new Rect((Screen.width + 6) - (Screen.width) / 3, (Screen.height - 675) / 2 + 130, (Screen.width - 30) / 3, (Screen.height) / 27), "5. Дефект биметаллической пластины защитного реле: "))
  1127. {
  1128.  
  1129. if ((truOtvets2[k] == 5) && (pr3 == 1))
  1130. {
  1131. k++;
  1132. Debug.Log("КРАСАВА, МОЛОДЕЦ!");
  1133. visibleButtonch = false;
  1134. visibleButton = false;
  1135. tru++;
  1136. GUI.Label(new Rect((Screen.width + 110) - (Screen.width) / 3, (Screen.height + 200) / 2 + 130, 100, 20), tru.ToString());
  1137.  
  1138. }
  1139. else
  1140. {
  1141. errorShow = true;
  1142. Debug.Log("НЕ КРАСАВА И НЕ МОЛОДЕЦ!");
  1143. fal++;
  1144. GUI.Label(new Rect((Screen.width + 110) - (Screen.width) / 3, (Screen.height + 200) / 2 + 100, 100, 20), fal.ToString());
  1145. }
  1146. }
  1147. if (GUI.Button(new Rect((Screen.width + 6) - (Screen.width) / 3, (Screen.height - 750) / 2 + 130, (Screen.width - 30) / 3, (Screen.height) / 27), "Дефект катушки (или иного датчика силы тока) пускового реле"))
  1148. {
  1149. if ((truOtvets2[k] == 5) && (pr3 == 2))
  1150. {
  1151. k++;
  1152. Debug.Log("КРАСАВА, МОЛОДЕЦ!");
  1153. visibleButtonch = false;
  1154. visibleButton = false;
  1155. tru++;
  1156. GUI.Label(new Rect((Screen.width + 110) - (Screen.width) / 3, (Screen.height + 200) / 2 + 130, 100, 20), tru.ToString());
  1157.  
  1158. }
  1159. else
  1160. {
  1161. errorShow = true;
  1162. Debug.Log("НЕ КРАСАВА И НЕ МОЛОДЕЦ!");
  1163. fal++;
  1164. GUI.Label(new Rect((Screen.width + 110) - (Screen.width) / 3, (Screen.height + 200) / 2 + 100, 100, 20), fal.ToString());
  1165. }
  1166. }
  1167. if (GUI.Button(new Rect((Screen.width + 6) - (Screen.width) / 3, (Screen.height - 525) / 2 + 130, (Screen.width - 30) / 3, (Screen.height) / 27), "Обрыв пусковой обмотки электродвигателя"))
  1168. {
  1169. if ((truOtvets2[k] == 5) && (pr3 == 3))
  1170. {
  1171. k++;
  1172. Debug.Log("КРАСАВА, МОЛОДЕЦ!");
  1173. visibleButtonch = false;
  1174. visibleButton = false;
  1175. tru++;
  1176. GUI.Label(new Rect((Screen.width + 110) - (Screen.width) / 3, (Screen.height + 200) / 2 + 130, 100, 20), tru.ToString());
  1177.  
  1178. }
  1179. else
  1180. {
  1181. errorShow = true;
  1182. Debug.Log("НЕ КРАСАВА И НЕ МОЛОДЕЦ!");
  1183. fal++;
  1184. GUI.Label(new Rect((Screen.width + 110) - (Screen.width) / 3, (Screen.height + 200) / 2 + 100, 100, 20), fal.ToString());
  1185. }
  1186. }
  1187. }
  1188.  
  1189.  
  1190.  
  1191.  
  1192. if (visibleButton6)
  1193. {
  1194. if (GUI.Button(new Rect((Screen.width + 6) - (Screen.width) / 3, (Screen.height - 375) / 2 + 130, (Screen.width - 30) / 3, (Screen.height) / 27), "6.Установка и запуск холодильника."))
  1195. {
  1196. if (truOtvets2[k] == 6)
  1197. {
  1198. k++;
  1199. Debug.Log("КРАСАВА, МОЛОДЕЦ!");
  1200. visibleButton6 = false;
  1201. tru++;
  1202. GUI.Label(new Rect((Screen.width + 110) - (Screen.width) / 3, (Screen.height + 200) / 2 + 130, 100, 20), tru.ToString());
  1203.  
  1204. }
  1205. else
  1206. {
  1207. errorShow = true;
  1208. Debug.Log("НЕ КРАСАВА И НЕ МОЛОДЕЦ!");
  1209. fal++;
  1210. GUI.Label(new Rect((Screen.width + 110) - (Screen.width) / 3, (Screen.height + 200) / 2 + 100, 100, 20), fal.ToString());
  1211. }
  1212. }
  1213. }
  1214.  
  1215. break;
  1216. }
  1217. case 3:
  1218. {
  1219. GUI.Label(new Rect((Screen.width + 6) - (Screen.width) / 3, (Screen.height + 200) / 2 + 130, 100, 20), "Правильные ответы:");
  1220. GUI.Label(new Rect((Screen.width + 110) - (Screen.width) / 3, (Screen.height + 200) / 2 + 130, 100, 20), tru.ToString());
  1221. GUI.Label(new Rect((Screen.width + 6) - (Screen.width) / 3, (Screen.height + 200) / 2 + 100, 100, 20), "Кол-во ошибок:");
  1222. GUI.Label(new Rect((Screen.width + 110) - (Screen.width) / 3, (Screen.height + 200) / 2 + 100, 100, 20), fal.ToString());
  1223. if (visibleButton1)
  1224. {
  1225. if (GUI.Button(new Rect((Screen.width + 6) - (Screen.width) / 3, (Screen.height - 375) / 2 + 130, (Screen.width - 30) / 3, (Screen.height) / 27), "1.Отключить холодильник от сети."))
  1226. {
  1227. if (truOtvets2[k] == 1)
  1228. {
  1229. k++;
  1230. Debug.Log("КРАСАВА, МОЛОДЕЦ!");
  1231. visibleButton1 = false;
  1232. tru++;
  1233. GUI.Label(new Rect((Screen.width + 110) - (Screen.width) / 3, (Screen.height + 200) / 2 + 130, 100, 20), tru.ToString());
  1234.  
  1235. }
  1236. else
  1237. {
  1238. fal++;
  1239. GUI.Label(new Rect((Screen.width + 110) - (Screen.width) / 3, (Screen.height + 200) / 2 + 100, 100, 20), fal.ToString());
  1240. errorShow = true;
  1241. Debug.Log("НЕ КРАСАВА И НЕ МОЛОДЕЦ!");
  1242. }
  1243. }
  1244. }
  1245.  
  1246. if (visibleButton2)
  1247. {
  1248. if (GUI.Button(new Rect((Screen.width + 6) - (Screen.width) / 3, (Screen.height - 675) / 2 + 130, (Screen.width - 30) / 3, (Screen.height) / 27), "2.Снять корпус холодильника. "))
  1249. {
  1250. if (truOtvets2[k] == 2)
  1251. {
  1252. k++;
  1253. Debug.Log("КРАСАВА, МОЛОДЕЦ!");
  1254. visibleButton2 = false;
  1255. tru++;
  1256. GUI.Label(new Rect((Screen.width + 110) - (Screen.width) / 3, (Screen.height + 200) / 2 + 130, 100, 20), tru.ToString());
  1257.  
  1258. }
  1259. else
  1260. {
  1261. errorShow = true;
  1262. Debug.Log("НЕ КРАСАВА И НЕ МОЛОДЕЦ!");
  1263. fal++;
  1264. GUI.Label(new Rect((Screen.width + 110) - (Screen.width) / 3, (Screen.height + 200) / 2 + 100, 100, 20), fal.ToString());
  1265. }
  1266. }
  1267. }
  1268. if (visibleButton3)
  1269. {
  1270. if (GUI.Button(new Rect((Screen.width + 6) - (Screen.width) / 3, (Screen.height - 225) / 2 + 130, (Screen.width - 30) / 3, (Screen.height) / 27), "3.Осмотреть на дефекты. "))
  1271. {
  1272. if (truOtvets2[k] == 3)
  1273. {
  1274. k++;
  1275. Debug.Log("КРАСАВА, МОЛОДЕЦ!");
  1276. visibleButton3 = false;
  1277. tru++;
  1278. GUI.Label(new Rect((Screen.width + 110) - (Screen.width) / 3, (Screen.height + 200) / 2 + 130, 100, 20), tru.ToString());
  1279.  
  1280. }
  1281. else
  1282. {
  1283. errorShow = true;
  1284. Debug.Log("НЕ КРАСАВА И НЕ МОЛОДЕЦ!");
  1285. fal++;
  1286. GUI.Label(new Rect((Screen.width + 110) - (Screen.width) / 3, (Screen.height + 200) / 2 + 100, 100, 20), fal.ToString());
  1287. }
  1288.  
  1289. }
  1290. }
  1291. if (visibleButton4)
  1292. {
  1293. if (GUI.Button(new Rect((Screen.width + 6) - (Screen.width) / 3, (Screen.height - 600) / 2 + 130, (Screen.width - 30) / 3, (Screen.height) / 27), "4.Заменить детали."))
  1294. {
  1295. if (truOtvets2[k] == 4)
  1296. {
  1297. k++;
  1298. Debug.Log("КРАСАВА, МОЛОДЕЦ!");
  1299. visibleButton4 = false;
  1300. tru++;
  1301. GUI.Label(new Rect((Screen.width + 110) - (Screen.width) / 3, (Screen.height + 200) / 2 + 130, 100, 20), tru.ToString());
  1302.  
  1303. }
  1304. else
  1305. {
  1306. errorShow = true;
  1307. Debug.Log("НЕ КРАСАВА И НЕ МОЛОДЕЦ!");
  1308. fal++;
  1309. GUI.Label(new Rect((Screen.width + 110) - (Screen.width) / 3, (Screen.height + 200) / 2 + 100, 100, 20), fal.ToString());
  1310. }
  1311.  
  1312. }
  1313. }
  1314.  
  1315. if ((!visibleButton4) && (visibleButton))
  1316. {
  1317. GUI.Label(new Rect((Screen.width + 6) - (Screen.width) / 3, (Screen.height - 850) / 2 + 130, (Screen.width - 30) / 3, (Screen.height) / 27), "Выберите дефект");
  1318. }
  1319.  
  1320. if (visibleButtonch)
  1321. {
  1322.  
  1323. if (GUI.Button(new Rect((Screen.width + 6) - (Screen.width) / 3, (Screen.height - 750) / 2 + 130, (Screen.width - 30) / 3, (Screen.height) / 27), "5. Дефект биметаллической пластины защитного реле: "))
  1324. {
  1325.  
  1326. if ((truOtvets2[k] == 5) && (pr3 == 1))
  1327. {
  1328. k++;
  1329. Debug.Log("КРАСАВА, МОЛОДЕЦ!");
  1330. visibleButtonch = false;
  1331. visibleButton = false;
  1332. tru++;
  1333. GUI.Label(new Rect((Screen.width + 110) - (Screen.width) / 3, (Screen.height + 200) / 2 + 130, 100, 20), tru.ToString());
  1334.  
  1335. }
  1336. else
  1337. {
  1338. errorShow = true;
  1339. Debug.Log("НЕ КРАСАВА И НЕ МОЛОДЕЦ!");
  1340. fal++;
  1341. GUI.Label(new Rect((Screen.width + 110) - (Screen.width) / 3, (Screen.height + 200) / 2 + 100, 100, 20), fal.ToString());
  1342. }
  1343. }
  1344. if (GUI.Button(new Rect((Screen.width + 6) - (Screen.width) / 3, (Screen.height - 450) / 2 + 130, (Screen.width - 30) / 3, (Screen.height) / 27), "Дефект катушки (или иного датчика силы тока) пускового реле"))
  1345. {
  1346. if ((truOtvets2[k] == 5) && (pr3 == 2))
  1347. {
  1348. k++;
  1349. Debug.Log("КРАСАВА, МОЛОДЕЦ!");
  1350. visibleButtonch = false;
  1351. visibleButton = false;
  1352. tru++;
  1353. GUI.Label(new Rect((Screen.width + 110) - (Screen.width) / 3, (Screen.height + 200) / 2 + 130, 100, 20), tru.ToString());
  1354.  
  1355. }
  1356. else
  1357. {
  1358. errorShow = true;
  1359. Debug.Log("НЕ КРАСАВА И НЕ МОЛОДЕЦ!");
  1360. fal++;
  1361. GUI.Label(new Rect((Screen.width + 110) - (Screen.width) / 3, (Screen.height + 200) / 2 + 100, 100, 20), fal.ToString());
  1362. }
  1363. }
  1364. if (GUI.Button(new Rect((Screen.width + 6) - (Screen.width) / 3, (Screen.height - 525) / 2 + 130, (Screen.width - 30) / 3, (Screen.height) / 27), "Обрыв пусковой обмотки электродвигателя"))
  1365. {
  1366. if ((truOtvets2[k] == 5) && (pr3 == 3))
  1367. {
  1368. k++;
  1369. Debug.Log("КРАСАВА, МОЛОДЕЦ!");
  1370. visibleButtonch = false;
  1371. visibleButton = false;
  1372. tru++;
  1373. GUI.Label(new Rect((Screen.width + 110) - (Screen.width) / 3, (Screen.height + 200) / 2 + 130, 100, 20), tru.ToString());
  1374.  
  1375. }
  1376. else
  1377. {
  1378. errorShow = true;
  1379. Debug.Log("НЕ КРАСАВА И НЕ МОЛОДЕЦ!");
  1380. fal++;
  1381. GUI.Label(new Rect((Screen.width + 110) - (Screen.width) / 3, (Screen.height + 200) / 2 + 100, 100, 20), fal.ToString());
  1382. }
  1383. }
  1384. }
  1385.  
  1386.  
  1387.  
  1388.  
  1389. if (visibleButton6)
  1390. {
  1391. if (GUI.Button(new Rect((Screen.width + 6) - (Screen.width) / 3, (Screen.height - 300) / 2 + 130, (Screen.width - 30) / 3, (Screen.height) / 27), "6.Установка и запуск холодильника."))
  1392. {
  1393. if (truOtvets2[k] == 6)
  1394. {
  1395. k++;
  1396. Debug.Log("КРАСАВА, МОЛОДЕЦ!");
  1397. visibleButton6 = false;
  1398. tru++;
  1399. GUI.Label(new Rect((Screen.width + 110) - (Screen.width) / 3, (Screen.height + 200) / 2 + 130, 100, 20), tru.ToString());
  1400.  
  1401. }
  1402. else
  1403. {
  1404. errorShow = true;
  1405. Debug.Log("НЕ КРАСАВА И НЕ МОЛОДЕЦ!");
  1406. fal++;
  1407. GUI.Label(new Rect((Screen.width + 110) - (Screen.width) / 3, (Screen.height + 200) / 2 + 100, 100, 20), fal.ToString());
  1408. }
  1409. }
  1410. }
  1411.  
  1412. break;
  1413. }
  1414. case 4:
  1415. {
  1416. GUI.Label(new Rect((Screen.width + 6) - (Screen.width) / 3, (Screen.height + 200) / 2 + 130, 100, 20), "Правильные ответы:");
  1417. GUI.Label(new Rect((Screen.width + 110) - (Screen.width) / 3, (Screen.height + 200) / 2 + 130, 100, 20), tru.ToString());
  1418. GUI.Label(new Rect((Screen.width + 6) - (Screen.width) / 3, (Screen.height + 200) / 2 + 100, 100, 20), "Кол-во ошибок:");
  1419. GUI.Label(new Rect((Screen.width + 110) - (Screen.width) / 3, (Screen.height + 200) / 2 + 100, 100, 20), fal.ToString());
  1420. if (visibleButton1)
  1421. {
  1422. if (GUI.Button(new Rect((Screen.width + 6) - (Screen.width) / 3, (Screen.height - 300) / 2 + 130, (Screen.width - 30) / 3, (Screen.height) / 27), "1.Отключить холодильник от сети."))
  1423. {
  1424. if (truOtvets2[k] == 1)
  1425. {
  1426. k++;
  1427. Debug.Log("КРАСАВА, МОЛОДЕЦ!");
  1428. visibleButton1 = false;
  1429. tru++;
  1430. GUI.Label(new Rect((Screen.width + 110) - (Screen.width) / 3, (Screen.height + 200) / 2 + 130, 100, 20), tru.ToString());
  1431.  
  1432. }
  1433. else
  1434. {
  1435. fal++;
  1436. GUI.Label(new Rect((Screen.width + 110) - (Screen.width) / 3, (Screen.height + 200) / 2 + 100, 100, 20), fal.ToString());
  1437. errorShow = true;
  1438. Debug.Log("НЕ КРАСАВА И НЕ МОЛОДЕЦ!");
  1439. }
  1440. }
  1441. }
  1442.  
  1443. if (visibleButton2)
  1444. {
  1445. if (GUI.Button(new Rect((Screen.width + 6) - (Screen.width) / 3, (Screen.height - 750) / 2 + 130, (Screen.width - 30) / 3, (Screen.height) / 27), "2.Снять корпус холодильника. "))
  1446. {
  1447. if (truOtvets2[k] == 2)
  1448. {
  1449. k++;
  1450. Debug.Log("КРАСАВА, МОЛОДЕЦ!");
  1451. visibleButton2 = false;
  1452. tru++;
  1453. GUI.Label(new Rect((Screen.width + 110) - (Screen.width) / 3, (Screen.height + 200) / 2 + 130, 100, 20), tru.ToString());
  1454.  
  1455. }
  1456. else
  1457. {
  1458. errorShow = true;
  1459. Debug.Log("НЕ КРАСАВА И НЕ МОЛОДЕЦ!");
  1460. fal++;
  1461. GUI.Label(new Rect((Screen.width + 110) - (Screen.width) / 3, (Screen.height + 200) / 2 + 100, 100, 20), fal.ToString());
  1462. }
  1463. }
  1464. }
  1465. if (visibleButton3)
  1466. {
  1467. if (GUI.Button(new Rect((Screen.width + 6) - (Screen.width) / 3, (Screen.height - 600) / 2 + 130, (Screen.width - 30) / 3, (Screen.height) / 27), "3.Осмотреть на дефекты. "))
  1468. {
  1469. if (truOtvets2[k] == 3)
  1470. {
  1471. k++;
  1472. Debug.Log("КРАСАВА, МОЛОДЕЦ!");
  1473. visibleButton3 = false;
  1474. tru++;
  1475. GUI.Label(new Rect((Screen.width + 110) - (Screen.width) / 3, (Screen.height + 200) / 2 + 130, 100, 20), tru.ToString());
  1476.  
  1477. }
  1478. else
  1479. {
  1480. errorShow = true;
  1481. Debug.Log("НЕ КРАСАВА И НЕ МОЛОДЕЦ!");
  1482. fal++;
  1483. GUI.Label(new Rect((Screen.width + 110) - (Screen.width) / 3, (Screen.height + 200) / 2 + 100, 100, 20), fal.ToString());
  1484. }
  1485.  
  1486. }
  1487. }
  1488. if (visibleButton4)
  1489. {
  1490. if (GUI.Button(new Rect((Screen.width + 6) - (Screen.width) / 3, (Screen.height - 375) / 2 + 130, (Screen.width - 30) / 3, (Screen.height) / 27), "4.Заменить детали."))
  1491. {
  1492. if (truOtvets2[k] == 4)
  1493. {
  1494. k++;
  1495. Debug.Log("КРАСАВА, МОЛОДЕЦ!");
  1496. visibleButton4 = false;
  1497. tru++;
  1498. GUI.Label(new Rect((Screen.width + 110) - (Screen.width) / 3, (Screen.height + 200) / 2 + 130, 100, 20), tru.ToString());
  1499.  
  1500. }
  1501. else
  1502. {
  1503. errorShow = true;
  1504. Debug.Log("НЕ КРАСАВА И НЕ МОЛОДЕЦ!");
  1505. fal++;
  1506. GUI.Label(new Rect((Screen.width + 110) - (Screen.width) / 3, (Screen.height + 200) / 2 + 100, 100, 20), fal.ToString());
  1507. }
  1508.  
  1509. }
  1510. }
  1511.  
  1512. if ((!visibleButton4) && (visibleButton))
  1513. {
  1514. GUI.Label(new Rect((Screen.width + 6) - (Screen.width) / 3, (Screen.height - 850) / 2 + 130, (Screen.width - 30) / 3, (Screen.height) / 27), "Выберите дефект");
  1515. }
  1516.  
  1517. if (visibleButtonch)
  1518. {
  1519.  
  1520. if (GUI.Button(new Rect((Screen.width + 6) - (Screen.width) / 3, (Screen.height - 675) / 2 + 130, (Screen.width - 30) / 3, (Screen.height) / 27), "5. Дефект биметаллической пластины защитного реле: "))
  1521. {
  1522.  
  1523. if ((truOtvets2[k] == 5) && (pr3 == 1))
  1524. {
  1525. k++;
  1526. Debug.Log("КРАСАВА, МОЛОДЕЦ!");
  1527. visibleButtonch = false;
  1528. visibleButton = false;
  1529. tru++;
  1530. GUI.Label(new Rect((Screen.width + 110) - (Screen.width) / 3, (Screen.height + 200) / 2 + 130, 100, 20), tru.ToString());
  1531.  
  1532. }
  1533. else
  1534. {
  1535. errorShow = true;
  1536. Debug.Log("НЕ КРАСАВА И НЕ МОЛОДЕЦ!");
  1537. fal++;
  1538. GUI.Label(new Rect((Screen.width + 110) - (Screen.width) / 3, (Screen.height + 200) / 2 + 100, 100, 20), fal.ToString());
  1539. }
  1540. }
  1541. if (GUI.Button(new Rect((Screen.width + 6) - (Screen.width) / 3, (Screen.height - 525) / 2 + 130, (Screen.width - 30) / 3, (Screen.height) / 27), "Дефект катушки (или иного датчика силы тока) пускового реле"))
  1542. {
  1543. if ((truOtvets2[k] == 5) && (pr3 == 2))
  1544. {
  1545. k++;
  1546. Debug.Log("КРАСАВА, МОЛОДЕЦ!");
  1547. visibleButtonch = false;
  1548. visibleButton = false;
  1549. tru++;
  1550. GUI.Label(new Rect((Screen.width + 110) - (Screen.width) / 3, (Screen.height + 200) / 2 + 130, 100, 20), tru.ToString());
  1551.  
  1552. }
  1553. else
  1554. {
  1555. errorShow = true;
  1556. Debug.Log("НЕ КРАСАВА И НЕ МОЛОДЕЦ!");
  1557. fal++;
  1558. GUI.Label(new Rect((Screen.width + 110) - (Screen.width) / 3, (Screen.height + 200) / 2 + 100, 100, 20), fal.ToString());
  1559. }
  1560. }
  1561. if (GUI.Button(new Rect((Screen.width + 6) - (Screen.width) / 3, (Screen.height - 450) / 2 + 130, (Screen.width - 30) / 3, (Screen.height) / 27), "Обрыв пусковой обмотки электродвигателя"))
  1562. {
  1563. if ((truOtvets2[k] == 5) && (pr3 == 3))
  1564. {
  1565. k++;
  1566. Debug.Log("КРАСАВА, МОЛОДЕЦ!");
  1567. visibleButtonch = false;
  1568. visibleButton = false;
  1569. tru++;
  1570. GUI.Label(new Rect((Screen.width + 110) - (Screen.width) / 3, (Screen.height + 200) / 2 + 130, 100, 20), tru.ToString());
  1571.  
  1572. }
  1573. else
  1574. {
  1575. errorShow = true;
  1576. Debug.Log("НЕ КРАСАВА И НЕ МОЛОДЕЦ!");
  1577. fal++;
  1578. GUI.Label(new Rect((Screen.width + 110) - (Screen.width) / 3, (Screen.height + 200) / 2 + 100, 100, 20), fal.ToString());
  1579. }
  1580. }
  1581. }
  1582.  
  1583.  
  1584.  
  1585.  
  1586. if (visibleButton6)
  1587. {
  1588. if (GUI.Button(new Rect((Screen.width + 6) - (Screen.width) / 3, (Screen.height - 225) / 2 + 130, (Screen.width - 30) / 3, (Screen.height) / 27), "6.Установка и запуск холодильника."))
  1589. {
  1590. if (truOtvets2[k] == 6)
  1591. {
  1592. k++;
  1593. Debug.Log("КРАСАВА, МОЛОДЕЦ!");
  1594. visibleButton6 = false;
  1595. tru++;
  1596. GUI.Label(new Rect((Screen.width + 110) - (Screen.width) / 3, (Screen.height + 200) / 2 + 130, 100, 20), tru.ToString());
  1597.  
  1598. }
  1599. else
  1600. {
  1601. errorShow = true;
  1602. Debug.Log("НЕ КРАСАВА И НЕ МОЛОДЕЦ!");
  1603. fal++;
  1604. GUI.Label(new Rect((Screen.width + 110) - (Screen.width) / 3, (Screen.height + 200) / 2 + 100, 100, 20), fal.ToString());
  1605. }
  1606. }
  1607. }
  1608.  
  1609. break;
  1610. }
  1611. }
  1612.  
  1613. }
  1614. void zapoln1()
  1615. {
  1616. switch (z2)
  1617. {
  1618.  
  1619. case 1:
  1620. {
  1621. GUI.Label(new Rect((Screen.width + 6) - (Screen.width) / 3, (Screen.height + 200) / 2 + 130, 100, 20), "Правильные ответы:");
  1622. GUI.Label(new Rect((Screen.width + 110) - (Screen.width) / 3, (Screen.height + 200) / 2 + 130, 100, 20), tru.ToString());
  1623. GUI.Label(new Rect((Screen.width + 6) - (Screen.width) / 3, (Screen.height +200) / 2 + 100, 100, 20), "Кол-во ошибок:");
  1624. GUI.Label(new Rect((Screen.width + 110) - (Screen.width) / 3, (Screen.height +200) / 2 + 100, 100, 20), fal.ToString());
  1625. if (visibleButton1)
  1626. {
  1627. if (GUI.Button(new Rect((Screen.width+6) - (Screen.width) / 3, (Screen.height - 750) / 2 + 130, (Screen.width-30) / 3, (Screen.height)/27), "1.Отключить холодильник от сети."))
  1628. {
  1629. if (truOtvets2[k] == 1)
  1630. {
  1631. k++;
  1632. Debug.Log("КРАСАВА, МОЛОДЕЦ!");
  1633. visibleButton1 = false;
  1634. tru++;
  1635. GUI.Label(new Rect((Screen.width + 110) - (Screen.width) / 3, (Screen.height + 200) / 2 + 130, 100, 20), tru.ToString());
  1636.  
  1637. }
  1638. else
  1639. {
  1640. fal++;
  1641. GUI.Label(new Rect((Screen.width + 110) - (Screen.width) / 3, (Screen.height + 200) / 2 + 100, 100, 20), fal.ToString());
  1642. errorShow = true;
  1643. Debug.Log("НЕ КРАСАВА И НЕ МОЛОДЕЦ!");
  1644. }
  1645. }
  1646. }
  1647.  
  1648. if (visibleButton2)
  1649. {
  1650. if (GUI.Button(new Rect((Screen.width + 6) - (Screen.width) / 3, (Screen.height - 675) / 2 + 130, (Screen.width - 30) / 3, (Screen.height) / 27), "2.Снять корпус холодильника. "))
  1651. {
  1652. if (truOtvets2[k] == 2)
  1653. {
  1654. k++;
  1655. Debug.Log("КРАСАВА, МОЛОДЕЦ!");
  1656. visibleButton2 = false;
  1657. tru++;
  1658. GUI.Label(new Rect((Screen.width + 110) - (Screen.width) / 3, (Screen.height + 200) / 2 + 130, 100, 20), tru.ToString());
  1659.  
  1660. }
  1661. else
  1662. {
  1663. errorShow = true;
  1664. Debug.Log("НЕ КРАСАВА И НЕ МОЛОДЕЦ!");
  1665. fal++;
  1666. GUI.Label(new Rect((Screen.width + 110) - (Screen.width) / 3, (Screen.height + 200) / 2 + 100, 100, 20), fal.ToString());
  1667. }
  1668. }
  1669. }
  1670. if (visibleButton3)
  1671. {
  1672. if (GUI.Button(new Rect((Screen.width + 6) - (Screen.width) / 3, (Screen.height - 600) / 2 + 130, (Screen.width - 30) / 3, (Screen.height) / 27), "3.Осмотреть на дефекты. "))
  1673. {
  1674. if (truOtvets2[k] == 3)
  1675. {
  1676. k++;
  1677. Debug.Log("КРАСАВА, МОЛОДЕЦ!");
  1678. visibleButton3 = false;
  1679. tru++;
  1680. GUI.Label(new Rect((Screen.width + 110) - (Screen.width) / 3, (Screen.height + 200) / 2 + 130, 100, 20), tru.ToString());
  1681.  
  1682. }
  1683. else
  1684. {
  1685. errorShow = true;
  1686. Debug.Log("НЕ КРАСАВА И НЕ МОЛОДЕЦ!");
  1687. fal++;
  1688. GUI.Label(new Rect((Screen.width + 110) - (Screen.width) / 3, (Screen.height + 200) / 2 + 100, 100, 20), fal.ToString());
  1689. }
  1690.  
  1691. }
  1692. }
  1693. if (visibleButton4)
  1694. {
  1695. if (GUI.Button(new Rect((Screen.width + 6) - (Screen.width) / 3, (Screen.height - 525) / 2 + 130, (Screen.width - 30) / 3, (Screen.height) / 27), "4.Заменить детали."))
  1696. {
  1697. if (truOtvets2[k] == 4)
  1698. {
  1699. k++;
  1700. Debug.Log("КРАСАВА, МОЛОДЕЦ!");
  1701. visibleButton4 = false;
  1702. tru++;
  1703. GUI.Label(new Rect((Screen.width + 110) - (Screen.width) / 3, (Screen.height + 200) / 2 + 130, 100, 20), tru.ToString());
  1704.  
  1705. }
  1706. else
  1707. {
  1708. errorShow = true;
  1709. Debug.Log("НЕ КРАСАВА И НЕ МОЛОДЕЦ!");
  1710. fal++;
  1711. GUI.Label(new Rect((Screen.width + 110) - (Screen.width) / 3, (Screen.height + 200) / 2 + 100, 100, 20), fal.ToString());
  1712. }
  1713.  
  1714. }
  1715. }
  1716.  
  1717. if ((!visibleButton4)&&(visibleButton))
  1718. {
  1719. GUI.Label(new Rect((Screen.width + 6) - (Screen.width) / 3, (Screen.height - 850) / 2 + 130, (Screen.width - 30) / 3, (Screen.height) / 27), "Выберите дефект");
  1720. }
  1721.  
  1722. if (visibleButtonch)
  1723. {
  1724.  
  1725. if (GUI.Button(new Rect((Screen.width + 6) - (Screen.width) / 3, (Screen.height - 450) / 2 + 130, (Screen.width - 30) / 3, (Screen.height) / 27), "5.Нарушение регулировки компрессора."))
  1726. {
  1727.  
  1728. if ((truOtvets2[k] == 5)&&(pr3==1))
  1729. {
  1730. k++;
  1731. Debug.Log("КРАСАВА, МОЛОДЕЦ!");
  1732. visibleButtonch = false;
  1733. visibleButton = false;
  1734. tru++;
  1735. GUI.Label(new Rect((Screen.width + 110) - (Screen.width) / 3, (Screen.height + 200) / 2 + 130, 100, 20), tru.ToString());
  1736.  
  1737. }
  1738. else
  1739. {
  1740. errorShow = true;
  1741. Debug.Log("НЕ КРАСАВА И НЕ МОЛОДЕЦ!");
  1742. fal++;
  1743. GUI.Label(new Rect((Screen.width + 110) - (Screen.width) / 3, (Screen.height + 200) / 2 + 100, 100, 20), fal.ToString());
  1744. }
  1745. }
  1746. if (GUI.Button(new Rect((Screen.width + 6) - (Screen.width) / 3, (Screen.height - 375) / 2 + 130, (Screen.width - 30) / 3, (Screen.height) / 27), "5aaaaaaaaaaaaaaaa."))
  1747. {
  1748. if ((truOtvets2[k] == 5) && (pr3 == 2))
  1749. {
  1750. k++;
  1751. Debug.Log("КРАСАВА, МОЛОДЕЦ!");
  1752. visibleButtonch = false;
  1753. visibleButton = false;
  1754. tru++;
  1755. GUI.Label(new Rect((Screen.width + 110) - (Screen.width) / 3, (Screen.height + 200) / 2 + 130, 100, 20), tru.ToString());
  1756.  
  1757. }
  1758. else
  1759. {
  1760. errorShow = true;
  1761. Debug.Log("НЕ КРАСАВА И НЕ МОЛОДЕЦ!");
  1762. fal++;
  1763. GUI.Label(new Rect((Screen.width + 110) - (Screen.width) / 3, (Screen.height + 200) / 2 + 100, 100, 20), fal.ToString());
  1764. }
  1765. }
  1766. if (GUI.Button(new Rect((Screen.width + 6) - (Screen.width) / 3, (Screen.height - 300) / 2 + 130, (Screen.width - 30) / 3, (Screen.height) / 27), "bbbbbbbbbbbbbbbbbb"))
  1767. {
  1768. if ((truOtvets2[k] == 5) && (pr3 == 3))
  1769. {
  1770. k++;
  1771. Debug.Log("КРАСАВА, МОЛОДЕЦ!");
  1772. visibleButtonch = false;
  1773. visibleButton = false;
  1774. tru++;
  1775. GUI.Label(new Rect((Screen.width + 110) - (Screen.width) / 3, (Screen.height + 200) / 2 + 130, 100, 20), tru.ToString());
  1776.  
  1777. }
  1778. else
  1779. {
  1780. errorShow = true;
  1781. Debug.Log("НЕ КРАСАВА И НЕ МОЛОДЕЦ!");
  1782. fal++;
  1783. GUI.Label(new Rect((Screen.width + 110) - (Screen.width) / 3, (Screen.height + 200) / 2 + 100, 100, 20), fal.ToString());
  1784. }
  1785. }
  1786. }
  1787.  
  1788.  
  1789.  
  1790.  
  1791. if (visibleButton6)
  1792. {
  1793. if (GUI.Button(new Rect((Screen.width + 6) - (Screen.width) / 3, (Screen.height - 225) / 2 + 130, (Screen.width - 30) / 3, (Screen.height) / 27), "6.Установка и запуск холодильника."))
  1794. {
  1795. if (truOtvets2[k] == 6)
  1796. {
  1797. k++;
  1798. Debug.Log("КРАСАВА, МОЛОДЕЦ!");
  1799. visibleButton6 = false;
  1800. tru++;
  1801. GUI.Label(new Rect((Screen.width + 110) - (Screen.width) / 3, (Screen.height + 200) / 2 + 130, 100, 20), tru.ToString());
  1802.  
  1803. }
  1804. else
  1805. {
  1806. errorShow = true;
  1807. Debug.Log("НЕ КРАСАВА И НЕ МОЛОДЕЦ!");
  1808. fal++;
  1809. GUI.Label(new Rect((Screen.width + 110) - (Screen.width) / 3, (Screen.height + 200) / 2 + 100, 100, 20), fal.ToString());
  1810. }
  1811. }
  1812. }
  1813. if (visibleButton7)
  1814. {
  1815. if (GUI.Button(new Rect((Screen.width + 6) - (Screen.width) / 3, (Screen.height - 150) / 2 + 130, (Screen.width - 30) / 3, (Screen.height) / 27), "7.Сборка в обратном порядке."))
  1816. {
  1817. if (truOtvets2[k] == 7)
  1818. {
  1819. k++;
  1820. Debug.Log("КРАСАВА, МОЛОДЕЦ!");
  1821. visibleButton7 = false;
  1822. tru++;
  1823. GUI.Label(new Rect((Screen.width + 110) - (Screen.width) / 3, (Screen.height + 200) / 2 + 130, 100, 20), tru.ToString());
  1824. }
  1825. else
  1826. {
  1827. errorShow = true;
  1828. Debug.Log("НЕ КРАСАВА И НЕ МОЛОДЕЦ!");
  1829. fal++;
  1830. GUI.Label(new Rect((Screen.width + 110) - (Screen.width) / 3, (Screen.height + 200) / 2 + 100, 100, 20), fal.ToString());
  1831. }
  1832. }
  1833. }
  1834. break;
  1835. }
  1836. case 2:
  1837. {
  1838. GUI.Label(new Rect((Screen.width + 6) - (Screen.width) / 3, (Screen.height + 200) / 2 + 130, 100, 20), "Правильные ответы:");
  1839. GUI.Label(new Rect((Screen.width + 110) - (Screen.width) / 3, (Screen.height + 200) / 2 + 130, 100, 20), tru.ToString());
  1840. GUI.Label(new Rect((Screen.width + 6) - (Screen.width) / 3, (Screen.height + 200) / 2 + 100, 100, 20), "Кол-во ошибок:");
  1841. GUI.Label(new Rect((Screen.width + 110) - (Screen.width) / 3, (Screen.height + 200) / 2 + 100, 100, 20), fal.ToString());
  1842. if (visibleButton1)
  1843. {
  1844. if (GUI.Button(new Rect((Screen.width + 6) - (Screen.width) / 3, (Screen.height - 150) / 2 + 130, (Screen.width - 30) / 3, (Screen.height) / 27), "1.Отключить холодильник от сети."))
  1845. {
  1846. if (truOtvets2[k] == 1)
  1847. {
  1848. k++;
  1849. Debug.Log("КРАСАВА, МОЛОДЕЦ!");
  1850. visibleButton1 = false;
  1851. tru++;
  1852. GUI.Label(new Rect((Screen.width + 110) - (Screen.width) / 3, (Screen.height + 200) / 2 + 130, 100, 20), tru.ToString());
  1853.  
  1854. }
  1855. else
  1856. {
  1857. fal++;
  1858. GUI.Label(new Rect((Screen.width + 110) - (Screen.width) / 3, (Screen.height + 200) / 2 + 100, 100, 20), fal.ToString());
  1859. errorShow = true;
  1860. Debug.Log("НЕ КРАСАВА И НЕ МОЛОДЕЦ!");
  1861. }
  1862. }
  1863. }
  1864.  
  1865. if (visibleButton2)
  1866. {
  1867. if (GUI.Button(new Rect((Screen.width + 6) - (Screen.width) / 3, (Screen.height - 600) / 2 + 130, (Screen.width - 30) / 3, (Screen.height) / 27), "2.Снять корпус холодильника. "))
  1868. {
  1869. if (truOtvets2[k] == 2)
  1870. {
  1871. k++;
  1872. Debug.Log("КРАСАВА, МОЛОДЕЦ!");
  1873. visibleButton2 = false;
  1874. tru++;
  1875. GUI.Label(new Rect((Screen.width + 110) - (Screen.width) / 3, (Screen.height + 200) / 2 + 130, 100, 20), tru.ToString());
  1876.  
  1877. }
  1878. else
  1879. {
  1880. errorShow = true;
  1881. Debug.Log("НЕ КРАСАВА И НЕ МОЛОДЕЦ!");
  1882. fal++;
  1883. GUI.Label(new Rect((Screen.width + 110) - (Screen.width) / 3, (Screen.height + 200) / 2 + 100, 100, 20), fal.ToString());
  1884. }
  1885. }
  1886. }
  1887. if (visibleButton3)
  1888. {
  1889. if (GUI.Button(new Rect((Screen.width + 6) - (Screen.width) / 3, (Screen.height - 450) / 2 + 130, (Screen.width - 30) / 3, (Screen.height) / 27), "3.Осмотреть на дефекты. "))
  1890. {
  1891. if (truOtvets2[k] == 3)
  1892. {
  1893. k++;
  1894. Debug.Log("КРАСАВА, МОЛОДЕЦ!");
  1895. visibleButton3 = false;
  1896. tru++;
  1897. GUI.Label(new Rect((Screen.width + 110) - (Screen.width) / 3, (Screen.height + 200) / 2 + 130, 100, 20), tru.ToString());
  1898.  
  1899. }
  1900. else
  1901. {
  1902. errorShow = true;
  1903. Debug.Log("НЕ КРАСАВА И НЕ МОЛОДЕЦ!");
  1904. fal++;
  1905. GUI.Label(new Rect((Screen.width + 110) - (Screen.width) / 3, (Screen.height + 200) / 2 + 100, 100, 20), fal.ToString());
  1906. }
  1907.  
  1908. }
  1909. }
  1910. if (visibleButton4)
  1911. {
  1912. if (GUI.Button(new Rect((Screen.width + 6) - (Screen.width) / 3, (Screen.height - 225) / 2 + 130, (Screen.width - 30) / 3, (Screen.height) / 27), "4.Заменить детали."))
  1913. {
  1914. if (truOtvets2[k] == 4)
  1915. {
  1916. k++;
  1917. Debug.Log("КРАСАВА, МОЛОДЕЦ!");
  1918. visibleButton4 = false;
  1919. tru++;
  1920. GUI.Label(new Rect((Screen.width + 110) - (Screen.width) / 3, (Screen.height + 200) / 2 + 130, 100, 20), tru.ToString());
  1921.  
  1922. }
  1923. else
  1924. {
  1925. errorShow = true;
  1926. Debug.Log("НЕ КРАСАВА И НЕ МОЛОДЕЦ!");
  1927. fal++;
  1928. GUI.Label(new Rect((Screen.width + 110) - (Screen.width) / 3, (Screen.height + 200) / 2 + 100, 100, 20), fal.ToString());
  1929. }
  1930.  
  1931. }
  1932. }
  1933.  
  1934. if ((!visibleButton4) && (visibleButton))
  1935. {
  1936. GUI.Label(new Rect((Screen.width + 6) - (Screen.width) / 3, (Screen.height - 850) / 2 + 130, (Screen.width - 30) / 3, (Screen.height) / 27), "Выберите дефект");
  1937. }
  1938.  
  1939. if (visibleButtonch)
  1940. {
  1941.  
  1942. if (GUI.Button(new Rect((Screen.width + 6) - (Screen.width) / 3, (Screen.height - 300) / 2 + 130, (Screen.width - 30) / 3, (Screen.height) / 27), "5.Нарушение регулировки компрессора."))
  1943. {
  1944.  
  1945. if ((truOtvets2[k] == 5) && (pr3 == 1))
  1946. {
  1947. k++;
  1948. Debug.Log("КРАСАВА, МОЛОДЕЦ!");
  1949. visibleButtonch = false;
  1950. visibleButton = false;
  1951. tru++;
  1952. GUI.Label(new Rect((Screen.width + 110) - (Screen.width) / 3, (Screen.height + 200) / 2 + 130, 100, 20), tru.ToString());
  1953.  
  1954. }
  1955. else
  1956. {
  1957. errorShow = true;
  1958. Debug.Log("НЕ КРАСАВА И НЕ МОЛОДЕЦ!");
  1959. fal++;
  1960. GUI.Label(new Rect((Screen.width + 110) - (Screen.width) / 3, (Screen.height + 200) / 2 + 100, 100, 20), fal.ToString());
  1961. }
  1962. }
  1963. if (GUI.Button(new Rect((Screen.width + 6) - (Screen.width) / 3, (Screen.height - 675) / 2 + 130, (Screen.width - 30) / 3, (Screen.height) / 27), "5aaaaaaaaaaaaaaaa."))
  1964. {
  1965. if ((truOtvets2[k] == 5) && (pr3 == 2))
  1966. {
  1967. k++;
  1968. Debug.Log("КРАСАВА, МОЛОДЕЦ!");
  1969. visibleButtonch = false;
  1970. visibleButton = false;
  1971. tru++;
  1972. GUI.Label(new Rect((Screen.width + 110) - (Screen.width) / 3, (Screen.height + 200) / 2 + 130, 100, 20), tru.ToString());
  1973.  
  1974. }
  1975. else
  1976. {
  1977. errorShow = true;
  1978. Debug.Log("НЕ КРАСАВА И НЕ МОЛОДЕЦ!");
  1979. fal++;
  1980. GUI.Label(new Rect((Screen.width + 110) - (Screen.width) / 3, (Screen.height + 200) / 2 + 100, 100, 20), fal.ToString());
  1981. }
  1982. }
  1983. if (GUI.Button(new Rect((Screen.width + 6) - (Screen.width) / 3, (Screen.height - 750) / 2 + 130, (Screen.width - 30) / 3, (Screen.height) / 27), "bbbbbbbbbbbbbbbbbb"))
  1984. {
  1985. if ((truOtvets2[k] == 5) && (pr3 == 3))
  1986. {
  1987. k++;
  1988. Debug.Log("КРАСАВА, МОЛОДЕЦ!");
  1989. visibleButtonch = false;
  1990. visibleButton = false;
  1991. tru++;
  1992. GUI.Label(new Rect((Screen.width + 110) - (Screen.width) / 3, (Screen.height + 200) / 2 + 130, 100, 20), tru.ToString());
  1993.  
  1994. }
  1995. else
  1996. {
  1997. errorShow = true;
  1998. Debug.Log("НЕ КРАСАВА И НЕ МОЛОДЕЦ!");
  1999. fal++;
  2000. GUI.Label(new Rect((Screen.width + 110) - (Screen.width) / 3, (Screen.height + 200) / 2 + 100, 100, 20), fal.ToString());
  2001. }
  2002. }
  2003. }
  2004.  
  2005.  
  2006.  
  2007.  
  2008. if (visibleButton6)
  2009. {
  2010. if (GUI.Button(new Rect((Screen.width + 6) - (Screen.width) / 3, (Screen.height - 525) / 2 + 130, (Screen.width - 30) / 3, (Screen.height) / 27), "6.Установка и запуск холодильника."))
  2011. {
  2012. if (truOtvets2[k] == 6)
  2013. {
  2014. k++;
  2015. Debug.Log("КРАСАВА, МОЛОДЕЦ!");
  2016. visibleButton6 = false;
  2017. tru++;
  2018. GUI.Label(new Rect((Screen.width + 110) - (Screen.width) / 3, (Screen.height + 200) / 2 + 130, 100, 20), tru.ToString());
  2019.  
  2020. }
  2021. else
  2022. {
  2023. errorShow = true;
  2024. Debug.Log("НЕ КРАСАВА И НЕ МОЛОДЕЦ!");
  2025. fal++;
  2026. GUI.Label(new Rect((Screen.width + 110) - (Screen.width) / 3, (Screen.height + 200) / 2 + 100, 100, 20), fal.ToString());
  2027. }
  2028. }
  2029. }
  2030. if (visibleButton7)
  2031. {
  2032. if (GUI.Button(new Rect((Screen.width + 6) - (Screen.width) / 3, (Screen.height - 375) / 2 + 130, (Screen.width - 30) / 3, (Screen.height) / 27), "7.Сборка в обратном порядке."))
  2033. {
  2034. if (truOtvets2[k] == 7)
  2035. {
  2036. k++;
  2037. Debug.Log("КРАСАВА, МОЛОДЕЦ!");
  2038. visibleButton7 = false;
  2039. tru++;
  2040. GUI.Label(new Rect((Screen.width + 110) - (Screen.width) / 3, (Screen.height + 200) / 2 + 130, 100, 20), tru.ToString());
  2041. }
  2042. else
  2043. {
  2044. errorShow = true;
  2045. Debug.Log("НЕ КРАСАВА И НЕ МОЛОДЕЦ!");
  2046. fal++;
  2047. GUI.Label(new Rect((Screen.width + 110) - (Screen.width) / 3, (Screen.height + 200) / 2 + 100, 100, 20), fal.ToString());
  2048. }
  2049. }
  2050. }
  2051. break;
  2052. }
  2053. case 3:
  2054. {
  2055. GUI.Label(new Rect((Screen.width + 6) - (Screen.width) / 3, (Screen.height + 200) / 2 + 130, 100, 20), "Правильные ответы:");
  2056. GUI.Label(new Rect((Screen.width + 110) - (Screen.width) / 3, (Screen.height + 200) / 2 + 130, 100, 20), tru.ToString());
  2057. GUI.Label(new Rect((Screen.width + 6) - (Screen.width) / 3, (Screen.height + 200) / 2 + 100, 100, 20), "Кол-во ошибок:");
  2058. GUI.Label(new Rect((Screen.width + 110) - (Screen.width) / 3, (Screen.height + 200) / 2 + 100, 100, 20), fal.ToString());
  2059. if (visibleButton1)
  2060. {
  2061. if (GUI.Button(new Rect((Screen.width + 6) - (Screen.width) / 3, (Screen.height - 375) / 2 + 130, (Screen.width - 30) / 3, (Screen.height) / 27), "1.Отключить холодильник от сети."))
  2062. {
  2063. if (truOtvets2[k] == 1)
  2064. {
  2065. k++;
  2066. Debug.Log("КРАСАВА, МОЛОДЕЦ!");
  2067. visibleButton1 = false;
  2068. tru++;
  2069. GUI.Label(new Rect((Screen.width + 110) - (Screen.width) / 3, (Screen.height + 200) / 2 + 130, 100, 20), tru.ToString());
  2070.  
  2071. }
  2072. else
  2073. {
  2074. fal++;
  2075. GUI.Label(new Rect((Screen.width + 110) - (Screen.width) / 3, (Screen.height + 200) / 2 + 100, 100, 20), fal.ToString());
  2076. errorShow = true;
  2077. Debug.Log("НЕ КРАСАВА И НЕ МОЛОДЕЦ!");
  2078. }
  2079. }
  2080. }
  2081.  
  2082. if (visibleButton2)
  2083. {
  2084. if (GUI.Button(new Rect((Screen.width + 6) - (Screen.width) / 3, (Screen.height - 675) / 2 + 130, (Screen.width - 30) / 3, (Screen.height) / 27), "2.Снять корпус холодильника. "))
  2085. {
  2086. if (truOtvets2[k] == 2)
  2087. {
  2088. k++;
  2089. Debug.Log("КРАСАВА, МОЛОДЕЦ!");
  2090. visibleButton2 = false;
  2091. tru++;
  2092. GUI.Label(new Rect((Screen.width + 110) - (Screen.width) / 3, (Screen.height + 200) / 2 + 130, 100, 20), tru.ToString());
  2093.  
  2094. }
  2095. else
  2096. {
  2097. errorShow = true;
  2098. Debug.Log("НЕ КРАСАВА И НЕ МОЛОДЕЦ!");
  2099. fal++;
  2100. GUI.Label(new Rect((Screen.width + 110) - (Screen.width) / 3, (Screen.height + 200) / 2 + 100, 100, 20), fal.ToString());
  2101. }
  2102. }
  2103. }
  2104. if (visibleButton3)
  2105. {
  2106. if (GUI.Button(new Rect((Screen.width + 6) - (Screen.width) / 3, (Screen.height -225) / 2 + 130, (Screen.width - 30) / 3, (Screen.height) / 27), "3.Осмотреть на дефекты. "))
  2107. {
  2108. if (truOtvets2[k] == 3)
  2109. {
  2110. k++;
  2111. Debug.Log("КРАСАВА, МОЛОДЕЦ!");
  2112. visibleButton3 = false;
  2113. tru++;
  2114. GUI.Label(new Rect((Screen.width + 110) - (Screen.width) / 3, (Screen.height + 200) / 2 + 130, 100, 20), tru.ToString());
  2115.  
  2116. }
  2117. else
  2118. {
  2119. errorShow = true;
  2120. Debug.Log("НЕ КРАСАВА И НЕ МОЛОДЕЦ!");
  2121. fal++;
  2122. GUI.Label(new Rect((Screen.width + 110) - (Screen.width) / 3, (Screen.height + 200) / 2 + 100, 100, 20), fal.ToString());
  2123. }
  2124.  
  2125. }
  2126. }
  2127. if (visibleButton4)
  2128. {
  2129. if (GUI.Button(new Rect((Screen.width + 6) - (Screen.width) / 3, (Screen.height - 300) / 2 + 130, (Screen.width - 30) / 3, (Screen.height) / 27), "4.Заменить детали."))
  2130. {
  2131. if (truOtvets2[k] == 4)
  2132. {
  2133. k++;
  2134. Debug.Log("КРАСАВА, МОЛОДЕЦ!");
  2135. visibleButton4 = false;
  2136. tru++;
  2137. GUI.Label(new Rect((Screen.width + 110) - (Screen.width) / 3, (Screen.height + 200) / 2 + 130, 100, 20), tru.ToString());
  2138.  
  2139. }
  2140. else
  2141. {
  2142. errorShow = true;
  2143. Debug.Log("НЕ КРАСАВА И НЕ МОЛОДЕЦ!");
  2144. fal++;
  2145. GUI.Label(new Rect((Screen.width + 110) - (Screen.width) / 3, (Screen.height + 200) / 2 + 100, 100, 20), fal.ToString());
  2146. }
  2147.  
  2148. }
  2149. }
  2150.  
  2151. if ((!visibleButton4) && (visibleButton))
  2152. {
  2153. GUI.Label(new Rect((Screen.width + 6) - (Screen.width) / 3, (Screen.height - 850) / 2 + 130, (Screen.width - 30) / 3, (Screen.height) / 27), "Выберите дефект");
  2154. }
  2155.  
  2156. if (visibleButtonch)
  2157. {
  2158.  
  2159. if (GUI.Button(new Rect((Screen.width + 6) - (Screen.width) / 3, (Screen.height - 600) / 2 + 130, (Screen.width - 30) / 3, (Screen.height) / 27), "5.Нарушение регулировки компрессора."))
  2160. {
  2161.  
  2162. if ((truOtvets2[k] == 5) && (pr3 == 1))
  2163. {
  2164. k++;
  2165. Debug.Log("КРАСАВА, МОЛОДЕЦ!");
  2166. visibleButtonch = false;
  2167. visibleButton = false;
  2168. tru++;
  2169. GUI.Label(new Rect((Screen.width + 110) - (Screen.width) / 3, (Screen.height + 200) / 2 + 130, 100, 20), tru.ToString());
  2170.  
  2171. }
  2172. else
  2173. {
  2174. errorShow = true;
  2175. Debug.Log("НЕ КРАСАВА И НЕ МОЛОДЕЦ!");
  2176. fal++;
  2177. GUI.Label(new Rect((Screen.width + 110) - (Screen.width) / 3, (Screen.height + 200) / 2 + 100, 100, 20), fal.ToString());
  2178. }
  2179. }
  2180. if (GUI.Button(new Rect((Screen.width + 6) - (Screen.width) / 3, (Screen.height - 750) / 2 + 130, (Screen.width - 30) / 3, (Screen.height) / 27), "5aaaaaaaaaaaaaaaa."))
  2181. {
  2182. if ((truOtvets2[k] == 5) && (pr3 == 2))
  2183. {
  2184. k++;
  2185. Debug.Log("КРАСАВА, МОЛОДЕЦ!");
  2186. visibleButtonch = false;
  2187. visibleButton = false;
  2188. tru++;
  2189. GUI.Label(new Rect((Screen.width + 110) - (Screen.width) / 3, (Screen.height + 200) / 2 + 130, 100, 20), tru.ToString());
  2190.  
  2191. }
  2192. else
  2193. {
  2194. errorShow = true;
  2195. Debug.Log("НЕ КРАСАВА И НЕ МОЛОДЕЦ!");
  2196. fal++;
  2197. GUI.Label(new Rect((Screen.width + 110) - (Screen.width) / 3, (Screen.height + 200) / 2 + 100, 100, 20), fal.ToString());
  2198. }
  2199. }
  2200. if (GUI.Button(new Rect((Screen.width + 6) - (Screen.width) / 3, (Screen.height - 450) / 2 + 130, (Screen.width - 30) / 3, (Screen.height) / 27), "bbbbbbbbbbbbbbbbbb"))
  2201. {
  2202. if ((truOtvets2[k] == 5) && (pr3 == 3))
  2203. {
  2204. k++;
  2205. Debug.Log("КРАСАВА, МОЛОДЕЦ!");
  2206. visibleButtonch = false;
  2207. visibleButton = false;
  2208. tru++;
  2209. GUI.Label(new Rect((Screen.width + 110) - (Screen.width) / 3, (Screen.height + 200) / 2 + 130, 100, 20), tru.ToString());
  2210.  
  2211. }
  2212. else
  2213. {
  2214. errorShow = true;
  2215. Debug.Log("НЕ КРАСАВА И НЕ МОЛОДЕЦ!");
  2216. fal++;
  2217. GUI.Label(new Rect((Screen.width + 110) - (Screen.width) / 3, (Screen.height + 200) / 2 + 100, 100, 20), fal.ToString());
  2218. }
  2219. }
  2220. }
  2221.  
  2222.  
  2223.  
  2224.  
  2225. if (visibleButton6)
  2226. {
  2227. if (GUI.Button(new Rect((Screen.width + 6) - (Screen.width) / 3, (Screen.height - 525) / 2 + 130, (Screen.width - 30) / 3, (Screen.height) / 27), "6.Установка и запуск холодильника."))
  2228. {
  2229. if (truOtvets2[k] == 6)
  2230. {
  2231. k++;
  2232. Debug.Log("КРАСАВА, МОЛОДЕЦ!");
  2233. visibleButton6 = false;
  2234. tru++;
  2235. GUI.Label(new Rect((Screen.width + 110) - (Screen.width) / 3, (Screen.height + 200) / 2 + 130, 100, 20), tru.ToString());
  2236.  
  2237. }
  2238. else
  2239. {
  2240. errorShow = true;
  2241. Debug.Log("НЕ КРАСАВА И НЕ МОЛОДЕЦ!");
  2242. fal++;
  2243. GUI.Label(new Rect((Screen.width + 110) - (Screen.width) / 3, (Screen.height + 200) / 2 + 100, 100, 20), fal.ToString());
  2244. }
  2245. }
  2246. }
  2247. if (visibleButton7)
  2248. {
  2249. if (GUI.Button(new Rect((Screen.width + 6) - (Screen.width) / 3, (Screen.height - 150) / 2 + 130, (Screen.width - 30) / 3, (Screen.height) / 27), "7.Сборка в обратном порядке."))
  2250. {
  2251. if (truOtvets2[k] == 7)
  2252. {
  2253. k++;
  2254. Debug.Log("КРАСАВА, МОЛОДЕЦ!");
  2255. visibleButton7 = false;
  2256. tru++;
  2257. GUI.Label(new Rect((Screen.width + 110) - (Screen.width) / 3, (Screen.height + 200) / 2 + 130, 100, 20), tru.ToString());
  2258. }
  2259. else
  2260. {
  2261. errorShow = true;
  2262. Debug.Log("НЕ КРАСАВА И НЕ МОЛОДЕЦ!");
  2263. fal++;
  2264. GUI.Label(new Rect((Screen.width + 110) - (Screen.width) / 3, (Screen.height + 200) / 2 + 100, 100, 20), fal.ToString());
  2265. }
  2266. }
  2267. }
  2268. break;
  2269. }
  2270. case 4:
  2271. {
  2272. GUI.Label(new Rect((Screen.width + 6) - (Screen.width) / 3, (Screen.height + 200) / 2 + 130, 100, 20), "Правильные ответы:");
  2273. GUI.Label(new Rect((Screen.width + 110) - (Screen.width) / 3, (Screen.height + 200) / 2 + 130, 100, 20), tru.ToString());
  2274. GUI.Label(new Rect((Screen.width + 6) - (Screen.width) / 3, (Screen.height + 200) / 2 + 100, 100, 20), "Кол-во ошибок:");
  2275. GUI.Label(new Rect((Screen.width + 110) - (Screen.width) / 3, (Screen.height + 200) / 2 + 100, 100, 20), fal.ToString());
  2276. if (visibleButton1)
  2277. {
  2278. if (GUI.Button(new Rect((Screen.width + 6) - (Screen.width) / 3, (Screen.height - 300) / 2 + 130, (Screen.width - 30) / 3, (Screen.height) / 27), "1.Отключить холодильник от сети."))
  2279. {
  2280. if (truOtvets2[k] == 1)
  2281. {
  2282. k++;
  2283. Debug.Log("КРАСАВА, МОЛОДЕЦ!");
  2284. visibleButton1 = false;
  2285. tru++;
  2286. GUI.Label(new Rect((Screen.width + 110) - (Screen.width) / 3, (Screen.height + 200) / 2 + 130, 100, 20), tru.ToString());
  2287.  
  2288. }
  2289. else
  2290. {
  2291. fal++;
  2292. GUI.Label(new Rect((Screen.width + 110) - (Screen.width) / 3, (Screen.height + 200) / 2 + 100, 100, 20), fal.ToString());
  2293. errorShow = true;
  2294. Debug.Log("НЕ КРАСАВА И НЕ МОЛОДЕЦ!");
  2295. }
  2296. }
  2297. }
  2298.  
  2299. if (visibleButton2)
  2300. {
  2301. if (GUI.Button(new Rect((Screen.width + 6) - (Screen.width) / 3, (Screen.height - 150) / 2 + 130, (Screen.width - 30) / 3, (Screen.height) / 27), "2.Снять корпус холодильника. "))
  2302. {
  2303. if (truOtvets2[k] == 2)
  2304. {
  2305. k++;
  2306. Debug.Log("КРАСАВА, МОЛОДЕЦ!");
  2307. visibleButton2 = false;
  2308. tru++;
  2309. GUI.Label(new Rect((Screen.width + 110) - (Screen.width) / 3, (Screen.height + 200) / 2 + 130, 100, 20), tru.ToString());
  2310.  
  2311. }
  2312. else
  2313. {
  2314. errorShow = true;
  2315. Debug.Log("НЕ КРАСАВА И НЕ МОЛОДЕЦ!");
  2316. fal++;
  2317. GUI.Label(new Rect((Screen.width + 110) - (Screen.width) / 3, (Screen.height + 200) / 2 + 100, 100, 20), fal.ToString());
  2318. }
  2319. }
  2320. }
  2321. if (visibleButton3)
  2322. {
  2323. if (GUI.Button(new Rect((Screen.width + 6) - (Screen.width) / 3, (Screen.height - 750) / 2 + 130, (Screen.width - 30) / 3, (Screen.height) / 27), "3.Осмотреть на дефекты. "))
  2324. {
  2325. if (truOtvets2[k] == 3)
  2326. {
  2327. k++;
  2328. Debug.Log("КРАСАВА, МОЛОДЕЦ!");
  2329. visibleButton3 = false;
  2330. tru++;
  2331. GUI.Label(new Rect((Screen.width + 110) - (Screen.width) / 3, (Screen.height + 200) / 2 + 130, 100, 20), tru.ToString());
  2332.  
  2333. }
  2334. else
  2335. {
  2336. errorShow = true;
  2337. Debug.Log("НЕ КРАСАВА И НЕ МОЛОДЕЦ!");
  2338. fal++;
  2339. GUI.Label(new Rect((Screen.width + 110) - (Screen.width) / 3, (Screen.height + 200) / 2 + 100, 100, 20), fal.ToString());
  2340. }
  2341.  
  2342. }
  2343. }
  2344. if (visibleButton4)
  2345. {
  2346. if (GUI.Button(new Rect((Screen.width + 6) - (Screen.width) / 3, (Screen.height - 600) / 2 + 130, (Screen.width - 30) / 3, (Screen.height) / 27), "4.Заменить детали."))
  2347. {
  2348. if (truOtvets2[k] == 4)
  2349. {
  2350. k++;
  2351. Debug.Log("КРАСАВА, МОЛОДЕЦ!");
  2352. visibleButton4 = false;
  2353. tru++;
  2354. GUI.Label(new Rect((Screen.width + 110) - (Screen.width) / 3, (Screen.height + 200) / 2 + 130, 100, 20), tru.ToString());
  2355.  
  2356. }
  2357. else
  2358. {
  2359. errorShow = true;
  2360. Debug.Log("НЕ КРАСАВА И НЕ МОЛОДЕЦ!");
  2361. fal++;
  2362. GUI.Label(new Rect((Screen.width + 110) - (Screen.width) / 3, (Screen.height + 200) / 2 + 100, 100, 20), fal.ToString());
  2363. }
  2364.  
  2365. }
  2366. }
  2367.  
  2368. if ((!visibleButton4) && (visibleButton))
  2369. {
  2370. GUI.Label(new Rect((Screen.width + 6) - (Screen.width) / 3, (Screen.height - 850) / 2 + 130, (Screen.width - 30) / 3, (Screen.height) / 27), "Выберите дефект");
  2371. }
  2372.  
  2373. if (visibleButtonch)
  2374. {
  2375.  
  2376. if (GUI.Button(new Rect((Screen.width + 6) - (Screen.width) / 3, (Screen.height - 375) / 2 + 130, (Screen.width - 30) / 3, (Screen.height) / 27), "5.Нарушение регулировки компрессора."))
  2377. {
  2378.  
  2379. if ((truOtvets2[k] == 5) && (pr3 == 1))
  2380. {
  2381. k++;
  2382. Debug.Log("КРАСАВА, МОЛОДЕЦ!");
  2383. visibleButtonch = false;
  2384. visibleButton = false;
  2385. tru++;
  2386. GUI.Label(new Rect((Screen.width + 110) - (Screen.width) / 3, (Screen.height + 200) / 2 + 130, 100, 20), tru.ToString());
  2387.  
  2388. }
  2389. else
  2390. {
  2391. errorShow = true;
  2392. Debug.Log("НЕ КРАСАВА И НЕ МОЛОДЕЦ!");
  2393. fal++;
  2394. GUI.Label(new Rect((Screen.width + 110) - (Screen.width) / 3, (Screen.height + 200) / 2 + 100, 100, 20), fal.ToString());
  2395. }
  2396. }
  2397. if (GUI.Button(new Rect((Screen.width + 6) - (Screen.width) / 3, (Screen.height - 675) / 2 + 130, (Screen.width - 30) / 3, (Screen.height) / 27), "5aaaaaaaaaaaaaaaa."))
  2398. {
  2399. if ((truOtvets2[k] == 5) && (pr3 == 2))
  2400. {
  2401. k++;
  2402. Debug.Log("КРАСАВА, МОЛОДЕЦ!");
  2403. visibleButtonch = false;
  2404. visibleButton = false;
  2405. tru++;
  2406. GUI.Label(new Rect((Screen.width + 110) - (Screen.width) / 3, (Screen.height + 200) / 2 + 130, 100, 20), tru.ToString());
  2407.  
  2408. }
  2409. else
  2410. {
  2411. errorShow = true;
  2412. Debug.Log("НЕ КРАСАВА И НЕ МОЛОДЕЦ!");
  2413. fal++;
  2414. GUI.Label(new Rect((Screen.width + 110) - (Screen.width) / 3, (Screen.height + 200) / 2 + 100, 100, 20), fal.ToString());
  2415. }
  2416. }
  2417. if (GUI.Button(new Rect((Screen.width + 6) - (Screen.width) / 3, (Screen.height - 525) / 2 + 130, (Screen.width - 30) / 3, (Screen.height) / 27), "bbbbbbbbbbbbbbbbbb"))
  2418. {
  2419. if ((truOtvets2[k] == 5) && (pr3 == 3))
  2420. {
  2421. k++;
  2422. Debug.Log("КРАСАВА, МОЛОДЕЦ!");
  2423. visibleButtonch = false;
  2424. visibleButton = false;
  2425. tru++;
  2426. GUI.Label(new Rect((Screen.width + 110) - (Screen.width) / 3, (Screen.height + 200) / 2 + 130, 100, 20), tru.ToString());
  2427.  
  2428. }
  2429. else
  2430. {
  2431. errorShow = true;
  2432. Debug.Log("НЕ КРАСАВА И НЕ МОЛОДЕЦ!");
  2433. fal++;
  2434. GUI.Label(new Rect((Screen.width + 110) - (Screen.width) / 3, (Screen.height + 200) / 2 + 100, 100, 20), fal.ToString());
  2435. }
  2436. }
  2437. }
  2438.  
  2439.  
  2440.  
  2441.  
  2442. if (visibleButton6)
  2443. {
  2444. if (GUI.Button(new Rect((Screen.width + 6) - (Screen.width) / 3, (Screen.height - 450) / 2 + 130, (Screen.width - 30) / 3, (Screen.height) / 27), "6.Установка и запуск холодильника."))
  2445. {
  2446. if (truOtvets2[k] == 6)
  2447. {
  2448. k++;
  2449. Debug.Log("КРАСАВА, МОЛОДЕЦ!");
  2450. visibleButton6 = false;
  2451. tru++;
  2452. GUI.Label(new Rect((Screen.width + 110) - (Screen.width) / 3, (Screen.height + 200) / 2 + 130, 100, 20), tru.ToString());
  2453.  
  2454. }
  2455. else
  2456. {
  2457. errorShow = true;
  2458. Debug.Log("НЕ КРАСАВА И НЕ МОЛОДЕЦ!");
  2459. fal++;
  2460. GUI.Label(new Rect((Screen.width + 110) - (Screen.width) / 3, (Screen.height + 200) / 2 + 100, 100, 20), fal.ToString());
  2461. }
  2462. }
  2463. }
  2464. if (visibleButton7)
  2465. {
  2466. if (GUI.Button(new Rect((Screen.width + 6) - (Screen.width) / 3, (Screen.height - 225) / 2 + 130, (Screen.width - 30) / 3, (Screen.height) / 27), "7.Сборка в обратном порядке."))
  2467. {
  2468. if (truOtvets2[k] == 7)
  2469. {
  2470. k++;
  2471. Debug.Log("КРАСАВА, МОЛОДЕЦ!");
  2472. visibleButton7 = false;
  2473. tru++;
  2474. GUI.Label(new Rect((Screen.width + 110) - (Screen.width) / 3, (Screen.height + 200) / 2 + 130, 100, 20), tru.ToString());
  2475. }
  2476. else
  2477. {
  2478. errorShow = true;
  2479. Debug.Log("НЕ КРАСАВА И НЕ МОЛОДЕЦ!");
  2480. fal++;
  2481. GUI.Label(new Rect((Screen.width + 110) - (Screen.width) / 3, (Screen.height + 200) / 2 + 100, 100, 20), fal.ToString());
  2482. }
  2483. }
  2484. }
  2485. break;
  2486. }
  2487. }
  2488.  
  2489. }
  2490.  
  2491. void Update()
  2492. {
  2493. if (errorShow)
  2494. if (mSec <= 0)
  2495. {
  2496. errorShow = false;
  2497. mSec = 1;
  2498. }
  2499. else
  2500. mSec -= Time.deltaTime * 2;
  2501.  
  2502.  
  2503. }
  2504. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement