Skip to content
master
Go to file
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
 
 

README.md

phaser-screen-shake

The plugin for Phaser HTML5 game framework to add screen shake fx

Demo

You can see it in action here. Just let the player die or jumping up on an enemy.

Usage

In your create method, add the plugin to the game:

game.plugins.screenShake = game.plugins.add(Phaser.Plugin.ScreenShake);

in function where need to call shake FX:

if need to replace default plugin settings

game.plugins.screenShake.setup({
 shakeX: true,
 shakeY: false
});

And pass shake count value:

game.plugins.screenShake.shake(10);

Available settings

  • shakesCount: [number] - count of short camera movements
  • shakeX: [bool] - shake the screen by x
  • shakeY: [bool] true - shake the screen by y
  • sensCoef: [number/float] - shake sensitivity coefficient

License

The MIT License (MIT)

About

The plugin for Phaser html5 game framework to add screen shake fx

Resources

License

Releases

No releases published

Packages

No packages published
You can’t perform that action at this time.