codename-routes/godot/world/Tilemap.gd
2022-05-13 18:45:53 +02:00

8 lines
211 B
GDScript

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