random world generation lmao (it is just entirely random)

This commit is contained in:
zoe 2022-05-08 20:40:33 +02:00
parent f2d449a827
commit 61f952664d
2 changed files with 4 additions and 3 deletions

View file

@ -1,8 +1,8 @@
extends TileMap
func set_tile_graphics(pos: Vector2, id: int):
var flip = true
set_cell(pos.x,pos.y,0,false,false,false,get_atlas_vec_for_id(id))
if id == 0: set_cellv(pos, -1)
set_cellv(pos,0,false,false,false,get_atlas_vec_for_id(id))
func get_atlas_vec_for_id(id: int) -> Vector2:
return Vector2(randi() % 4, id)