game: add xp orbs

This commit is contained in:
2025-08-19 16:14:48 +02:00
parent 9f5f628891
commit e3d68b5f2b
6 changed files with 57 additions and 2 deletions

View File

@@ -86,3 +86,11 @@ func get_taunted():
func toggle_god_mode(value: bool):
god_mode = value
func _on_pickup_area_area_entered(area: Area2D) -> void:
var body: XPOrb = area.get_parent()
if body.is_in_group(GlobalConst.GROUP_XP_ORB):
player_stats.current_xp += body.value
GlobalConst.sig_debug_stats_set.emit("player_xp", "%s" % player_stats.current_xp)
body.queue_free()