summaryrefslogtreecommitdiff
path: root/tilemap.go
diff options
context:
space:
mode:
authordavidovski <david@davidovski.xyz>2024-04-22 18:36:22 +0100
committerdavidovski <david@davidovski.xyz>2024-04-22 18:36:22 +0100
commit0c46c616a126569f778b04ea2c7bf04e34664939 (patch)
tree1a2305eb0c413ac58c1ada4856fe0ec616e126e4 /tilemap.go
parente4c0edeacb2c5829f864e116b68f6cad175141b3 (diff)
add spring animation
Diffstat (limited to 'tilemap.go')
-rw-r--r--tilemap.go4
1 files changed, 2 insertions, 2 deletions
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)