public static Sequence FTShakeRotation(this FlaxEngine.GUI.Control actor, float time, float strength = 90, int vibrato = 10, float randomness = 90, bool fade = true) { return(FloatFTweener.Shake(() => actor.Rotation, (y) => actor.Rotation = y, actor.Rotation, time, strength, vibrato, randomness, fade)); }
public static Sequence FTShakePositionY(this Actor actor, float time, float strength = 2, int vibrato = 2, float randomness = 2, bool fade = true) { return(FloatFTweener.Shake(() => actor.LocalPosition.Y, (y) => actor.LocalPosition += Vector3.Up * (y - actor.LocalPosition.Y), actor.LocalPosition.Y, time, strength, vibrato, randomness, fade)); }