diff --git a/Images/GodotSplashScreen.png b/Images/GodotSplashScreen.png new file mode 100644 index 0000000..00c9b5b Binary files /dev/null and b/Images/GodotSplashScreen.png differ diff --git a/Images/icon.svg.import b/Images/GodotSplashScreen.png.import similarity index 62% rename from Images/icon.svg.import rename to Images/GodotSplashScreen.png.import index 85d7d40..5666fc4 100644 --- a/Images/icon.svg.import +++ b/Images/GodotSplashScreen.png.import @@ -2,16 +2,16 @@ importer="texture" type="CompressedTexture2D" -uid="uid://6xxwqnfenpax" -path="res://.godot/imported/icon.svg-b7ee14c4fc7622c16acfaa49648fa144.ctex" +uid="uid://bjl6aqcfrfys6" +path="res://.godot/imported/GodotSplashScreen.png-79d6465208962f79bad2642e138cd06a.ctex" metadata={ "vram_texture": false } [deps] -source_file="res://Images/icon.svg" -dest_files=["res://.godot/imported/icon.svg-b7ee14c4fc7622c16acfaa49648fa144.ctex"] +source_file="res://Images/GodotSplashScreen.png" +dest_files=["res://.godot/imported/GodotSplashScreen.png-79d6465208962f79bad2642e138cd06a.ctex"] [params] @@ -32,6 +32,3 @@ 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 diff --git a/Images/icon.svg b/Images/icon.svg deleted file mode 100644 index b370ceb..0000000 --- a/Images/icon.svg +++ /dev/null @@ -1 +0,0 @@ - diff --git a/Scenes/SpaceShooter.tscn b/Scenes/SpaceShooter.tscn index b4abd0e..ca543bb 100644 --- a/Scenes/SpaceShooter.tscn +++ b/Scenes/SpaceShooter.tscn @@ -33,11 +33,19 @@ region_enabled = true region_rect = Rect2(0, 0, 810, 1380) script = ExtResource("3_imgbw") -[node name="Asteroids" type="Node3D" parent="."] +[node name="Asteroids" type="Node3D" parent="." node_paths=PackedStringArray("labelAsteroids")] script = ExtResource("4_pf4xb") asteroids = [ExtResource("5_do6ba"), ExtResource("6_tqoe7"), ExtResource("7_v6ul2")] +labelAsteroids = NodePath("../LabelAsteroids") [node name="BackgroundMusic" type="AudioStreamPlayer" parent="."] stream = ExtResource("8_4ms0p") volume_db = -20.0 autoplay = true + +[node name="LabelAsteroids" type="RichTextLabel" parent="."] +offset_left = 20.0 +offset_top = 20.0 +offset_right = 260.0 +offset_bottom = 40.0 +text = "Asteroids: 0" diff --git a/Scripts/Asteroids.cs b/Scripts/Asteroids.cs index 8e18670..e60672e 100644 --- a/Scripts/Asteroids.cs +++ b/Scripts/Asteroids.cs @@ -5,6 +5,8 @@ using Godot.Collections; public partial class Asteroids : Node3D { [Export] private Array asteroids; [Export] private float spawnRate = 1f; + [Export] private RichTextLabel labelAsteroids; + private float spawnTimer; private int asteroidNumber; public override void _Ready() => spawnTimer = spawnRate; @@ -18,6 +20,7 @@ public partial class Asteroids : Node3D { asteroid.Name = $"Asteroid{asteroidNumber}"; AddChild(asteroid); spawnTimer = spawnRate; + labelAsteroids.Text = $"Asteroids: {asteroidNumber}"; } } } diff --git a/project.godot b/project.godot index a37da46..b7d0b06 100644 --- a/project.godot +++ b/project.godot @@ -14,6 +14,7 @@ config/name="Space Shooter" config/version="0.1" run/main_scene="res://Scenes/SpaceShooter.tscn" config/features=PackedStringArray("4.2", "C#", "Forward Plus") +boot_splash/image="res://Images/GodotSplashScreen.png" config/icon="res://Images/Space-Shooter.png" [display]