diff options
author | Daniel Weipert <git@mail.dweipert.de> | 2024-10-12 13:59:11 +0200 |
---|---|---|
committer | Daniel Weipert <git@mail.dweipert.de> | 2024-10-12 13:59:11 +0200 |
commit | 647e2e1812c00e29337a61560644f7aa91d0eb0f (patch) | |
tree | 7b93c138ba430d7d9692c29cb9be0b5d3fe63e70 /Towers | |
parent | 911699e9563a8791d72173b46fd8860ce15bb91a (diff) |
next commit
Diffstat (limited to 'Towers')
-rw-r--r-- | Towers/Tower.gd | 8 |
1 files changed, 8 insertions, 0 deletions
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): |