15 lines
484 B
GDScript3
15 lines
484 B
GDScript3
|
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)
|