Skip to content
Browse files

Overhaulted RoflCopter movement; now with more X axis!

  • Loading branch information...
1 parent d540d43 commit e1b554c0b58912fca525c3754a00910ac7538125 @pda committed Jan 15, 2012
Showing with 8 additions and 2 deletions.
  1. +8 −2 asc.rb
View
10 asc.rb
@@ -397,10 +397,16 @@ def initialize x, y, background
],
]
end
- attr_reader :x
def width; 24 end
def height; 5 end
- def y; @y + (5 * Math.sin(Time.new.to_f)).to_i end
+ def y
+ range = 1.5
+ @y + (range * Math.sin(Time.new.to_f * 1.5)).round
+ end
+ def x
+ range = 20
+ @x + (range * Math.sin(Time.new.to_f * 0.7)).round
+ end
def pixel x, y, rx, ry, ticks
Pixel.new char(rx, ry, ticks), 255, @background.color(x, y)
end

0 comments on commit e1b554c

Please sign in to comment.
Something went wrong with that request. Please try again.