Advertisement
kadyr

Untitled

Sep 5th, 2021
140
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.80 KB | None | 0 0
  1. using System.Collections;
  2. using System.Collections.Generic;
  3. using UnityEngine;
  4.  
  5. public class Switch : MonoBehaviour
  6. {
  7. public GameObject riffle;
  8. public GameObject shotgun;
  9. public GameObject pistol;
  10.  
  11. int level = 1;
  12.  
  13. void Start()
  14. {
  15. switch (level)
  16. {
  17. case 1:
  18. ChooseWeapon("Пистолет");
  19. break;
  20. case 2:
  21. ChooseWeapon("Дробовик");
  22. break;
  23. case 3:
  24. ChooseWeapon("Автомат");
  25. break;
  26. default:
  27. print("Для этого уровня не подготовлено оружие");
  28. break;
  29. }
  30. }
  31.  
  32. private void ChooseWeapon(string weaponName) { }
  33. }
  34.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement