fuzzyworld

godot-shooter / commit

Getting the objectives gives 5, 10, ... points. And picking up a health gives 1 point.

6b8f57b9ef781aa89921a69d7d075c9d1041a355 · Pavel Safronov · 2023-11-17 14:44:03 -0800 · parents ee6296b3acc6

Getting the objectives gives 5, 10, ... points. And picking up a health gives 1 point.
 scenes/World.gd | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/scenes/World.gd b/scenes/World.gd
index 0f7658d..ad37218 100644
--- a/scenes/World.gd
+++ b/scenes/World.gd
@@ -23,9 +23,10 @@ func enemy_killed(_position: Vector2):
 	player.show_message("Enemy killed!", 1)
 func health_consumed(_data):
 	player.heal(10)
+	player.score += 1
 func gold_consumed(_data):
 	completed_objectives += 1
-	player.score += 1
+	player.score += 5 * (completed_objectives+1)
 func weapon_consumed(data):
 	var weapon: Weapon = data
 	var is_same_weapon = player.weapon.name == weapon.name