/
RealMotya
/
Platformer
Обзор
Документация
Войти
/
RealMotya
/
Platformer
Код
Запросы
0
Задачи
Вики
Пакеты
0
Релизы
0
CI/CD
Аналитика
Безопасность
master
Assets/_Scripts/Coin.cs
24 строки
457 B
VR4\IT-Cube28
Fear: добавил босса
29 янв 2026, 10:37
29 янв 2026, 10:37
ebc6168
Код
Авторство
О чём код?
using UnityEngine; public class Coin : MonoBehaviour { public int Volume = 1; public int PickUp() { GetComponent<Animator>().SetTrigger("Up"); GetComponent<CircleCollider2D>().enabled = false; GetComponent<AudioSource>().Play(); transform.GetChild(0).gameObject.SetActive(true); Destroy(transform.parent.gameObject, 2f); return Volume; } void Update() { } }