Advertisement
kadyr

Untitled

Sep 24th, 2021
150
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.79 KB | None | 0 0
  1. using System.Collections;
  2. using System.Collections.Generic;
  3. using UnityEngine;
  4.  
  5. public class LevelController : MonoBehaviour
  6. {
  7. [SerializeField] List<GameObject> plates = new List<GameObject>();
  8. //Список плит
  9. void Start()
  10. {
  11. plates[Random.Range(0, 3)].GetComponent<Collider>().enabled = false;
  12. plates[Random.Range(3, 6)].GetComponent<Collider>().enabled = false;
  13. plates[Random.Range(6, 9)].GetComponent<Collider>().enabled = false;
  14.  
  15. //выключить случайно плиту с индексом от 0 до 2
  16. //ЗДЕСЬ нужно дописать выключение плит второго и третьего ряда.
  17. }
  18.  
  19. // Update is called once per frame
  20. void Update()
  21. {
  22.  
  23. }
  24. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement