From c0936e947641b8a3eb2fd7a2bf786cd31be52bee Mon Sep 17 00:00:00 2001 From: dusk Date: Fri, 6 Sep 2024 19:16:20 +0900 Subject: [PATCH] feat: push error if either the top left or bottom right markers arent set --- addons/dynamic_water_2d/water.gd | 3 +++ 1 file changed, 3 insertions(+) diff --git a/addons/dynamic_water_2d/water.gd b/addons/dynamic_water_2d/water.gd index e3e30ee..d13afe7 100644 --- a/addons/dynamic_water_2d/water.gd +++ b/addons/dynamic_water_2d/water.gd @@ -113,6 +113,9 @@ func _ready() -> void: ## calculates the extents of the water. func calc_extents() -> void: + if top_left_marker == null or bottom_right_marker == null: + push_error("either top left or bottom right marker is not set") + return top_left_point = top_left_marker.position bottom_right_point = bottom_right_marker.position extents_valid = _validate_extents()