Boat/Ocean/WeatherManager.gd

24 lines
503 B
GDScript

@tool
@icon("uid://dsorlwsjw10wl")
extends Node
class_name WeatherManager
@export var OceanRef : Ocean
var OceanShader:ShaderMaterial
@export var weather_preset:WeatherPreset:
set(new_preset):
weather_preset = new_preset
change_weather()
# Called when the node enters the scene tree for the first time.
func _ready() -> void:
if !OceanRef:
print("Error:No Ocean ref !")
queue_free()
return
OceanShader = OceanRef.OceanShader
func change_weather():
# Set OceanShader parameters
pass