Class Feedback.Reaction
java.lang.Object
com.codename1.gaming.platformer.view.Feedback.Reaction
- Enclosing class:
Feedback
What one kind of event does.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionflash(int argb, double seconds) Flashes the screen.particles(int count, int argb) Bursts particles.Limits the shake and flash to events about the player, so an enemy landing off screen does not rattle the camera.shake(double pixels, double seconds) Shakes the camera.Plays a sound.
-
Constructor Details
-
Reaction
public Reaction()
-
-
Method Details
-
shake
Shakes the camera.
Parameters
pixels: the amplitudeseconds: the duration
Returns
this reaction
-
flash
Flashes the screen.
Parameters
argb: the color; its alpha is the strongest opacityseconds: the fade time
Returns
this reaction
-
sound
Plays a sound.
Parameters
name: passed to theSink
Returns
this reaction
-
particles
Bursts particles.
Parameters
count: how manyargb: their color
Returns
this reaction
-
playerOnly
Limits the shake and flash to events about the player, so an enemy landing off screen does not rattle the camera.
Returns
this reaction
-