implement more changes

This commit is contained in:
2026-05-27 00:04:52 +02:00
parent e460a69443
commit 93a2f0e08c
27 changed files with 5825 additions and 5842 deletions
+38
View File
@@ -0,0 +1,38 @@
using UnityEngine;
public class ShockwaveEffect : MonoBehaviour
{
LineRenderer line;
float duration = 0.28f;
float elapsed;
Vector3 startScale;
public void Configure(float effectDuration)
{
duration = Mathf.Max(0.05f, effectDuration);
}
void Awake()
{
line = GetComponent<LineRenderer>();
startScale = transform.localScale * 0.35f;
transform.localScale = startScale;
}
void Update()
{
elapsed += Time.deltaTime;
float t = Mathf.Clamp01(elapsed / duration);
transform.localScale = Vector3.Lerp(startScale, Vector3.one, t);
if (line != null)
{
Color color = Color.Lerp(new Color(0.95f, 0.82f, 0.45f, 0.8f), new Color(0.95f, 0.82f, 0.45f, 0f), t);
line.startColor = color;
line.endColor = color;
}
if (elapsed >= duration)
Destroy(gameObject);
}
}