Made ultra berries give you +5 score instead of +1

progress ahahaha (making the actual boost is gonna be so fun trust)
This commit is contained in:
Puppet committed 2025-10-08 22:09:03 -07:00
1 parent 80646fadbf
commit b0af899416
1 file changed
+14 -2
+14 -2
View File
@@ -2,10 +2,22 @@ using Godot;
using System;
public partial class BerryLogic : Node2D {
string BerryType = "";
private void _on_hitbox_area_entered(Area2D area) {
Globals.Score += 1;
Texture2D Sprite = GetNode<Sprite2D>("Sprite").Texture;
string BerryTexturesFolder = "res://Textures/Berries/";
if (Sprite == GD.Load(BerryTexturesFolder + "Berry.png")) {
BerryType = "normal";
} else if (Sprite == GD.Load(BerryTexturesFolder + "UltraBerry.png")) {
BerryType = "ultra";
}
int ScoreAdder = (BerryType == "normal") ? 1 : 5;
Globals.Score += ScoreAdder;
if (Globals.Score > Globals.HighScore) {
Globals.HighScore += 1;
Globals.HighScore += ScoreAdder;
}
QueueFree();