private void SetupTemplate() { if (figure) { figure.gameObject.SetActive(false); } var rand = UnityEngine.Random.Range(0, templates.Length); figure = templates[rand]; figure.gameObject.SetActive(true); figure.SetupRandomFigure(); }
/// <summary> /// Настройка фигуры из шаблона /// </summary> private void SetupTemplate() { if (figure != null) { figure.gameObject.SetActive(false); } var rand = 0; figure = templates[rand]; figure.gameObject.SetActive(true); figure.SetupRandomFigure(); }