summaryrefslogtreecommitdiff
path: root/Units
diff options
context:
space:
mode:
authorDaniel Weipert <git@mail.dweipert.de>2024-10-10 13:16:33 +0200
committerDaniel Weipert <git@mail.dweipert.de>2024-10-10 13:16:33 +0200
commit911699e9563a8791d72173b46fd8860ce15bb91a (patch)
tree0f62aa539c5662a9cf3a432e83e571631fd3f586 /Units
parent1aac583cee47d232ef22d8c5df97b888f689ab96 (diff)
intermediate commit
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