samples/05_mouse/02_mouse_move/app/main.rb
# Animates the zombies by using the animation index to go through the images in the sprites folder.
Animates the zombies by using the animation index to go through the images in the sprites folder.
Animates the zombies by using the animation index to go through the images in the sprites folder .
def animation_sprite zombie, at = nil
    at ||= zombie.created_at_elapsed 
    index = animation_index at
    "sprites/zombie-#{index}.png" 
  end
def animation_sprite zombie , at = nil at ||= zombie . created_at_elapsed index = animation_index at "sprites/zombie-#{index}.png" end
Animates the zombies by using the animation index to go through the images in the sprites folder.
Animates the zombies by using the animation index to go through the images in the sprites folder .
# how long it is has been since a zombie was created # string interpolation to iterate through images
zombie
at