From 03c6381e349d9409c1b6be602d600b1a9fbda404 Mon Sep 17 00:00:00 2001 From: Thepuppetqueen57 Date: Tue, 7 Oct 2025 19:06:33 -0700 Subject: [PATCH] Added the ultra berry kinda it does the exact same thing as the normal berry rn but this is progress --- Scripts/Berries.cs | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/Scripts/Berries.cs b/Scripts/Berries.cs index 38b6931..2cfbd1e 100644 --- a/Scripts/Berries.cs +++ b/Scripts/Berries.cs @@ -21,6 +21,16 @@ public partial class Berries : Node2D { BerryInstance.Position = new Vector2(x: new Random().Next(-(ScreenWidth / 2), ScreenWidth / 2), y: -100 - Position.Y); + Sprite2D BerrySprite = BerryInstance.GetNode("Sprite"); + + int BerryChance = new Random().Next(1, 101); + + if (BerryChance <= 80) { + BerrySprite.Texture = (Texture2D)GD.Load("res://Textures/Berries/Berry.png"); + } else { + BerrySprite.Texture = (Texture2D)GD.Load("res://Textures/Berries/UltraBerry.png"); + } + AddChild(BerryInstance); }