game: add xp orbs
This commit is contained in:
@@ -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()
|
||||
|
Reference in New Issue
Block a user