diff options
| author | mokha <mokha@cisco.com> | 2018-03-20 19:42:00 -0600 |
|---|---|---|
| committer | mokha <mokha@cisco.com> | 2018-03-20 19:42:00 -0600 |
| commit | 1f4ee55d8aed78496ba7a0baa547ac83e82ce668 (patch) | |
| tree | 8b9064ec3e9695c1ab250b25cb4149700f278ac0 | |
| parent | a67f09c86932aa764d86495bc4b790c3e6c4c8f9 (diff) | |
fix bug when not animating.
| -rw-r--r-- | lib/xsay/render.rb | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/xsay/render.rb b/lib/xsay/render.rb index 12708b2..777cf95 100644 --- a/lib/xsay/render.rb +++ b/lib/xsay/render.rb @@ -22,8 +22,9 @@ module Xsay end def each_frame + return yield 0 unless move? frames = distance.downto(0).to_a + 0.upto(distance).to_a - frames.uniq.each { |x| yield x } + frames.each { |x| yield x } end private |
