multiplayer pretty much works now i think

This commit is contained in:
2023-11-17 20:49:38 +11:00
parent 2d123bd731
commit 9cf6944ac8
87 changed files with 1476 additions and 1223 deletions

View File

@ -3,6 +3,8 @@ class_name Projectile
@export var collision_shape : CollisionShape3D
var damage_particle_scene = preload("res://Scenes/damage_particle.tscn")
var owner_id = 0 #should be left unchanged by towers, 1 for host, peer_id on peers
var direction := Vector3.FORWARD
var force := 2.0
var damage := 0.0
@ -18,6 +20,14 @@ func _process(delta: float) -> void:
time_alive += delta
func spawn_damage_indicator(pos):
if damage > 0:
var marker = damage_particle_scene.instantiate()
get_tree().root.add_child(marker)
marker.set_number(damage)
marker.position = pos
func _on_body_entered(_body: Node) -> void:
pass # Replace with function body.