made fade_time a const instead of magic number
This commit is contained in:
parent
124acffc01
commit
91655454f6
@ -15,6 +15,7 @@
|
||||
#include <algorithm>
|
||||
|
||||
const int default_frames_per_rect {10};
|
||||
const int fade_time {5}; // seconds
|
||||
|
||||
enum class FadingState {
|
||||
fadein,
|
||||
@ -111,7 +112,7 @@ void FadingRects::update() {
|
||||
rect.cur_alpha = 0.0;
|
||||
rect.state = FadingState::fadein;
|
||||
rect.sustain_frame = 0;
|
||||
rect.delta = rect.alpha / (5 * fps());
|
||||
rect.delta = rect.alpha / (fade_time * fps());
|
||||
rect.line_width = random_between(1.0, 20.0);
|
||||
rect.x = rr.x;
|
||||
rect.y = rr.y;
|
||||
|
Loading…
x
Reference in New Issue
Block a user