I'll try to better explain my idea.
The world ground can have different types of tiles: grass, rock, sand, water, and swamp.
At the moment I've created a ground_tile.gd script containing:
extends Spatial
class_name GroundTile
func _exit_tree():
self.queue_free()
# other things shared by each kind of tile
This script is not attached to any node.
Then I have the tiles scripts which look like this:
extends GroundTile
class_name GrassTile
const walkable : bool = true
const navigable : bool = false
const speedModifier : float = 1.0
# Some functions below
This grass tile is a scene that has a Spacial as root (the script is attached here), then a mesh, a static body, and a collision shape.
Do you think I should change what the scripts extend?