org.cosplay.prefabs.particles

Members list

Type members

Classlikes

class CPConfettiEmitter(xf: () => Int, yf: () => Int, genSize: Int, maxAge: Int, colors: Seq[CPColor], bgFg: CPColor, chf: Int => Char, z: Int) extends CPParticleEmitter

Particle emitter for confetti effect.

Particle emitter for confetti effect.

Value parameters

bgFg

A color to fade in to when a particle dies.

chf

Function that takes current age and return character to use for that frame.

colors

Set of colors to randomly color the particles.

genSize

Number of particles this emitter will emit on each frame update.

maxAge

Maximum age of the particle, i.e. how many frames it will be visible.

xf

X-coordinate producer for emission center.

yf

Y-coordinate producer for emission center.

z

Z-index to use to draw particles from this emitter.

Attributes

Source
CPConfettiEmitter.scala
Supertypes
trait CPAsset
class CPGameObject
class Object
trait Matchable
class Any
Show all
class CPConfettiParticle(initX: Int, initY: Int, dx: Float, dy: Float, maxAge: Int, colors: Seq[CPColor], bgFg: CPColor, chf: Int => Char, z: Int) extends CPParticle

Particle for confetti effect.

Particle for confetti effect.

Value parameters

bgFg

A color to fade in to when this particle dies.

chf

Function that takes current age and return character to use for that frame.

colors

Set of colors to randomly color the particle at each frame.

dx

Per-frame x-speed.

dy

Per-frame y-speed.

initX

Initial x-coordinate.

initY

Initial y-coordinate.

maxAge

Maximum age of the particle, i.e. how many frames it will be visible.

z

Z-index to use to draw this particle.

Attributes

Source
CPConfettiParticle.scala
Supertypes
trait CPParticle
class Object
trait Matchable
class Any