add
add: { gameobject: { misc: { canvasModulate: any }; circle: any; existing: any; rect: any; roundRect: any; sprite: any }; light: { staticLight: any }; map: { tileLayer: any; tilemap: any; tileset: any }; misc: { area: any }; presetEffect: { explosionEffect: any; smokeEffect: any }; ui: { button: any; text: any }; camera: any; cutscene: any; effect: any; group: any; input: any; mainCamera: any; particle: any; particleEmitter: any; soundPlayer: any }
Type declaration
gameobject: { misc: { canvasModulate: any }; circle: any; existing: any; rect: any; roundRect: any; sprite: any }
misc: { canvasModulate: any }
canvasModulate:function
- canvasModulate(x: number, y: number, w: number, h: number, fillColor: string): CanvasModulate
Parameters
x: number
y: number
w: number
h: number
fillColor: string
circle:function
- circle(x: number, y: number, r: number, fillColor: string): Circle
Parameters
x: number
y: number
r: number
fillColor: string
existing:function
Type parameters
Parameters
rect:function
- rect(x: number, y: number, w: number, h: number, fillColor: string): Rect
Parameters
x: number
y: number
w: number
h: number
fillColor: string
roundRect:function
- roundRect(x: number, y: number, w: number, h: number, r: number, fillColor: string): RoundRect
Parameters
x: number
y: number
w: number
h: number
r: number
fillColor: string
sprite:function
- sprite(x: number, y: number, w: number, h: number, textureKey: string, currentRow?: number, currentCol?: number): Sprite
Parameters
x: number
y: number
w: number
h: number
textureKey: string
Optional currentRow: number
Optional currentCol: number
light: { staticLight: any }
staticLight:function
Parameters
x: number
y: number
r: number
fillColor: string
map: { tileLayer: any; tilemap: any; tileset: any }
tileLayer:function
- tileLayer(tileset: Tileset, map: number[][], zIndex?: number, visible?: boolean): TileLayer
Parameters
map: number[][]
Optional zIndex: number
Optional visible: boolean
tilemap:function
tileset:function
- tileset(textureKey: string, tileW: number, tileH: number, rows: number, cols: number): Tileset
Parameters
textureKey: string
tileW: number
tileH: number
rows: number
cols: number
misc: { area: any }
area:function
Parameters
x: number
y: number
w: number
h: number
presetEffect: { explosionEffect: any; smokeEffect: any }
explosionEffect:function
- explosionEffect(rangeX: Range, rangeY: Range, particleAmount: undefined | number, speedRange: undefined | [1, 1], maxAge: undefined | number, color: undefined | string): ExplosionEffect
Parameters
particleAmount: undefined | number
speedRange: undefined | [1, 1]
maxAge: undefined | number
color: undefined | string
smokeEffect:function
- smokeEffect(rangeX: Range, rangeY: Range, particleAmount: undefined | number, speedRangeX: undefined | [-0.1, 0.4], speedRangeY: undefined | [-0.1, 0.4], maxAge: undefined | number, color: undefined | "#2e2e2e", interval: undefined | 50): SmokeEffect
Parameters
particleAmount: undefined | number
speedRangeX: undefined | [-0.1, 0.4]
speedRangeY: undefined | [-0.1, 0.4]
maxAge: undefined | number
color: undefined | "#2e2e2e"
interval: undefined | 50
ui: { button: any; text: any }
button:function
- button(shape: Shape, x: number, y: number, w: number, h: number, r: number, fillColor: string, text: Text): Button
Parameters
x: number
y: number
w: number
h: number
r: number
fillColor: string
text:function
camera:function
cutscene:function
effect:function
group:function
- group<t>(name: string, defaultValues?: t[]): Group<t>
Type parameters
Parameters
name: string
Optional defaultValues: t[]
Returns Group<t>
input:function
mainCamera:function
particle:function
Parameters
w: number
h: number
r: number
fillColor: string
particleEmitter:function
Parameters
amount: number
Optional autoCreate: boolean
soundPlayer:function
Creates a DuckEngine Scene
The Scene Class. Main rendering happens here
1.0.0-beta