class_name TerrainPhysics extends Resource
## Container for ball behavior parameters when in contact with different terrain types

@export var default: TerrainParameters

@export var rough: TerrainParameters
@export var fairway: TerrainParameters
@export var green: TerrainParameters
@export var sand: TerrainParameters
@export var concrete: TerrainParameters
@export var rock: TerrainParameters
@export var wood: TerrainParameters
@export var metal: TerrainParameters
@export var glass: TerrainParameters


func get_params(type: Terrain.Type) -> TerrainParameters:
	# NOTE: sure would be nice to just store this in a dict,
	# but that makes editing physics through the editor unweildy.
	match type:
		Terrain.Type.ROUGH:
			return rough
		Terrain.Type.FAIRWAY:
			return fairway
		Terrain.Type.GREEN:
			return green
		Terrain.Type.SAND:
			return sand
		Terrain.Type.CONCRETE:
			return concrete
		Terrain.Type.ROCK:
			return rock
		Terrain.Type.WOOD:
			return wood
		Terrain.Type.METAL:
			return metal
		Terrain.Type.GLASS:
			return glass
		_:
			return default
