Options
All
  • Public
  • Public/Protected
  • All
Menu
classdesc

Creates a DuckEngine Effect

description

The Effect Class. Store a particleEmitter instance and particles that can be run easily

since

1.2.0

Hierarchy

Implements

Index

Constructors

constructor

  • description

    Creates an Effect instance.

    since

    1.2.0

    Parameters

    • rangeX: Range

      A range of 2 numbers to determine the new created particles x position

    • rangeY: Range

      A range of 2 numbers to determine the new created particles y position

    • particleEmitter: ParticleEmitter

      ParticleEmitter instance

    • game: Game

      Game instance

    Returns Effect

Properties

culled

culled: boolean
memberof

Effect

description

Determines if the Effect should be visible by the current scene's current camera

since

2.1.0

following

memberof

Effect

description

A gameobject that the Effect is following

since

1.2.0

game

game: Game
memberof

Effect

description

Game instance

since

1.2.0

Readonly id

id: string
memberof

Effect

description

A unique identifier for the Effect

since

1.2.0

particleEmitter

particleEmitter: ParticleEmitter
memberof

Effect

description

ParticleEmitter to control

since

1.2.0

Protected randomMaxOffset

randomMaxOffset: number

rangeX

rangeX: Range
memberof

Effect

description

Range of numbers for x pos

since

1.2.0

rangeY

rangeY: Range
memberof

Effect

description

Range of numbers for y pos

since

1.2.0

Readonly shape

shape: string
memberof

Effect

description

Shape, always "Effect" used for Scene.displayList

since

1.2.0

visible

visible: boolean
memberof

Effect

description

Determines the visibility of the Effect

since

1.2.0

zIndex

zIndex: number
memberof

Effect

description

Used for depth sorted

since

1.2.0

Methods

_draw

  • _draw(): void

emit

  • emit(): void

emitFor

  • emitFor(ms: number): void
  • memberof

    Effect

    description

    Makes the particleEmitter emit for a duration

    since

    1.2.0

    Parameters

    • ms: number

      Duration in milliseconds

    Returns void

follow

stopEmit

  • stopEmit(): void

stopFollow

  • stopFollow(): void
  • memberof

    Effect

    description

    Makes the effect stop following the GameObject

    since

    1.2.0

    Returns void

Generated using TypeDoc