Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Player animation sprites.

  • Loading branch information...
commit 8df2001f78e6d68a9d9f3af9bdb7d7ff6aeb9137 1 parent 53d8fed
@pda authored
Showing with 27 additions and 7 deletions.
  1. +27 −7 asc.rb
View
34 asc.rb
@@ -208,14 +208,34 @@ def initialize y
end
def x; 0; end
def width; 3 end
- def height; 4 end
+ def height; 3 end
def char rx, ry, ticks
- [
- ' @ ',
- '---',
- ' | ',
- '/ \\',
- ][ry][rx]
+ if dead?
+ [
+ ' @ ',
+ '\-/',
+ '// ',
+ ][ry][rx]
+ elsif !@walking
+ [
+ ' O/',
+ '/| ',
+ '/ >',
+ ][ry][rx]
+ else
+ [
+ [
+ ' O ',
+ '/|v',
+ '/ >',
+ ],
+ [
+ ' 0 ',
+ '-|\\',
+ ' >\\',
+ ],
+ ][ticks / 4 % 2][ry][rx]
+ end
end
def acceleration
if @dead
Please sign in to comment.
Something went wrong with that request. Please try again.