C# Class ExplosionForce, Unity-2D-Destruction

Inheritance: MonoBehaviour
Exibir arquivo Open project: mjholtzem/Unity-2D-Destruction Class Usage Examples

Public Properties

Property Type Description
force float
radius float
upliftModifer float

Public Methods

Method Description
doExplosion ( Vector3 position ) : void

create an explosion force

Private Methods

Method Description
AddExplosionForce ( Rigidbody2D body, float explosionForce, Vector3 explosionPosition, float explosionRadius, float upliftModifier ) : void

adds explosion force to given rigidbody

waitAndExplode ( ) : IEnumerator

exerts an explosion force on all rigidbodies within the given radius

Method Details

doExplosion() public method

create an explosion force
public doExplosion ( Vector3 position ) : void
position Vector3 location of the explosion
return void

Property Details

force public_oe property

public float force
return float

radius public_oe property

public float radius
return float

upliftModifer public_oe property

public float upliftModifer
return float