⚡ Improve and optimization
This commit is contained in:
@@ -40,6 +40,8 @@ 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())
|
||||
func (p *Tile) OnEvent(event land.UserEventType, args ...any) {
|
||||
if event == land.UserEventMouseDown {
|
||||
log.Printf("user clicked tile: %s", args[0].(land.Vector2D).String())
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user