KeyboardGradient¶
namespace GameSense.Animation
public class KeyboardGradient : IKeyboardAnimator
An IKeyboardAnimator
that generates a gradient background effect. The gradient gets animated moving from right to left.
Summary¶
Constructors¶
Constructor |
---|
KeyboardGradient (int[] color1, int[] color2, int time, int length) |
Implemented methods from IKeyboardAnimator
¶
Returns | Method |
---|---|
KeyboardFrame |
NextFrame ( KeyboardFrame bottomLayer) |
Constructors¶
KeyboardGradient
¶
public KeyboardGradient(int[] color1, int[] color2, int time = 1, int length = 1)
Initializes a new instance of the class.
Parameters¶
Type | Name | Description | Default |
---|---|---|---|
int[] |
color1 |
The left color of the gradient (RGB format) | |
int[] |
color2 |
The right color of the gradient (RGB format) | |
int |
time |
The speed of the animation. The speed is dependent on the Controller.FrameLength . It needs 22 · time NextFrame() calls for one full animation cycle. |
1 |
int |
length |
How long the gradient is compared to the keyboard. The gradient is keyboard · length long. |
1 |