From 0c46c616a126569f778b04ea2c7bf04e34664939 Mon Sep 17 00:00:00 2001 From: davidovski Date: Mon, 22 Apr 2024 18:36:22 +0100 Subject: add spring animation --- tilemap.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'tilemap.go') diff --git a/tilemap.go b/tilemap.go index 2c758d0..7fe7356 100644 --- a/tilemap.go +++ b/tilemap.go @@ -117,8 +117,8 @@ func (t * Tilemap) Collide(x, y, width, height int) bool { func (t * Tilemap) CollideObject(object *GameObject) bool { - width := object.image.Bounds().Dx() - height := object.image.Bounds().Dy() + width := object.images[0].Bounds().Dx() + height := object.images[0].Bounds().Dy() x := int(object.x) y := int(object.y) return t.Collide(x, y, width, height) -- cgit v1.2.1