diff options
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): |