Added fps counter
for some reason high score just wont save and the ultra berry doesnt give u score but I am NOT fucking dealing with this rn cuz I'm already in a horrible mood.
This commit is contained in:
1 parent
cbefe77af7
commit
b67f9ca2d4
3 files changed
+45
-15
No files matched your search
+26
-15
@@ -1,4 +1,4 @@
|
||||
[gd_scene load_steps=17 format=3 uid="uid://bgt46l5p8qrwc"]
|
||||
[gd_scene format=3 uid="uid://bgt46l5p8qrwc"]
|
||||
|
||||
[ext_resource type="Script" uid="uid://dfv3cmvcskd6t" path="res://Scripts/Player.cs" id="1_gl6un"]
|
||||
[ext_resource type="Texture2D" uid="uid://5ecdlqnn0u6g" path="res://Textures/Icons/Bird1.png" id="1_iukft"]
|
||||
@@ -8,6 +8,7 @@
|
||||
[ext_resource type="AudioStream" uid="uid://7ahbsuq3jt4v" path="res://Audio/SFX/Jump.mp3" id="4_wxwew"]
|
||||
[ext_resource type="AudioStream" uid="uid://cryo6mtltnnyk" path="res://Audio/Music/Game/PixelPeekerPolka.mp3" id="6_fgofq"]
|
||||
[ext_resource type="AudioStream" uid="uid://btl7lrqmikaro" path="res://Audio/Music/Game/FluffingADuck.mp3" id="7_2irst"]
|
||||
[ext_resource type="Script" uid="uid://c6eb8owotqy45" path="res://Scripts/Fps.cs" id="7_acvyw"]
|
||||
[ext_resource type="AudioStream" uid="uid://js133askfgfd" path="res://Audio/Music/Game/AmazingPlan.mp3" id="8_3cx6b"]
|
||||
[ext_resource type="AudioStream" uid="uid://dnnjkxgsh0vf6" path="res://Audio/Music/Game/Hyperfun.mp3" id="9_wxwew"]
|
||||
[ext_resource type="AudioStream" uid="uid://cds2k1ijtf5ol" path="res://Audio/Music/Game/QuirkyDog.mp3" id="10_acvyw"]
|
||||
@@ -30,37 +31,37 @@ stream_5 = ExtResource("11_alh3a")
|
||||
stream_6 = ExtResource("12_4q8tf")
|
||||
stream_7 = ExtResource("13_x3xnh")
|
||||
|
||||
[node name="Game" type="Node2D"]
|
||||
[node name="Game" type="Node2D" unique_id=859033263]
|
||||
|
||||
[node name="Center" type="Node2D" parent="."]
|
||||
[node name="Center" type="Node2D" parent="." unique_id=2117748061]
|
||||
position = Vector2(960, 540)
|
||||
|
||||
[node name="Berries" type="Node2D" parent="."]
|
||||
[node name="Berries" type="Node2D" parent="." unique_id=1540125835]
|
||||
position = Vector2(960, 0)
|
||||
script = ExtResource("1_kldst")
|
||||
|
||||
[node name="Player" type="Node2D" parent="."]
|
||||
[node name="Player" type="Node2D" parent="." unique_id=930665884]
|
||||
position = Vector2(960, 978)
|
||||
script = ExtResource("1_gl6un")
|
||||
|
||||
[node name="Texture" type="Sprite2D" parent="Player"]
|
||||
[node name="Texture" type="Sprite2D" parent="Player" unique_id=1806119991]
|
||||
texture_filter = 3
|
||||
scale = Vector2(1.675, 1.675)
|
||||
texture = ExtResource("1_iukft")
|
||||
|
||||
[node name="Hitbox" type="Area2D" parent="Player"]
|
||||
[node name="Hitbox" type="Area2D" parent="Player" unique_id=325775908]
|
||||
position = Vector2(-5, 23)
|
||||
|
||||
[node name="CollisionShape2D" type="CollisionShape2D" parent="Player/Hitbox"]
|
||||
[node name="CollisionShape2D" type="CollisionShape2D" parent="Player/Hitbox" unique_id=1123246713]
|
||||
shape = SubResource("CircleShape2D_j5yw3")
|
||||
debug_color = Color(1, 1, 1, 0.188235)
|
||||
|
||||
[node name="JumpSoundPlayer" type="AudioStreamPlayer" parent="Player"]
|
||||
[node name="JumpSoundPlayer" type="AudioStreamPlayer" parent="Player" unique_id=468694173]
|
||||
stream = ExtResource("4_wxwew")
|
||||
|
||||
[node name="CanvasLayer" type="CanvasLayer" parent="."]
|
||||
[node name="CanvasLayer" type="CanvasLayer" parent="." unique_id=719018327]
|
||||
|
||||
[node name="ScoreText" type="Control" parent="CanvasLayer"]
|
||||
[node name="ScoreText" type="Control" parent="CanvasLayer" unique_id=2115137187]
|
||||
layout_mode = 3
|
||||
anchors_preset = 5
|
||||
anchor_left = 0.5
|
||||
@@ -71,7 +72,7 @@ offset_bottom = 40.0
|
||||
grow_horizontal = 2
|
||||
script = ExtResource("4_b2bpf")
|
||||
|
||||
[node name="ScoreLabel" type="Label" parent="CanvasLayer/ScoreText"]
|
||||
[node name="ScoreLabel" type="Label" parent="CanvasLayer/ScoreText" unique_id=2145902877]
|
||||
layout_mode = 1
|
||||
anchors_preset = 5
|
||||
anchor_left = 0.5
|
||||
@@ -87,7 +88,7 @@ text = "Score: 0"
|
||||
horizontal_alignment = 1
|
||||
vertical_alignment = 1
|
||||
|
||||
[node name="HighScoreLabel" type="Label" parent="CanvasLayer/ScoreText"]
|
||||
[node name="HighScoreLabel" type="Label" parent="CanvasLayer/ScoreText" unique_id=660941160]
|
||||
layout_mode = 1
|
||||
anchors_preset = 5
|
||||
anchor_left = 0.5
|
||||
@@ -104,7 +105,7 @@ text = "High Score: 0"
|
||||
horizontal_alignment = 1
|
||||
vertical_alignment = 1
|
||||
|
||||
[node name="EffectTimerLabel" type="Label" parent="CanvasLayer/ScoreText"]
|
||||
[node name="EffectTimerLabel" type="Label" parent="CanvasLayer/ScoreText" unique_id=684343472]
|
||||
layout_mode = 1
|
||||
anchors_preset = 5
|
||||
anchor_left = 0.5
|
||||
@@ -121,6 +122,16 @@ text = "{Effect} expires in: {Time}"
|
||||
horizontal_alignment = 1
|
||||
vertical_alignment = 1
|
||||
|
||||
[node name="MusicPlayer" type="AudioStreamPlayer" parent="."]
|
||||
[node name="FPS" type="Label" parent="CanvasLayer" unique_id=1751047754]
|
||||
offset_left = 12.0
|
||||
offset_right = 360.0
|
||||
offset_bottom = 137.0
|
||||
scale = Vector2(0.6, 0.6)
|
||||
theme_override_fonts/font = ExtResource("4_kldst")
|
||||
theme_override_font_sizes/font_size = 109
|
||||
text = "FPS: {}"
|
||||
script = ExtResource("7_acvyw")
|
||||
|
||||
[node name="MusicPlayer" type="AudioStreamPlayer" parent="." unique_id=1201627685]
|
||||
stream = SubResource("AudioStreamPlaylist_bf53h")
|
||||
autoplay = true
|
||||
@@ -0,0 +1,18 @@
|
||||
using Godot;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
|
||||
public partial class Fps : Label {
|
||||
public override void _Ready() {
|
||||
List<string> settings = Utils.LoadSettings();
|
||||
bool showFPS = settings.ElementAtOrDefault(2) == "1";
|
||||
|
||||
if (!showFPS) {
|
||||
Visible = false;
|
||||
}
|
||||
}
|
||||
|
||||
public override void _Process(double delta) {
|
||||
Text = "FPS: " + Engine.GetFramesPerSecond();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1 @@
|
||||
uid://c6eb8owotqy45
|
||||
Reference in new issue
Block a user