/
crypt
/
SnowBallRefactoring
Обзор
Документация
Войти
/
crypt
/
SnowBallRefactoring
Код
Запросы
0
Задачи
Вики
Пакеты
0
Релизы
0
CI/CD
Аналитика
Безопасность
master
Assets/Scripts/Main_menu_cntrl.cs
121 строка
2 KB
crypt
Мой первый проект. Старт рефакторинга.
21 июл 2026, 18:23
21 июл 2026, 18:23
bef234c
Код
Авторство
О чём код?
using UnityEngine; using UnityEngine.UI; using System.Collections; using UnityEngine.SceneManagement; using GoogleMobileAds.Api; public class Main_menu_cntrl : MonoBehaviour { public GameObject Exit; public GameObject btn; public GameObject flash; public GameObject panelSettings; public GameObject blur; private const string bannerBottom = "ca-app-pub-3830178761147139/9552112009"; int g = 0; float timer_main=0f; void Start() { Screen.sleepTimeout = SleepTimeout.NeverSleep; BannerView bannerV = new BannerView(bannerBottom,AdSize.SmartBanner, AdPosition.Bottom); AdRequest request = new AdRequest.Builder().AddTestDevice(AdRequest.TestDeviceSimulator).AddTestDevice("3ADDDBD368939DC7").Build(); bannerV.LoadAd(request); bannerV.Show(); } void Update() { timer_main += Time.deltaTime; if (timer_main >= 1f) { g++; timer_main -= 1f; } if (g > 0 && g<2) flash.SetActive(true); if (g > 2 && g<4) flash.SetActive(false); if (g>=4) g = 0; } public void continue_game() { Exit.SetActive(false); } public void ShowTop() { endlesGame.isMain = true; SceneManager.LoadScene("Top"); } public void Start_game() { SceneManager.LoadScene("SELECT_LEVEL"); } public void ShowSettings() { panelSettings.SetActive(true); blur.SetActive(true); } public void HideSettings() { panelSettings.SetActive(false); blur.SetActive(false); } }