diff --git a/Game Scenes/Game.tscn b/Game Scenes/Game.tscn index 88d59e7..586fff5 100644 --- a/Game Scenes/Game.tscn +++ b/Game Scenes/Game.tscn @@ -1,7 +1,8 @@ -[gd_scene load_steps=4 format=2] +[gd_scene load_steps=5 format=2] [ext_resource path="res://Objects/Rocket.tscn" type="PackedScene" id=1] [ext_resource path="res://Scripts/Rocket.gd" type="Script" id=2] +[ext_resource path="res://Images and Anims/In Game/background.png" type="Texture" id=3] [ext_resource path="res://Scripts/AsteroidSpawn.gd" type="Script" id=4] [node name="Game" type="Node2D"] @@ -16,3 +17,13 @@ script = ExtResource( 2 ) offset = Vector2( 0, -220 ) current = true smoothing_enabled = true + +[node name="ParallaxBackground" type="ParallaxBackground" parent="."] + +[node name="ParallaxLayer" type="ParallaxLayer" parent="ParallaxBackground"] +motion_scale = Vector2( 0.01, 0.01 ) + +[node name="Sprite" type="Sprite" parent="ParallaxBackground/ParallaxLayer"] +position = Vector2( 89.4544, -100.794 ) +scale = Vector2( 5, 5 ) +texture = ExtResource( 3 ) diff --git a/Images and Anims/In Game/asteroid.png b/Images and Anims/In Game/asteroid.png index b883187..5106adf 100644 Binary files a/Images and Anims/In Game/asteroid.png and b/Images and Anims/In Game/asteroid.png differ diff --git a/Images and Anims/In Game/background.png b/Images and Anims/In Game/background.png new file mode 100644 index 0000000..6d22a42 Binary files /dev/null and b/Images and Anims/In Game/background.png differ diff --git a/Images and Anims/In Game/background.png.import b/Images and Anims/In Game/background.png.import new file mode 100644 index 0000000..4096086 --- /dev/null +++ b/Images and Anims/In Game/background.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="StreamTexture" +path="res://.import/background.png-c995300afda073f0d5063f1ced985f36.stex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://Images and Anims/In Game/background.png" +dest_files=[ "res://.import/background.png-c995300afda073f0d5063f1ced985f36.stex" ] + +[params] + +compress/mode=0 +compress/lossy_quality=0.7 +compress/hdr_mode=0 +compress/bptc_ldr=0 +compress/normal_map=0 +flags/repeat=0 +flags/filter=true +flags/mipmaps=false +flags/anisotropic=false +flags/srgb=2 +process/fix_alpha_border=true +process/premult_alpha=false +process/HDR_as_SRGB=false +process/invert_color=false +stream=false +size_limit=0 +detect_3d=true +svg/scale=1.0 diff --git a/Images and Anims/In Game/rocket-old.png b/Images and Anims/In Game/rocket-old.png new file mode 100644 index 0000000..c4f12ba Binary files /dev/null and b/Images and Anims/In Game/rocket-old.png differ diff --git a/Images and Anims/In Game/rocket-old.png.import b/Images and Anims/In Game/rocket-old.png.import new file mode 100644 index 0000000..cff5d5a --- /dev/null +++ b/Images and Anims/In Game/rocket-old.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="StreamTexture" +path="res://.import/rocket-old.png-71f0701bb3e585a3ac7d44ac224daa6c.stex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://Images and Anims/In Game/rocket-old.png" +dest_files=[ "res://.import/rocket-old.png-71f0701bb3e585a3ac7d44ac224daa6c.stex" ] + +[params] + +compress/mode=0 +compress/lossy_quality=0.7 +compress/hdr_mode=0 +compress/bptc_ldr=0 +compress/normal_map=0 +flags/repeat=0 +flags/filter=true +flags/mipmaps=false +flags/anisotropic=false +flags/srgb=2 +process/fix_alpha_border=true +process/premult_alpha=false +process/HDR_as_SRGB=false +process/invert_color=false +stream=false +size_limit=0 +detect_3d=true +svg/scale=1.0 diff --git a/Images and Anims/In Game/rocket.png b/Images and Anims/In Game/rocket.png index c4f12ba..9bf7048 100644 Binary files a/Images and Anims/In Game/rocket.png and b/Images and Anims/In Game/rocket.png differ diff --git a/Scripts/AsteroidSpawn.gd b/Scripts/AsteroidSpawn.gd index 870533f..dd804a2 100644 --- a/Scripts/AsteroidSpawn.gd +++ b/Scripts/AsteroidSpawn.gd @@ -7,8 +7,6 @@ var deltaSpawnTime = 1 func _process(delta): spawnTime = 500/get_viewport_rect().size.x * deltaSpawnTime - print(spawnTime) - print(get_viewport_rect().size.x) time += delta if time > spawnTime: time = 0