diff --git a/Scripts/Berries.cs b/Scripts/Berries.cs index 2cfbd1e..e84d0b0 100644 --- a/Scripts/Berries.cs +++ b/Scripts/Berries.cs @@ -25,8 +25,12 @@ public partial class Berries : Node2D { int BerryChance = new Random().Next(1, 101); - if (BerryChance <= 80) { + if (BerryChance <= 60) { BerrySprite.Texture = (Texture2D)GD.Load("res://Textures/Berries/Berry.png"); + } else if (BerryChance <= 80) { + BerrySprite.Texture = (Texture2D)GD.Load("res://Textures/Berries/PoisonBerry.png"); + } else if (BerryChance <= 90) { + BerrySprite.Texture = (Texture2D)GD.Load("res://Textures/Berries/SlowBerry.png"); } else { BerrySprite.Texture = (Texture2D)GD.Load("res://Textures/Berries/UltraBerry.png"); } diff --git a/Scripts/BerryLogic.cs b/Scripts/BerryLogic.cs index 5c0b7eb..1f42619 100644 --- a/Scripts/BerryLogic.cs +++ b/Scripts/BerryLogic.cs @@ -12,9 +12,15 @@ public partial class BerryLogic : Node2D { BerryType = "normal"; } else if (Sprite == GD.Load(BerryTexturesFolder + "UltraBerry.png")) { BerryType = "ultra"; + } else if (Sprite == GD.Load(BerryTexturesFolder + "PoisonBerry.png")) { + BerryType = "poison"; + } else if (Sprite == GD.Load(BerryTexturesFolder + "SlowBerry.png")) { + BerryType = "slow"; } - int ScoreAdder = (BerryType == "normal") ? 1 : 5; + int ScoreAdder = (BerryType == "normal") ? 1 : + (BerryType == "poison" || BerryType == "slow") ? 0 : 5; + Globals.Score += ScoreAdder; if (Globals.Score > Globals.HighScore) { Globals.HighScore += ScoreAdder; diff --git a/Textures/Berries/PoisonBerry.png b/Textures/Berries/PoisonBerry.png new file mode 100644 index 0000000..67d44f5 Binary files /dev/null and b/Textures/Berries/PoisonBerry.png differ diff --git a/Textures/Berries/PoisonBerry.png.import b/Textures/Berries/PoisonBerry.png.import new file mode 100644 index 0000000..e10050f --- /dev/null +++ b/Textures/Berries/PoisonBerry.png.import @@ -0,0 +1,40 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://bvu3n2fk78yqk" +path="res://.godot/imported/PoisonBerry.png-759f283b610a183e3850b34f58fa3f75.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://Textures/Berries/PoisonBerry.png" +dest_files=["res://.godot/imported/PoisonBerry.png-759f283b610a183e3850b34f58fa3f75.ctex"] + +[params] + +compress/mode=0 +compress/high_quality=false +compress/lossy_quality=0.7 +compress/uastc_level=0 +compress/rdo_quality_loss=0.0 +compress/hdr_compression=1 +compress/normal_map=0 +compress/channel_pack=0 +mipmaps/generate=false +mipmaps/limit=-1 +roughness/mode=0 +roughness/src_normal="" +process/channel_remap/red=0 +process/channel_remap/green=1 +process/channel_remap/blue=2 +process/channel_remap/alpha=3 +process/fix_alpha_border=true +process/premult_alpha=false +process/normal_map_invert_y=false +process/hdr_as_srgb=false +process/hdr_clamp_exposure=false +process/size_limit=0 +detect_3d/compress_to=1 diff --git a/Textures/Berries/SlowBerry.png b/Textures/Berries/SlowBerry.png new file mode 100644 index 0000000..2c30be4 Binary files /dev/null and b/Textures/Berries/SlowBerry.png differ diff --git a/Textures/Berries/SlowBerry.png.import b/Textures/Berries/SlowBerry.png.import new file mode 100644 index 0000000..95fab69 --- /dev/null +++ b/Textures/Berries/SlowBerry.png.import @@ -0,0 +1,40 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://d37800kyp1iu7" +path="res://.godot/imported/SlowBerry.png-38514d0bf7dce3a7bb98a8b70d88f7e4.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://Textures/Berries/SlowBerry.png" +dest_files=["res://.godot/imported/SlowBerry.png-38514d0bf7dce3a7bb98a8b70d88f7e4.ctex"] + +[params] + +compress/mode=0 +compress/high_quality=false +compress/lossy_quality=0.7 +compress/uastc_level=0 +compress/rdo_quality_loss=0.0 +compress/hdr_compression=1 +compress/normal_map=0 +compress/channel_pack=0 +mipmaps/generate=false +mipmaps/limit=-1 +roughness/mode=0 +roughness/src_normal="" +process/channel_remap/red=0 +process/channel_remap/green=1 +process/channel_remap/blue=2 +process/channel_remap/alpha=3 +process/fix_alpha_border=true +process/premult_alpha=false +process/normal_map_invert_y=false +process/hdr_as_srgb=false +process/hdr_clamp_exposure=false +process/size_limit=0 +detect_3d/compress_to=1