using UnityEngine; public class Rage : MonoBehaviour { private Player player; private AttackLevel level; public AnimationCurve curve; public AnimationCurve partCurve; private ParticleSystem.EmissionModule part; private void Start() { player = GetComponentInParent(); level = GetComponentInParent(); part = GetComponentInChildren().emission; player.data.SetWobbleObjectChild(GetComponentInChildren().transform); } private void Update() { float healthPercentage = player.data.HealthPercentage; player.data.stats.rageSpeed = Mathf.Pow(curve.Evaluate(healthPercentage), level.LevelScale()); part.rateOverTime = partCurve.Evaluate(player.data.stats.rageSpeed); } }