/
crypt
/
SnowBallRefactoring
Обзор
Документация
Войти
/
crypt
/
SnowBallRefactoring
Код
Запросы
0
Задачи
Вики
Пакеты
0
Релизы
0
CI/CD
Аналитика
Безопасность
master
Assets/Scripts/clouds.cs
52 строки
975 B
crypt
Мой первый проект. Старт рефакторинга.
21 июл 2026, 18:23
21 июл 2026, 18:23
bef234c
Код
Авторство
О чём код?
using UnityEngine; using System.Collections; public class clouds : MonoBehaviour { public GameObject Cloud; public GameObject Cloud2; public GameObject Cloud3; public GameObject Cloud4; public GameObject Cloud5; float s1=4.8f, s2=6f, s3=7f, s4=6f, s5=5.5f; void Update() { s1 -= 0.005f; s2 -= 0.006f; s3 -= 0.008f; s4 -= 0.004f; s5 -= 0.009f; Cloud.transform.position = new Vector3(s1,0,43f); Cloud2.transform.position = new Vector3(s2,-1.6f,43f); Cloud3.transform.position = new Vector3(s3,-0.7f,43f); Cloud4.transform.position = new Vector3(s4,0.5f,43f); Cloud5.transform.position = new Vector3(s5,1.4f,43f); if (s1 < -4f) s1 = 4.8f; if (s2 < -4f) s2 = 6f; if (s3 < -4f) s3 = 7f; if (s4 < -5) s4 = 6f; if (s5 < -5) s5 = 5.5f; } }