Added the poison berry and the slow berry
I know these werent in 1.0.2 but I think the game would just be more fun if these were in the game. Also they don't do anything yet but I will add logic for them soon.
This commit is contained in:
1 parent
213dd83e24
commit
fdbbecc83a
6 files changed
+92
-2
No files matched your search
+5
-1
@@ -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");
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 2.1 KiB |
@@ -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
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 4.1 KiB |
@@ -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
|
||||
Reference in new issue
Block a user