summaryrefslogtreecommitdiff
path: root/Units
diff options
context:
space:
mode:
Diffstat (limited to 'Units')
-rw-r--r--Units/Unit.gd17
1 files changed, 1 insertions, 16 deletions
diff --git a/Units/Unit.gd b/Units/Unit.gd
index 3b91d73..06cf346 100644
--- a/Units/Unit.gd
+++ b/Units/Unit.gd
@@ -68,6 +68,7 @@ func _ready():
if not target:
target = Client.stage.get_node("%Goal").path_position
+ line.name = "Line@" + name
Client.stage.units.add_child(line)
reset_path()
@@ -160,7 +161,6 @@ func _on_navigation_base_area_entered(area: Area2D):
if area.is_in_group("goal"):
Client.player.score += 1
- Client.update_player()
queue_free()
if area.is_in_group("path"):
var path_node: PathNode = area.get_parent()
@@ -279,24 +279,9 @@ func _on_tree_exiting() -> void:
is_selected = false
line.queue_free()
- #if get_multiplayer_authority() == multiplayer.get_unique_id():
Network.remove_unit.rpc(get_path())
-func get_rpc_properties():
- return {
- #"name": null,
- #"global_position": null,
- #"target": "res://Stages/Paths/PathNode.tscn",
- #"hp": null,
- #"speed": null,
- #"current_path": null,
- #"current_path_idx": null,
- #"sprite": "node://Sprite2D",
- #"owner_id": null,
- }
-
-
class NetworkData extends Resource:
var name: String
var position: Vector2