папочка навёл порядок в папках

This commit is contained in:
vladislove committed 2026-07-20 21:07:50 +03:00
1 parent 9374a984e6
commit b407380203
1123 files changed
+2764 -133233

No files matched your search

@@ -0,0 +1,27 @@
using UnityEngine;
namespace Obstacle
{
public class StaticObstacle : MonoBehaviour
{
public float despawnDistance = 20f;
private Transform _player;
private GameObject _originalPrefab;
public void Init(Transform player, GameObject prefab)
{
_player = player;
_originalPrefab = prefab;
}
void Update()
{
if (_player != null && transform.position.z < _player.position.z - despawnDistance)
{
SimpleObjectPool.Instance.ReturnToPool(_originalPrefab, gameObject);
}
}
}
}