FlixelShakeUnit
View sourceenum
org.flixelgdx.tween.settings.FlixelShakeUnit
How FlixelShakeTween.intensity maps to maximum offset per axis.
FlixelShakeUnit.FRACTION scales horizontal range by FlixelShakeable.getShakeWidth() and vertical range by FlixelShakeable.getShakeHeight() when those return values greater than zero (per axis enabled by FlixelAxes). Typical values are small, for example 0.05f.
FlixelShakeUnit.PIXELS sets the half-range in pixels on each active axis (random offset in [-intensity, +intensity]).
Fields
FRACTION
Scale intensity by FlixelShakeable.getShakeWidth() (X) and FlixelShakeable.getShakeHeight() (Y) when positive. This is the default value.
Use this if you're familiar with HaxeFlixel and want to use the same behavior.
PIXELS
Treat intensity as pixel magnitude on each shaken axis.
Use this if you want to directly set the half-range in pixels on each active axis (random offset in [-intensity, +intensity]) and you're used to how Unity or Godot shakes objects.