Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def in_screen?(object_x, object_y = nil)
- unless object_y
- object = object_x
- object_x = object.x
- object_y = object.y
- end
- return false if object_x <= @display_x - 4
- return false if object_x >= @display_x + Graphics.width / 32 + 3
- return false if object_y <= @display_y - 4
- return false if object_y >= @display_y + Graphics.height / 32 + 3
- return true
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement