Проект добавил

This commit is contained in:
lapich committed 2026-10-06 16:31:45 +03:00
1 parent 07ce9b8ba7
commit 1a78beb58a
545 files changed
+90820

No files matched your search

+23
View File
@@ -0,0 +1,23 @@
using UnityEngine;
public class WaveExpander : MonoBehaviour
{
public float expandSpeed = 15f;
public float maxRadius = 20f;
private float currentRadius = 0f;
void Update()
{
currentRadius += expandSpeed * Time.deltaTime;
// Отправляем данные в шейдер!
Shader.SetGlobalVector("_WaveCenter", transform.position);
Shader.SetGlobalFloat("_WaveRadius", currentRadius);
if (currentRadius >= maxRadius)
{
Shader.SetGlobalFloat("_WaveRadius", 0f);
Destroy(gameObject);
}
}
}