diff options
| author | Physcik <mynameisgennadiy@vk.com> | 2026-01-10 17:27:55 +0500 |
|---|---|---|
| committer | Physcik <mynameisgennadiy@vk.com> | 2026-01-10 17:27:55 +0500 |
| commit | a364d4330dfd34f953f64e90020f8b8d6f2e82c4 (patch) | |
| tree | db71d125f633832b130821f3aec07d4b714ab7bb /engine/Components/World/Descriptor.go | |
| parent | e6ccb74f77d0d03d33c422ca7dc942422074d7dd (diff) | |
World storage system change
Diffstat (limited to 'engine/Components/World/Descriptor.go')
| -rw-r--r-- | engine/Components/World/Descriptor.go | 29 |
1 files changed, 0 insertions, 29 deletions
diff --git a/engine/Components/World/Descriptor.go b/engine/Components/World/Descriptor.go deleted file mode 100644 index 553aa5b..0000000 --- a/engine/Components/World/Descriptor.go +++ /dev/null @@ -1,29 +0,0 @@ -package world - -import rl "github.com/gen2brain/raylib-go/raylib" - -type Descriptor struct { - TileSize rl.Vector2 - Textures map[int]string `json:"textures"` - WorldMap [][]TileDescriptor `json:"worldmap"` -} - -func (base *Descriptor) GenerateMap() *World { - var outp = &World { - TileSize: base.TileSize, - TextureNames: base.Textures, - Tiles: make([][]Tile, len(base.WorldMap)), - } - for x := range base.WorldMap { - outp.Tiles[x] = make([]Tile, len(base.WorldMap[x])) - for y, tile := range base.WorldMap[x] { - outp.Tiles[x][y] = &StandardTile { - X: float32(x), - Y: float32(y), - ParentWorld: outp, - Descriptor: tile, - } - } - } - return outp -} |
