CPConfettiParticle

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.

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.

Source:
CPConfettiParticle.scala
class Object
trait Matchable
class Any

Value members

Concrete methods

override def getPixel: CPPixel
Definition Classes
Source:
CPConfettiParticle.scala
override def getX: Int
Definition Classes
Source:
CPConfettiParticle.scala
override def getY: Int
Definition Classes
Source:
CPConfettiParticle.scala
override def isAlive: Boolean
Definition Classes
Source:
CPConfettiParticle.scala
override def update(ctx: CPSceneObjectContext): Unit
Definition Classes
Source:
CPConfettiParticle.scala

Concrete fields

override val getZ: Int