updated demon

This commit is contained in:
2025-08-20 14:28:49 +02:00
parent 3b07a6f937
commit e79d12ebec
13 changed files with 26080 additions and 17039 deletions

View File

@@ -1,38 +1,38 @@
using UnityEngine;
public class ShieldScaleUp : MonoBehaviour
{
[Tooltip("Time it takes to fully grow the shield")]
public float growDuration = 0.5f;
[Tooltip("Curve to control growth speed over time")]
public AnimationCurve scaleCurve = AnimationCurve.EaseInOut(0, 0, 1, 1);
private float timer = 0f;
private Vector3 targetScale;
private void Awake()
{
targetScale = transform.localScale;
transform.localScale = Vector3.zero;
}
private void OnEnable()
{
timer = 0f;
transform.localScale = Vector3.zero;
}
private void Update()
{
if (timer < growDuration)
{
timer += Time.deltaTime;
float t = Mathf.Clamp01(timer / growDuration);
float scaleValue = scaleCurve.Evaluate(t);
transform.localScale = targetScale * scaleValue;
}
}
using UnityEngine;
public class ShieldScaleUp : MonoBehaviour
{
[Tooltip("Time it takes to fully grow the shield")]
public float growDuration = 0.5f;
[Tooltip("Curve to control growth speed over time")]
public AnimationCurve scaleCurve = AnimationCurve.EaseInOut(0, 0, 1, 1);
private float timer = 0f;
private Vector3 targetScale;
private void Awake()
{
targetScale = transform.localScale;
transform.localScale = Vector3.zero;
}
private void OnEnable()
{
timer = 0f;
transform.localScale = Vector3.zero;
}
private void Update()
{
if (timer < growDuration)
{
timer += Time.deltaTime;
float t = Mathf.Clamp01(timer / growDuration);
float scaleValue = scaleCurve.Evaluate(t);
transform.localScale = targetScale * scaleValue;
}
}
}