Add metadata files for LeanTween assets and update existing prefab references

This commit is contained in:
2025-12-13 02:33:23 +01:00
parent 2381153dbe
commit 471cf45df3
463 changed files with 237904 additions and 73 deletions

View File

@@ -111,8 +111,23 @@ namespace Infrastructure.Unity
public void PulseEmission(float intensity)
{
StartCoroutine(PulseEmissionRoutine(intensity, 0.1f));
StartCoroutine(PulseScaleRoutine());
LeanTween.cancel(gameObject);
transform.localScale = Vector3.one;
LeanTween.scale(gameObject, Vector3.one * 1.05f, 0.15f).setEasePunch();
meshRenderer.GetPropertyBlock(_propBlock);
var baseColor = _propBlock.GetColor(ColorProperty);
var flashColor = baseColor * intensity;
LeanTween.value(gameObject, (Color col) =>
{
meshRenderer.GetPropertyBlock(_propBlock);
_propBlock.SetColor(EmissionColorProperty, col);
meshRenderer.SetPropertyBlock(_propBlock);
}, flashColor, Color.black, 0.4f)
.setEaseOutQuad();
}
public void SetAlpha(float alpha)
@@ -178,29 +193,5 @@ namespace Infrastructure.Unity
_linkedTile.OnStateChanged -= OnTileStateChanged;
}
}
private IEnumerator PulseScaleRoutine()
{
var original = transform.localScale;
transform.localScale = original * 1.05f;
yield return new WaitForSeconds(0.1f);
transform.localScale = original;
}
private IEnumerator PulseEmissionRoutine(float intensity, float duration)
{
meshRenderer.GetPropertyBlock(_propBlock);
var baseColor = _propBlock.GetColor(ColorProperty);
var glowingColor = baseColor * intensity;
_propBlock.SetColor(EmissionColorProperty, glowingColor);
meshRenderer.SetPropertyBlock(_propBlock);
yield return new WaitForSeconds(duration);
_propBlock.SetColor(EmissionColorProperty, Color.black);
meshRenderer.SetPropertyBlock(_propBlock);
}
}
}