package world import rl "github.com/gen2brain/raylib-go/raylib" // The square that will be displayed at the screen type Tile interface { Update() Draw() } type StandardTile struct { X float32 Y float32 ParentWorld *World Descriptor TileDescriptor } func (base *StandardTile) Update() { } func (base *StandardTile) Draw() { rl.DrawTexture(base.ParentWorld.Textures[base.Descriptor.TextureId], int32(base.X) * int32(base.ParentWorld.TileSize.X), int32(base.Y) * int32(base.ParentWorld.TileSize.Y), rl.White) } type TileDescriptor struct { TextureId int `json:"textureid"` }