I'm trying to make a GameObject which does not use Gosu::Image but Chingu::Rect. That's my class by omitting all unimportant methods
class Tile < Chingu::GameObject
trait :bounding_box
trait :collision_detection
def initialize (x, y, w, h, opts={})
super opts
@area = Chingu::Rect.new(x,y,w,h)
end
def collision_at?(x, y)
@area.collide_point?(x,y)
end
end
However collision detection is not working. Does anybody know how to tell the bounding_box to use a specific Rectangle and not an Image?