codename-routes/godot/world/Tilemap.gd

9 lines
211 B
GDScript
Raw Normal View History

extends TileMap
func set_tile_graphics(pos: Vector2, id: int):
if id == 0: set_cellv(pos, -1)
2022-05-13 16:45:53 +00:00
set_cellv(pos,id,false,false,false,get_variant())
2022-05-08 15:05:33 +00:00
2022-05-13 16:45:53 +00:00
func get_variant() -> Vector2:
return Vector2(randi() % 4, 0)