Skip to content

Instantly share code, notes, and snippets.

@roberto
Created September 17, 2013 05:03
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save roberto/6590242 to your computer and use it in GitHub Desktop.
Save roberto/6590242 to your computer and use it in GitHub Desktop.
class Plane
def initialize(game)
@x = 100
@y = 100
@sprite = Gosu::Image.load_tiles(game, "images/planes.png", 66, 67, true)[0..2]
end
def draw
@sprite[Gosu::milliseconds / 100 % @sprite.size].draw_rot(@x, @y, 1, 0)
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment