CPConfettiEmitter

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.

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.

Source:
CPConfettiEmitter.scala
trait CPAsset
class Object
trait Matchable
class Any

Value members

Concrete methods

override def emit(ctx: CPBaseContext): Iterable[CPParticle]
override def reset(): Unit

Inherited methods

override def equals(obj: Any): Boolean
Definition Classes
Inherited from:
CPGameObject
Source:
CPGameObject.scala
def getId: String

Gets unique ID of this game object.

Gets unique ID of this game object.

Inherited from:
CPGameObject
Source:
CPGameObject.scala
def getTags: Set[String]

Gets optional set of organizational tags. Note that by default the set of tags is empty.

Gets optional set of organizational tags. Note that by default the set of tags is empty.

See also:
Inherited from:
CPGameObject
Source:
CPGameObject.scala
def isPaused: Boolean

Tests whether or not this emitter is paused.

Tests whether or not this emitter is paused.

Inherited from:
CPParticleEmitter
Source:
CPParticleEmitter.scala
def pause(): Unit

Pause emission of the particles.

Pause emission of the particles.

Inherited from:
CPParticleEmitter
Source:
CPParticleEmitter.scala
def resume(reset: Boolean): Unit

Resumes emission of the particles.

Resumes emission of the particles.

Value parameters:
reset

Whether or not to reset this emitter before resuming emission.

Inherited from:
CPParticleEmitter
Source:
CPParticleEmitter.scala
def toggle(): Unit

Toggles pause status of this emitter. Note that with this method you don't have the control of resetting the emitter before resuming its emission.

Toggles pause status of this emitter. Note that with this method you don't have the control of resetting the emitter before resuming its emission.

Inherited from:
CPParticleEmitter
Source:
CPParticleEmitter.scala

Inherited fields

override val getOrigin: String

Gets the origin of this asset. Typically, this should be a URL, file name or class name for in-code assets like array images, animations or system font.

Gets the origin of this asset. Typically, this should be a URL, file name or class name for in-code assets like array images, animations or system font.

Inherited from:
CPParticleEmitter
Source:
CPParticleEmitter.scala