ichigo/engine/solid.go
2021-08-08 11:46:03 +10:00

17 lines
236 B
Go

package engine
import (
"encoding/gob"
"image"
)
func init() {
gob.Register(SolidRect{})
}
type SolidRect struct {
ID
Rect image.Rectangle
}
func (s SolidRect) CollidesWith(r image.Rectangle) bool { return s.Rect.Overlaps(r) }