hooray! simplex noise

This commit is contained in:
zoe 2022-05-13 18:45:53 +02:00
parent c2c9d9b3e3
commit b6fbb204f1
10 changed files with 189 additions and 108 deletions

View file

@ -2,7 +2,7 @@ extends TileMap
func set_tile_graphics(pos: Vector2, id: int):
if id == 0: set_cellv(pos, -1)
set_cellv(pos,0,false,false,false,get_atlas_vec_for_id(id))
set_cellv(pos,id,false,false,false,get_variant())
func get_atlas_vec_for_id(id: int) -> Vector2:
return Vector2(randi() % 4, id)
func get_variant() -> Vector2:
return Vector2(randi() % 4, 0)