new Juicy(game)
Creates a new Juicy
object.
Parameters:
Name | Type | Description |
---|---|---|
game |
Phaser.Game | Current game instance. |
- Source - out/plugins/Juicy/Juicy.js, line 17
Classes
Methods
-
createScreenFlash(color)
-
Creates a 'Juicy.ScreenFlash' object
Parameters:
Name Type Description color
string The color of the screen flash
- Source - out/plugins/Juicy/Juicy.js, line 326
-
createTrail(length, color)
-
Creates a 'Juicy.Trail' object
Parameters:
Name Type Description length
number The length of the trail
color
number The color of the trail
- Source - out/plugins/Juicy/Juicy.js, line 339
-
jelly(object, strength, delay, initialScale)
-
Creates the jelly effect on the given object
Parameters:
Name Type Argument Default Description object
Phaser.Sprite The object to gelatinize
strength
number <optional>
0.2 The strength of the effect
delay
number <optional>
0 The delay of the snap-back tween. 50ms are automaticallly added to whatever the delay amount is.
initialScale
Phaser.Point <optional>
new Phaser.Point(1,1) The initial scale of the object
- Source - out/plugins/Juicy/Juicy.js, line 377
-
mouseStretch(object, strength, initialScale)
-
Creates the mouse stretch effect on the given object
Parameters:
Name Type Argument Default Description object
Phaser.Sprite The object to mouse stretch
strength
number <optional>
0.5 The strength of the effect
initialScale
Phaser.Point <optional>
new Phaser.Point(1,1) The initial scale of the object
- Source - out/plugins/Juicy/Juicy.js, line 397
-
overScale(object, scale, initialScale)
-
Creates the over scale effect on the given object
Parameters:
Name Type Argument Default Description object
Phaser.Sprite The object to over scale
scale
number <optional>
1.5 The scale amount to overscale by
initialScale
Phaser.Point <optional>
new Phaser.Point(1,1) The initial scale of the object
- Source - out/plugins/Juicy/Juicy.js, line 352
-
shake(duration, strength)
-
Begins the screen shake effect
Parameters:
Name Type Argument Default Description duration
number <optional>
20 The duration of the screen shake
strength
number <optional>
20 The strength of the screen shake
- Source - out/plugins/Juicy/Juicy.js, line 302
-
update()
-
Runs the core update function and causes screen shake and overscaling effects to occur if they are queued to do so.
- Source - out/plugins/Juicy/Juicy.js, line 404