diff --git a/Game Scenes/Game.tscn b/Game Scenes/Game.tscn index 3f8adfe..b095a3f 100644 --- a/Game Scenes/Game.tscn +++ b/Game Scenes/Game.tscn @@ -1,10 +1,11 @@ -[gd_scene load_steps=6 format=2] +[gd_scene load_steps=7 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/Game.gd" type="Script" id=4] [ext_resource path="res://Scripts/Score.gd" type="Script" id=5] +[ext_resource path="res://Scripts/CoinLabel.gd" type="Script" id=6] [node name="Game" type="Node2D"] script = ExtResource( 4 ) @@ -19,7 +20,17 @@ offset = Vector2( 0, -220 ) current = true smoothing_enabled = true -[node name="Label" type="Label" parent="Rocket"] +[node name="Coins" type="Label" parent="Rocket/Camera2D"] +margin_left = 166.0 +margin_top = -254.0 +margin_right = 250.0 +margin_bottom = -239.0 +script = ExtResource( 6 ) +__meta__ = { +"_edit_use_anchors_": false +} + +[node name="Score" type="Label" parent="Rocket"] margin_left = 13.0 margin_top = 9.0 margin_right = 44.0 @@ -35,6 +46,7 @@ __meta__ = { motion_scale = Vector2( 0.01, 0.01 ) [node name="Background" type="Sprite" parent="ParallaxBackground/ParallaxLayer"] +visible = false position = Vector2( 89.4544, -100.794 ) scale = Vector2( 5, 5 ) texture = ExtResource( 3 ) diff --git a/Images and Anims/In Game/.DS_Store b/Images and Anims/In Game/.DS_Store index 4aa90a3..b1468d6 100644 Binary files a/Images and Anims/In Game/.DS_Store and b/Images and Anims/In Game/.DS_Store differ diff --git a/Objects/Coin.gd b/Objects/Coin.gd index 15e7c8a..6a4bc17 100644 --- a/Objects/Coin.gd +++ b/Objects/Coin.gd @@ -1,7 +1,6 @@ extends Area2D func _on_Coin_body_entered(body): - print (body.name) if body.name == "Rocket": var numOfCoins = get_parent().get("numOfCoins") numOfCoins += 1 diff --git a/Objects/Coin.tscn b/Objects/Coin.tscn index 04f05bc..d756bf8 100644 --- a/Objects/Coin.tscn +++ b/Objects/Coin.tscn @@ -49,6 +49,5 @@ shape = SubResource( 1 ) scale = Vector2( 2, 2 ) frames = SubResource( 7 ) animation = "Spin" -frame = 2 playing = true [connection signal="body_entered" from="." to="." method="_on_Coin_body_entered"] diff --git a/Scripts/CoinLabel.gd b/Scripts/CoinLabel.gd new file mode 100644 index 0000000..582dab5 --- /dev/null +++ b/Scripts/CoinLabel.gd @@ -0,0 +1,5 @@ +extends Label + +func _process(delta): + var coins = str(get_parent().get_parent().get_parent().get("numOfCoins")) + text = coins diff --git a/export_presets.cfg b/export_presets.cfg index cded969..d4ab7e3 100644 --- a/export_presets.cfg +++ b/export_presets.cfg @@ -7,7 +7,7 @@ custom_features="" export_filter="all_resources" include_filter="" exclude_filter="" -export_path="Builds/macOS/spacescape-macos.dmg" +export_path="../spacescape.dmg" patch_list=PoolStringArray( ) script_export_mode=1 script_encryption_key=""