draw
or other callbacks would be silently swallowed. Please try adding a begin … rescue … end
block around your method implementations, and let me know if this problem still exists.
def draw
begin
coord = vec2(0, 0) - @drawOffset
coord = vec2(coord.x % $size.x, coord.y % $size.y)
@img.draw(coord.x, coord.y, 0, @imgScale.x, @imgScale.y)
coord2 = coord - vec2($size.x, 0)
@img.draw(coord2.x, coord2.y, 0, @imgScale.x, @imgScale.y)
# c = 0xff333333
# draw_quad(0, 0, c, $size.x, 0, c, $size.x, $size.y, c, 0, $size.y, c, 0)
@creature.draw(self, @drawOffset)
rescue
puts "Error"
puts $!.backtrace
end
end
some bad drawing code...
rescue Exception => e
puts e, e.backtrace
Powered by mwForum 2.29.7 © 1999-2015 Markus Wichitill