using UnityEngine; public class RescaleFromDamagePart : MonoBehaviour { private ProjectileHit hit; private float startSize; private ParticleSystem part; private void Start() { part = GetComponent(); startSize = part.startSize; } public void Rescale() { if (!hit) { hit = GetComponentInParent(); } if ((bool)hit) { part.startSize = startSize * (hit.damage / 55f); } } }