| 105 | } |
| 106 | |
| 107 | void Effect::start() |
| 108 | { |
| 109 | _ledBuffer.resize(_ledCount); |
| 110 | |
| 111 | _effect->Init(_image, 10); |
| 112 | |
| 113 | if (_timeout > 0) |
| 114 | _endTime = InternalClock::now() + _timeout; |
| 115 | else |
| 116 | _endTime = -1; |
| 117 | |
| 118 | _timer.setInterval(_effect->GetSleepTime()); |
| 119 | |
| 120 | Info(_log, "Begin playing the %s with priority: %i", (_isSoundEffect) ? "music effect" : "effect", _priority); |
| 121 | |
| 122 | run(); |
| 123 | _timer.start(); |
| 124 | } |
| 125 | |
| 126 | void Effect::run() |
| 127 | { |
no test coverage detected