fixed snap in bug, started with space themed sprites

This commit is contained in:
2024-04-12 15:08:40 +02:00
parent f23bdaf121
commit a84b8b58e1
7 changed files with 148 additions and 29 deletions

View File

@@ -115,3 +115,8 @@ func (tile *Position) Intersects(moving *Position, velocity *Velocity) (bool, *P
return false, nil
}
func (tile *Position) Intersecting(position *Position, velocity *Velocity) bool {
is := tile.Rect.Bounds().Intersect(position.Rect.Bounds())
return is != image.ZR
}