SimpleExplosion
Declaration
public sealed class tainicom.Aether.Physics2D.Common.PhysicsLogic.SimpleExplosion
Creates a simple explosion that ignores other bodies hiding behind static bodies.
Inherits: tainicom.Aether.Physics2D.Common.PhysicsLogic.PhysicsLogic
Constructors
SimpleExplosion
void SimpleExplosion(World world)
Parameters:
| Name | Type | Description |
|---|---|---|
world |
tainicom.Aether.Physics2D.Dynamics.World |
Properties
Power
This is the power used in the power function. A value of 1 means the force applied to bodies in the explosion is linear. A value of 2 means it is exponential.
float Power { get set }
Methods
Activate
Activate the explosion at the specified position.
Dictionary<Body, Vector2> Activate(Vector2 pos, float radius, float force, float maxForce = 3.4028235E+38)
Parameters:
| Name | Type | Description |
|---|---|---|
pos |
Strawberry.Math.Vector2 |
The position (center) of the explosion. |
radius |
System.Single |
The radius of the explosion. |
force |
System.Single |
The force applied |
maxForce |
System.Single = 3.4028235E+38 |
A maximum amount of force. When force gets over this value, it will be equal to maxForce |
Returns: A list of bodies and the amount of force that was applied to them.