Added the speedy berry
yes ik I have only added stuff from the original bd so far but at some point I do I want to add some original stuff
This commit is contained in:
1 parent
e42d348986
commit
4593f4f122
9 files changed
+92
-6
No files matched your search
Binary file not shown.
@@ -0,0 +1,19 @@
|
|||||||
|
[remap]
|
||||||
|
|
||||||
|
importer="mp3"
|
||||||
|
type="AudioStreamMP3"
|
||||||
|
uid="uid://h30kjognr1ec"
|
||||||
|
path="res://.godot/imported/SpeedyPowerup.mp3-e55f1a146993871f804b79de7cabea2e.mp3str"
|
||||||
|
|
||||||
|
[deps]
|
||||||
|
|
||||||
|
source_file="res://Audio/SFX/SpeedyPowerup.mp3"
|
||||||
|
dest_files=["res://.godot/imported/SpeedyPowerup.mp3-e55f1a146993871f804b79de7cabea2e.mp3str"]
|
||||||
|
|
||||||
|
[params]
|
||||||
|
|
||||||
|
loop=false
|
||||||
|
loop_offset=0
|
||||||
|
bpm=0
|
||||||
|
beat_count=0
|
||||||
|
bar_beats=4
|
||||||
+6
-4
@@ -8,7 +8,7 @@ public partial class Berries : Node2D {
|
|||||||
Vector2 Pos = Position;
|
Vector2 Pos = Position;
|
||||||
|
|
||||||
if (!Globals.IsPaused) {
|
if (!Globals.IsPaused) {
|
||||||
Pos.Y += 500f * (float)delta;
|
Pos.Y += Globals.BerrySpeed * (float)delta;
|
||||||
|
|
||||||
SpawnBerryTimer += (float)delta;
|
SpawnBerryTimer += (float)delta;
|
||||||
}
|
}
|
||||||
@@ -30,12 +30,14 @@ public partial class Berries : Node2D {
|
|||||||
|
|
||||||
if (BerryChance <= 60) {
|
if (BerryChance <= 60) {
|
||||||
BerrySprite.Texture = (Texture2D)GD.Load("res://Textures/Berries/Berry.png");
|
BerrySprite.Texture = (Texture2D)GD.Load("res://Textures/Berries/Berry.png");
|
||||||
} else if (BerryChance <= 80) {
|
} else if (BerryChance <= 75) {
|
||||||
BerrySprite.Texture = (Texture2D)GD.Load("res://Textures/Berries/PoisonBerry.png");
|
BerrySprite.Texture = (Texture2D)GD.Load("res://Textures/Berries/PoisonBerry.png");
|
||||||
} else if (BerryChance <= 90) {
|
} else if (BerryChance <= 85) {
|
||||||
BerrySprite.Texture = (Texture2D)GD.Load("res://Textures/Berries/SlowBerry.png");
|
BerrySprite.Texture = (Texture2D)GD.Load("res://Textures/Berries/SlowBerry.png");
|
||||||
} else {
|
} else if (BerryChance <= 95) {
|
||||||
BerrySprite.Texture = (Texture2D)GD.Load("res://Textures/Berries/UltraBerry.png");
|
BerrySprite.Texture = (Texture2D)GD.Load("res://Textures/Berries/UltraBerry.png");
|
||||||
|
} else {
|
||||||
|
BerrySprite.Texture = (Texture2D)GD.Load("res://Textures/Berries/SpeedyBerry.png");
|
||||||
}
|
}
|
||||||
|
|
||||||
AddChild(BerryInstance);
|
AddChild(BerryInstance);
|
||||||
|
|||||||
+16
-1
@@ -16,10 +16,13 @@ public partial class BerryLogic : Node2D {
|
|||||||
BerryType = "poison";
|
BerryType = "poison";
|
||||||
} else if (Sprite == GD.Load(BerryTexturesFolder + "SlowBerry.png")) {
|
} else if (Sprite == GD.Load(BerryTexturesFolder + "SlowBerry.png")) {
|
||||||
BerryType = "slow";
|
BerryType = "slow";
|
||||||
|
} else if (Sprite == GD.Load(BerryTexturesFolder + "SpeedyBerry.png")) {
|
||||||
|
BerryType = "speedy";
|
||||||
}
|
}
|
||||||
|
|
||||||
int ScoreAdder = (BerryType == "normal") ? 1 :
|
int ScoreAdder = (BerryType == "normal") ? 1 :
|
||||||
(BerryType == "poison" || BerryType == "slow") ? 0 : 5;
|
(BerryType == "poison" || BerryType == "slow") ? 0 :
|
||||||
|
(BerryType == "speedy") ? 10 : 0;
|
||||||
|
|
||||||
Globals.Score += ScoreAdder;
|
Globals.Score += ScoreAdder;
|
||||||
if (Globals.Score > Globals.HighScore) {
|
if (Globals.Score > Globals.HighScore) {
|
||||||
@@ -64,6 +67,18 @@ public partial class BerryLogic : Node2D {
|
|||||||
BerrySoundPlayer.Stream = (AudioStream)GD.Load("res://Audio/SFX/Powerup.mp3");
|
BerrySoundPlayer.Stream = (AudioStream)GD.Load("res://Audio/SFX/Powerup.mp3");
|
||||||
BerrySoundPlayer.VolumeDb = Globals.SoundEffectVolume * 0.005f;
|
BerrySoundPlayer.VolumeDb = Globals.SoundEffectVolume * 0.005f;
|
||||||
BerrySoundPlayer.Play();
|
BerrySoundPlayer.Play();
|
||||||
|
} else if (BerryType == "speedy") {
|
||||||
|
if (Globals.ActiveEffect == "speedy") {
|
||||||
|
Globals.EffectTimer += 10f;
|
||||||
|
} else {
|
||||||
|
Globals.EffectTimer = 10f;
|
||||||
|
}
|
||||||
|
|
||||||
|
Globals.ActiveEffect = "speedy";
|
||||||
|
|
||||||
|
BerrySoundPlayer.Stream = (AudioStream)GD.Load("res://Audio/SFX/SpeedyPowerup.mp3");
|
||||||
|
BerrySoundPlayer.VolumeDb = Globals.SoundEffectVolume * 0.005f;
|
||||||
|
BerrySoundPlayer.Play();
|
||||||
}
|
}
|
||||||
|
|
||||||
QueueFree();
|
QueueFree();
|
||||||
|
|||||||
+3
-1
@@ -8,10 +8,12 @@ public partial class Globals : Node {
|
|||||||
|
|
||||||
public static float MovementSpeed = 800f;
|
public static float MovementSpeed = 800f;
|
||||||
public static float DefaultMovementSpeed = MovementSpeed;
|
public static float DefaultMovementSpeed = MovementSpeed;
|
||||||
|
public static float BerrySpeed = 500f;
|
||||||
|
public static float DefaultBerrySpeed = BerrySpeed;
|
||||||
public static float JumpHeight = -1100f;
|
public static float JumpHeight = -1100f;
|
||||||
public static float DefaultJumpHeight = JumpHeight;
|
public static float DefaultJumpHeight = JumpHeight;
|
||||||
public static float Gravity = 3000f;
|
public static float Gravity = 3000f;
|
||||||
public static float DefaultGravity = JumpHeight;
|
public static float DefaultGravity = Gravity;
|
||||||
|
|
||||||
public static string ActiveEffect = "none";
|
public static string ActiveEffect = "none";
|
||||||
public static float EffectTimer = 0f;
|
public static float EffectTimer = 0f;
|
||||||
|
|||||||
@@ -63,10 +63,16 @@ public partial class Player : Node2D {
|
|||||||
|
|
||||||
if (Globals.ActiveEffect == "none") {
|
if (Globals.ActiveEffect == "none") {
|
||||||
Globals.MovementSpeed = Globals.DefaultMovementSpeed;
|
Globals.MovementSpeed = Globals.DefaultMovementSpeed;
|
||||||
|
Globals.BerrySpeed = Globals.DefaultBerrySpeed;
|
||||||
} else if (Globals.ActiveEffect == "ultra") {
|
} else if (Globals.ActiveEffect == "ultra") {
|
||||||
Globals.MovementSpeed = Globals.DefaultMovementSpeed * 2f;
|
Globals.MovementSpeed = Globals.DefaultMovementSpeed * 2f;
|
||||||
|
Globals.BerrySpeed = Globals.DefaultBerrySpeed;
|
||||||
} else if (Globals.ActiveEffect == "slow") {
|
} else if (Globals.ActiveEffect == "slow") {
|
||||||
Globals.MovementSpeed = Globals.DefaultMovementSpeed / 2f;
|
Globals.MovementSpeed = Globals.DefaultMovementSpeed / 2f;
|
||||||
|
Globals.BerrySpeed = Globals.DefaultBerrySpeed;
|
||||||
|
} else if (Globals.ActiveEffect == "speedy") {
|
||||||
|
Globals.MovementSpeed = Globals.DefaultMovementSpeed * 2f;
|
||||||
|
Globals.BerrySpeed = Globals.DefaultBerrySpeed * 2f;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (Input.IsActionJustPressed("EscapeKey") && !Globals.IsPaused) {
|
if (Input.IsActionJustPressed("EscapeKey") && !Globals.IsPaused) {
|
||||||
|
|||||||
@@ -18,6 +18,8 @@ public partial class ScoreText : Control {
|
|||||||
EffectTimerType = "Boost";
|
EffectTimerType = "Boost";
|
||||||
} else if (Globals.ActiveEffect == "slow") {
|
} else if (Globals.ActiveEffect == "slow") {
|
||||||
EffectTimerType = "Slowness";
|
EffectTimerType = "Slowness";
|
||||||
|
} else if (Globals.ActiveEffect == "speedy") {
|
||||||
|
EffectTimerType = "Speed";
|
||||||
}
|
}
|
||||||
EffectTimerText.Text = EffectTimerType + " " + "expires in: " + Math.Floor(Globals.EffectTimer * 10) / 10 + "s";
|
EffectTimerText.Text = EffectTimerType + " " + "expires in: " + Math.Floor(Globals.EffectTimer * 10) / 10 + "s";
|
||||||
}
|
}
|
||||||
|
|||||||
Binary file not shown.
|
After Width: | Height: | Size: 4.2 KiB |
@@ -0,0 +1,40 @@
|
|||||||
|
[remap]
|
||||||
|
|
||||||
|
importer="texture"
|
||||||
|
type="CompressedTexture2D"
|
||||||
|
uid="uid://hageqmoifhi0"
|
||||||
|
path="res://.godot/imported/SpeedyBerry.png-a079224e8c8fcc7e19c102d568e0f0c0.ctex"
|
||||||
|
metadata={
|
||||||
|
"vram_texture": false
|
||||||
|
}
|
||||||
|
|
||||||
|
[deps]
|
||||||
|
|
||||||
|
source_file="res://Textures/Berries/SpeedyBerry.png"
|
||||||
|
dest_files=["res://.godot/imported/SpeedyBerry.png-a079224e8c8fcc7e19c102d568e0f0c0.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