def visible?(map = nil)
      r = Rectangle.new @x, @y, @img[0].width, @img[0].height
      return Rectangle.new(0, 0, G.window.width, G.window.height).intersect? r if map.nil?
      map.cam.intersect? r
    end
def visible?(map = nil)
      r = Rectangle.new @x, @y, @img[0].width, @img[0].height
      return Rectangle.new(0, 0, G.window.width, G.window.height).intersect? r if map.nil?
      map.cam.intersect? r
    end
Returns whether this sprite is visible in the given map (i.e., in the
 viewport determined by the camera of the given map). If no map is given,
 returns whether the sprite is visible on the screen.