/
crypt
/
SnowBallRefactoring
Обзор
Документация
Войти
/
crypt
/
SnowBallRefactoring
Код
Запросы
0
Задачи
Вики
Пакеты
0
Релизы
0
CI/CD
Аналитика
Безопасность
master
Assets/Scripts/helper_level_pick.cs
42 строки
803 B
crypt
Мой первый проект. Старт рефакторинга.
21 июл 2026, 18:23
21 июл 2026, 18:23
bef234c
Код
Авторство
О чём код?
using UnityEngine; using UnityEngine.UI; using System.Collections; public class helper_level_pick : MonoBehaviour { float scoreTo; Text txt; void Start() { txt = GetComponent<Text>(); if (Screen.width == 1080) txt.resizeTextMaxSize = 80; if (Screen.width == 720) txt.resizeTextMaxSize = 50; if (Screen.width < 720) txt.resizeTextMaxSize = 25; scoreTo = gamtest.score; scoreTo = Mathf.Round(scoreTo); if (scoreTo < 0) scoreTo = 0; txt.text = scoreTo.ToString(); } void Update() { scoreTo = gamtest.score; scoreTo = Mathf.Round(scoreTo); if (scoreTo < 0) scoreTo = 0; txt.text =scoreTo.ToString(); } }