Compare commits
13
Commits
1.0.0
..
4c2960ff58
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
4c2960ff58 | ||
|
|
d40b71544b | ||
|
|
304933bb76 | ||
|
|
2fb4c01fd1
|
||
|
|
ac67fcc693 | ||
|
|
1234956f2c | ||
|
|
7374d8f3ca | ||
|
|
d1579075cb
|
||
|
|
82ccb1fca4 | ||
|
|
268b1fd35b | ||
|
|
4593f4f122 | ||
|
|
28b0a1d72b | ||
|
|
e42d348986 |
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
|
||||
@@ -1,4 +1,4 @@
|
||||
<Project Sdk="Godot.NET.Sdk/4.5.0">
|
||||
<Project Sdk="Godot.NET.Sdk/4.6.0">
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net8.0</TargetFramework>
|
||||
<EnableDynamicLoading>true</EnableDynamicLoading>
|
||||
|
||||
@@ -0,0 +1,7 @@
|
||||
<Project Sdk="Godot.NET.Sdk/4.5.0">
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net8.0</TargetFramework>
|
||||
<EnableDynamicLoading>true</EnableDynamicLoading>
|
||||
<RootNamespace>BerryDashGodotRemake</RootNamespace>
|
||||
</PropertyGroup>
|
||||
</Project>
|
||||
@@ -0,0 +1,7 @@
|
||||
<Project Sdk="Godot.NET.Sdk/4.5.1">
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net8.0</TargetFramework>
|
||||
<EnableDynamicLoading>true</EnableDynamicLoading>
|
||||
<RootNamespace>BerryDashGodotRemake</RootNamespace>
|
||||
</PropertyGroup>
|
||||
</Project>
|
||||
@@ -4,13 +4,14 @@
|
||||
[ext_resource type="Texture2D" uid="uid://keupgfuijdl7" path="res://Textures/Berries/Berry.png" id="1_g0wxr"]
|
||||
|
||||
[sub_resource type="CircleShape2D" id="CircleShape2D_0wwwo"]
|
||||
radius = 107.52
|
||||
radius = 68.007355
|
||||
|
||||
[node name="Berry" type="Node2D"]
|
||||
script = ExtResource("1_0wwwo")
|
||||
|
||||
[node name="Sprite" type="Sprite2D" parent="."]
|
||||
scale = Vector2(1.52344, 1.52344)
|
||||
texture_filter = 3
|
||||
scale = Vector2(1.1, 1.1)
|
||||
texture = ExtResource("1_g0wxr")
|
||||
|
||||
[node name="Hitbox" type="Area2D" parent="."]
|
||||
|
||||
+1
-2
@@ -44,6 +44,7 @@ position = Vector2(960, 978)
|
||||
script = ExtResource("1_gl6un")
|
||||
|
||||
[node name="Texture" type="Sprite2D" parent="Player"]
|
||||
texture_filter = 3
|
||||
scale = Vector2(1.675, 1.675)
|
||||
texture = ExtResource("1_iukft")
|
||||
|
||||
@@ -123,5 +124,3 @@ vertical_alignment = 1
|
||||
[node name="MusicPlayer" type="AudioStreamPlayer" parent="."]
|
||||
stream = SubResource("AudioStreamPlaylist_bf53h")
|
||||
autoplay = true
|
||||
|
||||
[node name="BerrySoundPlayer" type="AudioStreamPlayer" parent="."]
|
||||
+3
-25
@@ -1,10 +1,9 @@
|
||||
[gd_scene load_steps=12 format=3 uid="uid://bg4fa11htun38"]
|
||||
[gd_scene load_steps=11 format=3 uid="uid://bg4fa11htun38"]
|
||||
|
||||
[ext_resource type="Script" uid="uid://crsloi4abxhqh" path="res://Scripts/LoadSaveFIle.cs" id="1_df05h"]
|
||||
[ext_resource type="Script" uid="uid://cyo278cd6hfm" path="res://Scripts/FirstLoad.cs" id="1_ghw46"]
|
||||
[ext_resource type="FontFile" uid="uid://dq7nkk7n7wrq4" path="res://Fonts/Lexend.ttf" id="1_tt5f1"]
|
||||
[ext_resource type="Script" uid="uid://bc4miccifwrk0" path="res://Scripts/SceneSwitcher.cs" id="2_8saeu"]
|
||||
[ext_resource type="AudioStream" uid="uid://6v4630hrkeg6" path="res://Audio/Music/Menu.mp3" id="2_853f1"]
|
||||
[ext_resource type="Script" uid="uid://c61hc1raouekv" path="res://Scripts/VersionChecker.cs" id="3_ghw46"]
|
||||
|
||||
[sub_resource type="LabelSettings" id="LabelSettings_tt5f1"]
|
||||
font = ExtResource("1_tt5f1")
|
||||
@@ -52,7 +51,7 @@ anchor_right = 1.0
|
||||
anchor_bottom = 1.0
|
||||
grow_horizontal = 2
|
||||
grow_vertical = 2
|
||||
script = ExtResource("1_df05h")
|
||||
script = ExtResource("1_ghw46")
|
||||
|
||||
[node name="Center" type="Control" parent="."]
|
||||
layout_mode = 1
|
||||
@@ -183,30 +182,10 @@ theme_override_styles/normal = SubResource("StyleBoxFlat_tt5f1")
|
||||
theme_override_styles/pressed = SubResource("StyleBoxFlat_8saeu")
|
||||
theme_override_styles/hover = SubResource("StyleBoxFlat_df05h")
|
||||
theme_override_styles/disabled = SubResource("StyleBoxFlat_8um5k")
|
||||
disabled = true
|
||||
text = "Settings"
|
||||
script = ExtResource("2_8saeu")
|
||||
ScenePath = "res://Scenes/Settings.tscn"
|
||||
|
||||
[node name="Label" type="Label" parent="Center/Buttons/HBoxContainer/Settings"]
|
||||
layout_mode = 1
|
||||
anchors_preset = 7
|
||||
anchor_left = 0.5
|
||||
anchor_top = 1.0
|
||||
anchor_right = 0.5
|
||||
anchor_bottom = 1.0
|
||||
offset_left = -250.0
|
||||
offset_top = -57.0
|
||||
offset_right = 250.0
|
||||
grow_horizontal = 2
|
||||
grow_vertical = 0
|
||||
theme_override_colors/font_color = Color(1, 0.9609375, 0, 1)
|
||||
theme_override_fonts/font = ExtResource("1_tt5f1")
|
||||
theme_override_font_sizes/font_size = 35
|
||||
text = "Coming Soon!"
|
||||
horizontal_alignment = 1
|
||||
vertical_alignment = 1
|
||||
|
||||
[node name="VersionText" type="Control" parent="."]
|
||||
layout_mode = 1
|
||||
anchors_preset = 1
|
||||
@@ -215,7 +194,6 @@ anchor_right = 1.0
|
||||
offset_left = -40.0
|
||||
offset_bottom = 40.0
|
||||
grow_horizontal = 0
|
||||
script = ExtResource("3_ghw46")
|
||||
|
||||
[node name="Version" type="Label" parent="VersionText"]
|
||||
layout_mode = 0
|
||||
|
||||
+143
-2
@@ -1,7 +1,10 @@
|
||||
[gd_scene load_steps=6 format=3 uid="uid://ctb5p8ymhcshq"]
|
||||
[gd_scene load_steps=9 format=3 uid="uid://ctb5p8ymhcshq"]
|
||||
|
||||
[ext_resource type="FontFile" uid="uid://dq7nkk7n7wrq4" path="res://Fonts/Lexend.ttf" id="1_flfri"]
|
||||
[ext_resource type="Script" uid="uid://bc4miccifwrk0" path="res://Scripts/SceneSwitcher.cs" id="2_yrknh"]
|
||||
[ext_resource type="Script" uid="uid://jpjswk46hc64" path="res://Scripts/SettingsContainer.cs" id="3_mjqtt"]
|
||||
[ext_resource type="Texture2D" uid="uid://c0gvup8f48soq" path="res://Textures/MenuIcons/square-check-solid-full-recolored.svg" id="3_w1nw0"]
|
||||
[ext_resource type="Texture2D" uid="uid://uph0cthbcrxs" path="res://Textures/MenuIcons/square-solid-full.svg" id="4_mjqtt"]
|
||||
|
||||
[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_w1nw0"]
|
||||
bg_color = Color(1, 1, 1, 1)
|
||||
@@ -24,7 +27,7 @@ anchor_bottom = 1.0
|
||||
grow_horizontal = 2
|
||||
grow_vertical = 2
|
||||
|
||||
[node name="Play" type="Button" parent="."]
|
||||
[node name="Back" type="Button" parent="."]
|
||||
layout_mode = 1
|
||||
offset_left = 40.0
|
||||
offset_top = 40.0
|
||||
@@ -44,3 +47,141 @@ theme_override_styles/hover = SubResource("StyleBoxFlat_ppjuv")
|
||||
text = "Back"
|
||||
script = ExtResource("2_yrknh")
|
||||
ScenePath = "res://Scenes/MainMenu.tscn"
|
||||
|
||||
[node name="SettingsContainer" type="VBoxContainer" parent="."]
|
||||
layout_mode = 1
|
||||
anchors_preset = 8
|
||||
anchor_left = 0.5
|
||||
anchor_top = 0.5
|
||||
anchor_right = 0.5
|
||||
anchor_bottom = 0.5
|
||||
offset_left = -20.0
|
||||
offset_top = -20.0
|
||||
offset_right = -20.0
|
||||
offset_bottom = 20.0
|
||||
grow_horizontal = 2
|
||||
grow_vertical = 2
|
||||
theme_override_constants/separation = 179
|
||||
alignment = 1
|
||||
script = ExtResource("3_mjqtt")
|
||||
|
||||
[node name="Fullscreen" type="Control" parent="SettingsContainer"]
|
||||
layout_mode = 2
|
||||
|
||||
[node name="CheckBox" type="CheckBox" parent="SettingsContainer/Fullscreen"]
|
||||
layout_mode = 1
|
||||
anchors_preset = 6
|
||||
anchor_left = 1.0
|
||||
anchor_top = 0.5
|
||||
anchor_right = 1.0
|
||||
anchor_bottom = 0.5
|
||||
offset_left = -219.0
|
||||
offset_top = -63.0
|
||||
offset_right = -91.0
|
||||
offset_bottom = 65.0
|
||||
grow_horizontal = 0
|
||||
grow_vertical = 2
|
||||
theme_override_constants/icon_max_width = 120
|
||||
theme_override_icons/checked = ExtResource("3_w1nw0")
|
||||
theme_override_icons/unchecked = ExtResource("4_mjqtt")
|
||||
icon_alignment = 1
|
||||
|
||||
[node name="Label" type="Label" parent="SettingsContainer/Fullscreen"]
|
||||
layout_mode = 1
|
||||
anchors_preset = 8
|
||||
anchor_left = 0.5
|
||||
anchor_top = 0.5
|
||||
anchor_right = 0.5
|
||||
anchor_bottom = 0.5
|
||||
offset_left = -59.5
|
||||
offset_top = -47.5
|
||||
offset_right = 309.5
|
||||
offset_bottom = 47.5
|
||||
grow_horizontal = 2
|
||||
grow_vertical = 2
|
||||
theme_override_fonts/font = ExtResource("1_flfri")
|
||||
theme_override_font_sizes/font_size = 76
|
||||
text = "Fullscreen"
|
||||
vertical_alignment = 1
|
||||
|
||||
[node name="VSync" type="Control" parent="SettingsContainer"]
|
||||
layout_mode = 2
|
||||
|
||||
[node name="CheckBox" type="CheckBox" parent="SettingsContainer/VSync"]
|
||||
layout_mode = 1
|
||||
anchors_preset = 6
|
||||
anchor_left = 1.0
|
||||
anchor_top = 0.5
|
||||
anchor_right = 1.0
|
||||
anchor_bottom = 0.5
|
||||
offset_left = -219.0
|
||||
offset_top = -63.0
|
||||
offset_right = -91.0
|
||||
offset_bottom = 65.0
|
||||
grow_horizontal = 0
|
||||
grow_vertical = 2
|
||||
theme_override_constants/icon_max_width = 120
|
||||
theme_override_icons/checked = ExtResource("3_w1nw0")
|
||||
theme_override_icons/unchecked = ExtResource("4_mjqtt")
|
||||
icon_alignment = 1
|
||||
|
||||
[node name="Label" type="Label" parent="SettingsContainer/VSync"]
|
||||
layout_mode = 1
|
||||
anchors_preset = 8
|
||||
anchor_left = 0.5
|
||||
anchor_top = 0.5
|
||||
anchor_right = 0.5
|
||||
anchor_bottom = 0.5
|
||||
offset_left = -59.5
|
||||
offset_top = -47.5
|
||||
offset_right = 309.5
|
||||
offset_bottom = 47.5
|
||||
grow_horizontal = 2
|
||||
grow_vertical = 2
|
||||
theme_override_fonts/font = ExtResource("1_flfri")
|
||||
theme_override_font_sizes/font_size = 76
|
||||
text = "Vsync"
|
||||
vertical_alignment = 1
|
||||
|
||||
[node name="ShowFPS" type="Control" parent="SettingsContainer"]
|
||||
layout_mode = 2
|
||||
|
||||
[node name="CheckBox" type="CheckBox" parent="SettingsContainer/ShowFPS"]
|
||||
layout_mode = 1
|
||||
anchors_preset = 6
|
||||
anchor_left = 1.0
|
||||
anchor_top = 0.5
|
||||
anchor_right = 1.0
|
||||
anchor_bottom = 0.5
|
||||
offset_left = -219.0
|
||||
offset_top = -63.0
|
||||
offset_right = -91.0
|
||||
offset_bottom = 65.0
|
||||
grow_horizontal = 0
|
||||
grow_vertical = 2
|
||||
theme_override_constants/icon_max_width = 120
|
||||
theme_override_icons/checked = ExtResource("3_w1nw0")
|
||||
theme_override_icons/unchecked = ExtResource("4_mjqtt")
|
||||
icon_alignment = 1
|
||||
|
||||
[node name="Label" type="Label" parent="SettingsContainer/ShowFPS"]
|
||||
layout_mode = 1
|
||||
anchors_preset = 8
|
||||
anchor_left = 0.5
|
||||
anchor_top = 0.5
|
||||
anchor_right = 0.5
|
||||
anchor_bottom = 0.5
|
||||
offset_left = -59.5
|
||||
offset_top = -47.5
|
||||
offset_right = 309.5
|
||||
offset_bottom = 47.5
|
||||
grow_horizontal = 2
|
||||
grow_vertical = 2
|
||||
theme_override_fonts/font = ExtResource("1_flfri")
|
||||
theme_override_font_sizes/font_size = 76
|
||||
text = "Show FPS"
|
||||
vertical_alignment = 1
|
||||
|
||||
[connection signal="toggled" from="SettingsContainer/Fullscreen/CheckBox" to="SettingsContainer" method="Fullscreen_Toggled"]
|
||||
[connection signal="toggled" from="SettingsContainer/VSync/CheckBox" to="SettingsContainer" method="VSync_Toggled"]
|
||||
[connection signal="toggled" from="SettingsContainer/ShowFPS/CheckBox" to="SettingsContainer" method="ShowFPS_Toggled"]
|
||||
@@ -1,5 +1,4 @@
|
||||
using Godot;
|
||||
using System;
|
||||
|
||||
public partial class BackToMenuLogic : Control {
|
||||
public void _on_menu_button_up() {
|
||||
|
||||
@@ -2,6 +2,7 @@ using Godot;
|
||||
|
||||
public partial class BazookaManager : Node {
|
||||
public static string HighScore = "0";
|
||||
public static string Settings = "1";
|
||||
|
||||
public static string Read(string saveKey, string defaultValue) {
|
||||
string path = "user://" + saveKey + ".txt";
|
||||
|
||||
+6
-4
@@ -8,7 +8,7 @@ public partial class Berries : Node2D {
|
||||
Vector2 Pos = Position;
|
||||
|
||||
if (!Globals.IsPaused) {
|
||||
Pos.Y += 500f * (float)delta;
|
||||
Pos.Y += Globals.BerrySpeed * (float)delta;
|
||||
|
||||
SpawnBerryTimer += (float)delta;
|
||||
}
|
||||
@@ -30,12 +30,14 @@ public partial class Berries : Node2D {
|
||||
|
||||
if (BerryChance <= 60) {
|
||||
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");
|
||||
} else if (BerryChance <= 90) {
|
||||
} else if (BerryChance <= 85) {
|
||||
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");
|
||||
} else {
|
||||
BerrySprite.Texture = (Texture2D)GD.Load("res://Textures/Berries/SpeedyBerry.png");
|
||||
}
|
||||
|
||||
AddChild(BerryInstance);
|
||||
|
||||
+28
-15
@@ -1,9 +1,18 @@
|
||||
using Godot;
|
||||
using System;
|
||||
|
||||
public partial class BerryLogic : Node2D {
|
||||
string BerryType = "";
|
||||
|
||||
void PlaySound(string path, float volume) {
|
||||
var player = new AudioStreamPlayer();
|
||||
player.Stream = (AudioStream)GD.Load(path);
|
||||
player.VolumeDb = Globals.SoundEffectVolume * (volume / 1000);
|
||||
GetNode<Node2D>("/root/Game").AddChild(player);
|
||||
player.Play();
|
||||
|
||||
player.Finished += () => player.QueueFree(); // clean up after playing
|
||||
}
|
||||
|
||||
private void _on_hitbox_area_entered(Area2D area) {
|
||||
Texture2D Sprite = GetNode<Sprite2D>("Sprite").Texture;
|
||||
|
||||
@@ -16,30 +25,28 @@ public partial class BerryLogic : Node2D {
|
||||
BerryType = "poison";
|
||||
} else if (Sprite == GD.Load(BerryTexturesFolder + "SlowBerry.png")) {
|
||||
BerryType = "slow";
|
||||
} else if (Sprite == GD.Load(BerryTexturesFolder + "SpeedyBerry.png")) {
|
||||
BerryType = "speedy";
|
||||
}
|
||||
|
||||
int ScoreAdder = (BerryType == "normal") ? 1 :
|
||||
(BerryType == "poison" || BerryType == "slow") ? 0 : 5;
|
||||
(BerryType == "poison" || BerryType == "slow") ? 0 :
|
||||
(BerryType == "speedy") ? 10 : 0;
|
||||
|
||||
Globals.Score += ScoreAdder;
|
||||
if (Globals.Score > Globals.HighScore) {
|
||||
Globals.HighScore += ScoreAdder;
|
||||
}
|
||||
|
||||
AudioStreamPlayer BerrySoundPlayer = GetNode<AudioStreamPlayer>("/root/Game/BerrySoundPlayer");
|
||||
if (BerryType == "normal") {
|
||||
BerrySoundPlayer.Stream = (AudioStream)GD.Load("res://Audio/SFX/Eat.mp3");
|
||||
BerrySoundPlayer.VolumeDb = Globals.SoundEffectVolume * 0.08f;
|
||||
BerrySoundPlayer.Play();
|
||||
PlaySound("res://Audio/SFX/Eat.mp3", 80f);
|
||||
} else if (BerryType == "poison") {
|
||||
Globals.EffectTimer = 0f;
|
||||
Globals.Score = 0;
|
||||
|
||||
BazookaManager.Write(BazookaManager.HighScore, Globals.HighScore.ToString());
|
||||
|
||||
BerrySoundPlayer.Stream = (AudioStream)GD.Load("res://Audio/SFX/Death.mp3");
|
||||
BerrySoundPlayer.VolumeDb = Globals.SoundEffectVolume * 0.05f;
|
||||
BerrySoundPlayer.Play();
|
||||
PlaySound("res://Audio/SFX/Death.mp3", 20f);
|
||||
} else if (BerryType == "slow") {
|
||||
if (Globals.ActiveEffect == "slow") {
|
||||
Globals.EffectTimer += 10f;
|
||||
@@ -49,9 +56,7 @@ public partial class BerryLogic : Node2D {
|
||||
|
||||
Globals.ActiveEffect = "slow";
|
||||
|
||||
BerrySoundPlayer.Stream = (AudioStream)GD.Load("res://Audio/SFX/Downgrade.mp3");
|
||||
BerrySoundPlayer.VolumeDb = Globals.SoundEffectVolume * 0.005f;
|
||||
BerrySoundPlayer.Play();
|
||||
PlaySound("res://Audio/SFX/Downgrade.mp3", 5f);
|
||||
} else if (BerryType == "ultra") {
|
||||
if (Globals.ActiveEffect == "ultra") {
|
||||
Globals.EffectTimer += 10f;
|
||||
@@ -61,9 +66,17 @@ public partial class BerryLogic : Node2D {
|
||||
|
||||
Globals.ActiveEffect = "ultra";
|
||||
|
||||
BerrySoundPlayer.Stream = (AudioStream)GD.Load("res://Audio/SFX/Powerup.mp3");
|
||||
BerrySoundPlayer.VolumeDb = Globals.SoundEffectVolume * 0.005f;
|
||||
BerrySoundPlayer.Play();
|
||||
PlaySound("res://Audio/SFX/Powerup.mp3", 5f);
|
||||
} else if (BerryType == "speedy") {
|
||||
if (Globals.ActiveEffect == "speedy") {
|
||||
Globals.EffectTimer += 10f;
|
||||
} else {
|
||||
Globals.EffectTimer = 10f;
|
||||
}
|
||||
|
||||
Globals.ActiveEffect = "speedy";
|
||||
|
||||
PlaySound("res://Audio/SFX/SpeedyPowerup.mp3", 5f);
|
||||
}
|
||||
|
||||
QueueFree();
|
||||
|
||||
@@ -1,25 +1,31 @@
|
||||
using Godot;
|
||||
using System;
|
||||
using System.Text;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
|
||||
public partial class VersionChecker : Control {
|
||||
public partial class FirstLoad : Control {
|
||||
public override void _Ready() {
|
||||
Label VersionLabel = GetNode<Label>("Version");
|
||||
Label VersionLabel = GetNode<Label>("VersionText/Version");
|
||||
string GameVersion = ProjectSettings.GetSetting("application/config/version").AsString();
|
||||
|
||||
VersionLabel.Text = "Version: " + GameVersion;
|
||||
|
||||
if (Globals.VersionChecked) {
|
||||
Label LatestVersionLabel = GetNode<Label>("LatestVersion");
|
||||
if (Globals.FirstLoadDone) {
|
||||
Label LatestVersionLabel = GetNode<Label>("VersionText/LatestVersion");
|
||||
|
||||
LatestVersionLabel.Text = "Latest Version: " + Globals.LatestVersion;
|
||||
} else {
|
||||
HttpRequest GetLatestVersionNode = GetNode<HttpRequest>("LatestVersion/HTTPRequest");
|
||||
//Load settings
|
||||
List<string> settings = Utils.LoadSettings();
|
||||
string fullscreen = settings.ElementAtOrDefault(0) ?? "1";
|
||||
Utils.ToggleFullscreen(fullscreen == "1", settings); //This will also load VSync
|
||||
|
||||
//Version checking
|
||||
HttpRequest GetLatestVersionNode = GetNode<HttpRequest>("VersionText/LatestVersion/HTTPRequest");
|
||||
|
||||
GetLatestVersionNode.RequestCompleted += OnRequestCompleted;
|
||||
|
||||
GetLatestVersionNode.Request("https://games.lncvrt.xyz/database/canLoadClient.php", [
|
||||
GetLatestVersionNode.Request("https://games.lncvrt.xyz/api/can-load-client", [
|
||||
"Requester: BerryDashGodotClient",
|
||||
"ClientVersion: " + GameVersion,
|
||||
"ClientPlatform: " + OS.GetName()
|
||||
@@ -36,11 +42,11 @@ public partial class VersionChecker : Control {
|
||||
Globals.AccessLevel = ResponseValues[0];
|
||||
Globals.LatestVersion = ResponseValues[1];
|
||||
|
||||
Label LatestVersionLabel = GetNode<Label>("LatestVersion");
|
||||
Label LatestVersionLabel = GetNode<Label>("VersionText/LatestVersion");
|
||||
|
||||
LatestVersionLabel.Text = "Latest Version: " + Globals.LatestVersion;
|
||||
|
||||
Globals.VersionChecked = true;
|
||||
Globals.FirstLoadDone = true;
|
||||
|
||||
string GameVersion = ProjectSettings.GetSetting("application/config/version").AsString();
|
||||
|
||||
@@ -0,0 +1 @@
|
||||
uid://cyo278cd6hfm
|
||||
+4
-3
@@ -1,17 +1,18 @@
|
||||
using Godot;
|
||||
using System;
|
||||
|
||||
public partial class Globals : Node {
|
||||
public static string LatestVersion = "";
|
||||
public static string AccessLevel = "";
|
||||
public static bool VersionChecked = false;
|
||||
public static bool FirstLoadDone = false;
|
||||
|
||||
public static float MovementSpeed = 800f;
|
||||
public static float DefaultMovementSpeed = MovementSpeed;
|
||||
public static float BerrySpeed = 500f;
|
||||
public static float DefaultBerrySpeed = BerrySpeed;
|
||||
public static float JumpHeight = -1100f;
|
||||
public static float DefaultJumpHeight = JumpHeight;
|
||||
public static float Gravity = 3000f;
|
||||
public static float DefaultGravity = JumpHeight;
|
||||
public static float DefaultGravity = Gravity;
|
||||
|
||||
public static string ActiveEffect = "none";
|
||||
public static float EffectTimer = 0f;
|
||||
|
||||
@@ -1,8 +1,7 @@
|
||||
using Godot;
|
||||
using System;
|
||||
|
||||
public partial class LoadSaveFIle : Control {
|
||||
public override void _Ready() {
|
||||
Globals.HighScore = int.Parse(BazookaManager.Read(BazookaManager.HighScore, "0"));
|
||||
}
|
||||
public override void _Ready() {
|
||||
Globals.HighScore = int.Parse(BazookaManager.Read(BazookaManager.HighScore, "0"));
|
||||
}
|
||||
}
|
||||
@@ -1,5 +1,4 @@
|
||||
using Godot;
|
||||
using System;
|
||||
|
||||
public partial class OutdatedVersionLogic : Control {
|
||||
public override void _Ready() {
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
using Godot;
|
||||
using System;
|
||||
|
||||
public partial class PauseMenuContinueButton : Button {
|
||||
public void _on_button_up() {
|
||||
|
||||
+9
-4
@@ -1,5 +1,4 @@
|
||||
using Godot;
|
||||
using System;
|
||||
|
||||
public partial class Player : Node2D {
|
||||
private float ScreenBorders = 120f;
|
||||
@@ -21,18 +20,18 @@ public partial class Player : Node2D {
|
||||
Vector2 Pos = Position;
|
||||
|
||||
if (!Globals.IsPaused) {
|
||||
if ((Input.IsKeyPressed((Key)Key.Left) || Input.IsKeyPressed((Key)Key.A)) && Pos.X > ScreenBorders) {
|
||||
if ((Input.IsKeyPressed(Key.Left) || Input.IsKeyPressed(Key.A)) && Pos.X > ScreenBorders) {
|
||||
GetNode<Sprite2D>("Texture").FlipH = false;
|
||||
Pos.X -= Globals.MovementSpeed * (float)delta;
|
||||
}
|
||||
|
||||
float ScreenWidth = (WindowSize.X / WindowScale.X) - ScreenBorders;
|
||||
if ((Input.IsKeyPressed((Key)Key.Right) || Input.IsKeyPressed((Key)Key.D)) && Pos.X < ScreenWidth) {
|
||||
if ((Input.IsKeyPressed(Key.Right) || Input.IsKeyPressed(Key.D)) && Pos.X < ScreenWidth) {
|
||||
GetNode<Sprite2D>("Texture").FlipH = true;
|
||||
Pos.X += Globals.MovementSpeed * (float)delta;
|
||||
}
|
||||
|
||||
if (Input.IsKeyPressed((Key)Key.Space) && Pos.Y >= 976) {
|
||||
if (Input.IsKeyPressed(Key.Space) && Pos.Y >= 976) {
|
||||
VelocityY = Globals.JumpHeight;
|
||||
GetNode<AudioStreamPlayer>("JumpSoundPlayer").Play();
|
||||
}
|
||||
@@ -63,10 +62,16 @@ public partial class Player : Node2D {
|
||||
|
||||
if (Globals.ActiveEffect == "none") {
|
||||
Globals.MovementSpeed = Globals.DefaultMovementSpeed;
|
||||
Globals.BerrySpeed = Globals.DefaultBerrySpeed;
|
||||
} else if (Globals.ActiveEffect == "ultra") {
|
||||
Globals.MovementSpeed = Globals.DefaultMovementSpeed * 2f;
|
||||
Globals.BerrySpeed = Globals.DefaultBerrySpeed;
|
||||
} else if (Globals.ActiveEffect == "slow") {
|
||||
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) {
|
||||
|
||||
@@ -20,4 +20,4 @@ public partial class SceneSwitcher : Button {
|
||||
GD.PrintErr("Failed to change scene: " + error);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -18,6 +18,8 @@ public partial class ScoreText : Control {
|
||||
EffectTimerType = "Boost";
|
||||
} else if (Globals.ActiveEffect == "slow") {
|
||||
EffectTimerType = "Slowness";
|
||||
} else if (Globals.ActiveEffect == "speedy") {
|
||||
EffectTimerType = "Speed";
|
||||
}
|
||||
EffectTimerText.Text = EffectTimerType + " " + "expires in: " + Math.Floor(Globals.EffectTimer * 10) / 10 + "s";
|
||||
}
|
||||
|
||||
@@ -0,0 +1,49 @@
|
||||
using Godot;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
|
||||
public partial class SettingsContainer : VBoxContainer
|
||||
{
|
||||
private static bool ignoreToggle = true;
|
||||
|
||||
public override void _Ready() {
|
||||
List<string> settings = Utils.LoadSettings();
|
||||
|
||||
string fullscreen = settings.ElementAtOrDefault(0) ?? "1";
|
||||
string vsync = settings.ElementAtOrDefault(1) ?? "1";
|
||||
string showfps = settings.ElementAtOrDefault(2) ?? "0";
|
||||
GetNode<CheckBox>("Fullscreen/CheckBox").ButtonPressed = fullscreen == "1";
|
||||
GetNode<CheckBox>("VSync/CheckBox").ButtonPressed = vsync == "1";
|
||||
GetNode<CheckBox>("ShowFPS/CheckBox").ButtonPressed = showfps == "1";
|
||||
|
||||
ignoreToggle = false;
|
||||
}
|
||||
|
||||
public static void Fullscreen_Toggled(bool on)
|
||||
{
|
||||
if (ignoreToggle) return;
|
||||
Toggle(0, on);
|
||||
Utils.ToggleFullscreen(on);
|
||||
}
|
||||
|
||||
public static void VSync_Toggled(bool on)
|
||||
{
|
||||
if (ignoreToggle) return;
|
||||
Toggle(1, on);
|
||||
Utils.ToggleVSync(on);
|
||||
}
|
||||
|
||||
public static void ShowFPS_Toggled(bool on)
|
||||
{
|
||||
if (ignoreToggle) return;
|
||||
Toggle(2, on);
|
||||
}
|
||||
|
||||
private static void Toggle(int id, bool on) {
|
||||
List<string> values = Utils.LoadSettings();
|
||||
while (values.Count <= id) values.Add("0");
|
||||
values[id] = on ? "1" : "0";
|
||||
string newValue = string.Join(":", values);
|
||||
BazookaManager.Write(BazookaManager.Settings, newValue);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1 @@
|
||||
uid://jpjswk46hc64
|
||||
@@ -0,0 +1,30 @@
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using Godot;
|
||||
|
||||
public class Utils {
|
||||
public static void ToggleFullscreen(bool on, List<string> settings)
|
||||
{
|
||||
DisplayServer.WindowSetMode(on ? DisplayServer.WindowMode.Fullscreen : DisplayServer.WindowMode.Maximized);
|
||||
|
||||
string vsync = settings.ElementAtOrDefault(1) ?? "1";
|
||||
ToggleVSync(vsync == "1");
|
||||
}
|
||||
|
||||
public static void ToggleFullscreen(bool on)
|
||||
{
|
||||
List<string> settings = LoadSettings();
|
||||
ToggleFullscreen(on, settings);
|
||||
}
|
||||
|
||||
public static void ToggleVSync(bool on)
|
||||
{
|
||||
DisplayServer.WindowSetVsyncMode(on ? DisplayServer.VSyncMode.Enabled : DisplayServer.VSyncMode.Disabled);
|
||||
}
|
||||
|
||||
public static List<string> LoadSettings() {
|
||||
string value = BazookaManager.Read(BazookaManager.Settings, "");
|
||||
List<string> values = [.. value.Split(':')];
|
||||
return values;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1 @@
|
||||
uid://bnh8syp13bsom
|
||||
@@ -1 +0,0 @@
|
||||
uid://c61hc1raouekv
|
||||
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
|
||||
@@ -0,0 +1 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 640 640"><!--!Font Awesome Free 7.1.0 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free Copyright 2025 Fonticons, Inc.--><path fill="#ffffff" d="M480 96C515.3 96 544 124.7 544 160L544 480C544 515.3 515.3 544 480 544L160 544C124.7 544 96 515.3 96 480L96 160C96 124.7 124.7 96 160 96L480 96zM438 209.7C427.3 201.9 412.3 204.3 404.5 215L285.1 379.2L233 327.1C223.6 317.7 208.4 317.7 199.1 327.1C189.8 336.5 189.7 351.7 199.1 361L271.1 433C276.1 438 283 440.5 289.9 440C296.8 439.5 303.3 435.9 307.4 430.2L443.3 243.2C451.1 232.5 448.7 217.5 438 209.7z"/></svg>
|
||||
|
After Width: | Height: | Size: 649 B |
@@ -0,0 +1,43 @@
|
||||
[remap]
|
||||
|
||||
importer="texture"
|
||||
type="CompressedTexture2D"
|
||||
uid="uid://c0gvup8f48soq"
|
||||
path="res://.godot/imported/square-check-solid-full-recolored.svg-b33662d0953d560bcb9ec3baf78ff230.ctex"
|
||||
metadata={
|
||||
"vram_texture": false
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://Textures/MenuIcons/square-check-solid-full-recolored.svg"
|
||||
dest_files=["res://.godot/imported/square-check-solid-full-recolored.svg-b33662d0953d560bcb9ec3baf78ff230.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
|
||||
svg/scale=1.0
|
||||
editor/scale_with_editor_scale=false
|
||||
editor/convert_colors_with_editor_theme=false
|
||||
@@ -0,0 +1 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 640 640"><!--!Font Awesome Free 7.1.0 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free Copyright 2025 Fonticons, Inc.--><path fill="#ffffff" d="M160 96L480 96C515.3 96 544 124.7 544 160L544 480C544 515.3 515.3 544 480 544L160 544C124.7 544 96 515.3 96 480L96 160C96 124.7 124.7 96 160 96z"/></svg>
|
||||
|
After Width: | Height: | Size: 390 B |
@@ -0,0 +1,43 @@
|
||||
[remap]
|
||||
|
||||
importer="texture"
|
||||
type="CompressedTexture2D"
|
||||
uid="uid://uph0cthbcrxs"
|
||||
path="res://.godot/imported/square-solid-full.svg-b98e84979385e05d7d22bf0a6a2deb14.ctex"
|
||||
metadata={
|
||||
"vram_texture": false
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://Textures/MenuIcons/square-solid-full.svg"
|
||||
dest_files=["res://.godot/imported/square-solid-full.svg-b98e84979385e05d7d22bf0a6a2deb14.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
|
||||
svg/scale=1.0
|
||||
editor/scale_with_editor_scale=false
|
||||
editor/convert_colors_with_editor_theme=false
|
||||
+7
-3
@@ -8,12 +8,16 @@
|
||||
|
||||
config_version=5
|
||||
|
||||
[animation]
|
||||
|
||||
compatibility/default_parent_skeleton_in_mesh_instance_3d=true
|
||||
|
||||
[application]
|
||||
|
||||
config/name="Berry Dash Godot Remake"
|
||||
config/version="1.0.0"
|
||||
run/main_scene="uid://bg4fa11htun38"
|
||||
config/features=PackedStringArray("4.5", "C#", "Mobile")
|
||||
config/features=PackedStringArray("4.6", "C#", "Mobile")
|
||||
config/icon="res://icon.png"
|
||||
|
||||
[autoload]
|
||||
@@ -24,7 +28,7 @@ Globals="*res://Scripts/Globals.cs"
|
||||
|
||||
window/size/viewport_width=1920
|
||||
window/size/viewport_height=1080
|
||||
window/stretch/mode="viewport"
|
||||
window/stretch/mode="canvas_items"
|
||||
window/stretch/aspect="expand"
|
||||
window/vsync/vsync_mode=0
|
||||
|
||||
@@ -43,4 +47,4 @@ EscapeKey={
|
||||
[rendering]
|
||||
|
||||
textures/vram_compression/import_etc2_astc=true
|
||||
environment/defaults/default_clear_color=Color(0.0627451, 0.0627451, 0.0627451, 1)
|
||||
environment/defaults/default_clear_color=Color(0.09411765, 0.09411765, 0.09411765, 1)
|
||||
Reference in new issue
Block a user