Beispiel #1
0
        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);
        }
Beispiel #2
0
 public void PushExplosive(PushableData data, Vector3 atPos)
 {
     rb3d.AddExplosionForce(data.force, atPos, data.radius, data.upwardsModifier);
 }