Last active
August 29, 2015 14:03
-
-
Save spajus/3dd63e104f7b3d6c5559 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Not yet.