From 647e2e1812c00e29337a61560644f7aa91d0eb0f Mon Sep 17 00:00:00 2001 From: Daniel Weipert Date: Sat, 12 Oct 2024 13:59:11 +0200 Subject: next commit --- Towers/Tower.gd | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'Towers') diff --git a/Towers/Tower.gd b/Towers/Tower.gd index 8e22c3e..10753eb 100644 --- a/Towers/Tower.gd +++ b/Towers/Tower.gd @@ -251,6 +251,9 @@ class NetworkData extends Resource: var name: String var position: Vector2 var components: Array + + var sprite_modulate: Color + var components_anchor_modulate: Color func to_network_data() -> NetworkData: var data = NetworkData.new() @@ -261,6 +264,11 @@ func to_network_data() -> NetworkData: return item.name ) + data.sprite_modulate = $Sprite2D.modulate + data.components_anchor_modulate = $ComponentsAnchor.modulate + + # IMPROVEMENT: check against last update and only set changed values + return data func update_with_network_data(data: NetworkData): -- cgit v1.2.3