/
darov
/
Platformer
Обзор
Документация
Войти
/
darov
/
Platformer
Код
Запросы
0
Задачи
Вики
Пакеты
0
Релизы
0
CI/CD
Аналитика
Безопасность
master
Assets/Scripts/CollisionFunctions/StompPoints.cs
19 строк
392 B
Roman Danilov
comment
15 окт 2025, 07:53
15 окт 2025, 07:53
80f1cc3
Код
Авторство
О чём код?
using UnityEngine; public class StompPoints : MonoBehaviour, ITriggerFunction { private ICountScore _score; private void Start() { _score = GetComponentInParent<ICountScore>(); } public void EnableFunction(GameObject other) { if (other.TryGetComponent<IDamagable>(out _)) { _score.Enemies++; } } }