made the first changes towards multiplayer working

This commit is contained in:
2023-11-13 19:36:35 +11:00
parent b0f8a37f60
commit f004f64b71
26 changed files with 305 additions and 257 deletions

View File

@ -10,10 +10,10 @@ signal health_changed(health)
var current_health
func take_damage(damage):
var marker = damage_particle_scene.instantiate()
get_tree().root.add_child(marker)
marker.set_number(damage)
marker.position = get_parent().global_position + Vector3.UP
#var marker = damage_particle_scene.instantiate()
#get_tree().root.add_child(marker)
#marker.set_number(damage)
#marker.position = get_parent().global_position + Vector3.UP
current_health -= damage
health_changed.emit(current_health)
@ -25,3 +25,4 @@ func heal_damage(healing):
current_health += healing
if current_health > max_health:
current_health = max_health
health_changed.emit(current_health)