public bool TryPush(PushableData pushableData, Vector3 atPos, Action <Transform> onRecovered, float damage) { if (!isActive || reachedMaxPushes || (health && health.isDead)) { return(false); } lastOnRecovered = onRecovered; lastDamage = damage; TransitionToState(State.Pushed); PushExplosive(pushableData, atPos); return(true); }
public void PushExplosive(PushableData data, Vector3 atPos) { rb3d.AddExplosionForce(data.force, atPos, data.radius, data.upwardsModifier); }