RaycastExplosion

class RaycastExplosion(epicentre: Vec2, noOfRays: Int, distance: Double, worldBodies: ArrayList<TranslatableBody>) : Explosion

Models raycast explosions.

Parameters

epicentre

The epicentre of the explosion.

noOfRays

Number of projected rays.

distance

Distance of projected rays.

worldBodies

The world the rays effect and are projected in.

Constructors

Link copied to clipboard
fun RaycastExplosion(epicentre: Vec2, noOfRays: Int, distance: Double, worldBodies: ArrayList<TranslatableBody>)

Functions

Link copied to clipboard
open override fun applyBlastImpulse(blastPower: Double)

Applies a blast impulse to the effected bodies.

Link copied to clipboard
open override fun setEpicentre(v: Vec2)

Sets the epicentre to a different coordinate.

Link copied to clipboard
open override fun update(bodiesToEvaluate: ArrayList<TranslatableBody>)

Updates the arraylist to reevaluate what objects are effected/within the proximity.

Properties

Link copied to clipboard
val rayScatter: RayScatter