Explosive

Inherits: Area2D < CollisionObject2D < Node2D < CanvasItem < Node < Object

A circular area which:

  • Applies an impulse to all PhysicsBody2D inside of it.

  • Applies damage to all Entity inside of it.

  • Self-destructs at the end.

Properties

CollisionShape2D

Collider

<unknown>

Node

RootNode

<unknown>

float

DefaultMass

1.0

float

Damage

Curve

Damage_Curve

float

Impulse

Curve

Impulse_Curve

Methods

void

explode()


Property Descriptions

CollisionShape2D Collider = <unknown> πŸ”—

A CollisionShape2D to use for calculating radius. This MUST have a CircleShape2D selected.


Node RootNode = <unknown> πŸ”—

The Node to queuefree() after exploding


float DefaultMass = 1.0 πŸ”—

The default mass to be assumed for CharacterBody2Ds since they have no mass (excluding DynamicEntity).


float Damage πŸ”—

The maximum amount of damage that can be applied on all victim Entity.


Curve Damage_Curve πŸ”—

A curve to define how much damage is applied depending on the victim’s distance from the center of the Collider.


float Impulse πŸ”—

The maximum amount of impulse that can be applied on all PhysicsBody2D.


Curve Impulse_Curve πŸ”—

A curve to define how much impulse is applied depending on the victim’s distance from the center of the Collider.


Method Descriptions

void explode() πŸ”—

The function which triggers the explosion.