stick-the-quick/zones/Liquid/VisualLiquid.gd

15 lines
484 B
GDScript3
Raw Permalink Normal View History

extends MeshInstance3D
@export var descriptor: LiquidDescriptor = (
preload("res://zones/Liquid/descriptors/Water.tres")
)
@export var frequency: float = 1.0
@export var wavelength: float = 1.0
@export var amplitude: float = 1.0
func _ready() -> void:
set_instance_shader_parameter(&'color', descriptor.color)
set_instance_shader_parameter(&'frequency', frequency)
set_instance_shader_parameter(&'wavelength', wavelength)
set_instance_shader_parameter(&'amplitude', amplitude)