Interactable object!

This commit is contained in:
2024-07-18 17:46:36 +08:00
parent 9025859fac
commit 5414fbfac8
7 changed files with 84 additions and 10 deletions

View File

@@ -3,6 +3,7 @@ package tiles
import (
"git.solsynth.dev/highland/codingland/pkg/internal/land"
"github.com/veandco/go-sdl2/sdl"
"log"
)
type Tile struct {
@@ -38,3 +39,7 @@ func (p *Tile) GetSize() land.Vector2D {
func (p *Tile) OnCollide(other land.CollidableObject) {
}
func (p *Tile) OnClick(mousePos land.Vector2D) {
log.Printf("user clicked tile: %s", mousePos.String())
}