Adjust player and jump pad physics parameters; refine visual effects and project settings

This commit is contained in:
2025-12-13 15:57:15 +01:00
parent 0d0c92fc83
commit 3a56ec7526
10 changed files with 205 additions and 215 deletions

View File

@@ -10,15 +10,7 @@ namespace Infrastructure.Unity
[Self][SerializeField] private MeshRenderer meshRenderer;
public event Action OnCollected;
private MaterialPropertyBlock _propBlock;
private static readonly int ColorProperty = Shader.PropertyToID("_BaseColor");
private void Awake()
{
_propBlock = new MaterialPropertyBlock();
}
private void OnTriggerEnter(Collider other)
{
if (other.TryGetComponent<PlayerController>(out var player))
@@ -28,8 +20,7 @@ namespace Infrastructure.Unity
var vfx = Instantiate(pickupVfx, transform.position, Quaternion.identity);
var main = vfx.main;
meshRenderer.GetPropertyBlock(_propBlock);
var currentColor = _propBlock.GetColor(ColorProperty);
var currentColor = meshRenderer.material.color;
main.startColor = currentColor;
Destroy(vfx.gameObject, 2f);