Skip to content

Instantly share code, notes, and snippets.

@spajus
Last active August 29, 2015 14: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 spajus/3dd63e104f7b3d6c5559 to your computer and use it in GitHub Desktop.
Save spajus/3dd63e104f7b3d6c5559 to your computer and use it in GitHub Desktop.
class Player
def draw
@sprite.draw(@x, @y, 0) # Gosu::Image
# is there any way to find out value of @x and @y after all transformations it will go through?
end
end
class GameWindow < Gosu::Window
def draw
transform(@cam_x, @cam_y) do
scale(@cam_zoom_x, @cam_zoom_y, @cam_x, @cam_y) do
rotate(@cam_angle, @cam_x, @cam_y) do
@player.draw
end
do
end
end
end
@jlnr
Copy link

jlnr commented Jun 25, 2014

Not yet.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment