Godot Version
v4.5.1
Question
I’m creating top down game using TileMapLayer. On layer contains rocks witch could be destroyed and then drop some loot. How could i handle it in proper way? I use Custom Data Layers to set rock max hp, and is mineable flag, and loot type. But what is the best way to handle state of each generated rock so i could detect collision from pickaxe hit, apply dmg, destroy when health is <= 0 and spawn loot.
Are there any ways to dynamically change states of tile map in runtime?