Class: ShadowCaster

ShadowCaster(shadowCaster, shadowReceiver) → {ShadowCaster}

new ShadowCaster(shadowCaster, shadowReceiver) → {ShadowCaster}

Default Constructor

Renders a colored image representing the shadowCaster on the receiver

Parameters:
Name Type Description
shadowCaster ShadowCaster must be GameObject referencing at least a LightRenderable
shadowReceiver ShadowReceiver must be GameObject referencing at least a SpriteRenderable
Source:
Returns:
New instance of ShadowCaster
Type
ShadowCaster

Methods

draw(aCamera) → {undefined}

Draw function called by GameLoop
Parameters:
Name Type Description
aCamera Camera Camera to draw too
Source:
Returns:
Type
undefined

setShadowColor(c) → {void}

Set the shadow color
Parameters:
Name Type Description
c Array.<Float> new Color of shadow [R, G, B, A]
Source:
Returns:
Type
void