diff --git a/collectables/crystal/collectableCrystal.tscn b/collectables/crystal/collectableCrystal.tscn index 2da68df..fe2a749 100644 --- a/collectables/crystal/collectableCrystal.tscn +++ b/collectables/crystal/collectableCrystal.tscn @@ -17,7 +17,7 @@ animations = [{ [sub_resource type="CircleShape2D" id="CircleShape2D_lmbvg"] radius = 17.0 -[node name="Area2D" type="Area2D"] +[node name="crystal" type="Area2D"] collision_layer = 0 script = ExtResource("1_ttvq1") diff --git a/levelOne/startLevel.tscn b/levelOne/startLevel.tscn index 26e07a9..0b57268 100644 --- a/levelOne/startLevel.tscn +++ b/levelOne/startLevel.tscn @@ -27,10 +27,10 @@ position = Vector2(498, 169) [node name="Node2D" type="Node2D" parent="."] position = Vector2(304, 494) -[node name="Area2D2" parent="Node2D" instance=ExtResource("3_56573")] +[node name="crystal" parent="Node2D" instance=ExtResource("3_56573")] -[node name="Area2D" parent="Node2D" instance=ExtResource("3_56573")] +[node name="crystal2" parent="Node2D" instance=ExtResource("3_56573")] position = Vector2(87, -71) -[node name="collectableCrystal" parent="Node2D" instance=ExtResource("3_56573")] +[node name="crystal3" parent="Node2D" instance=ExtResource("3_56573")] position = Vector2(97, -254) diff --git a/player/smallPlayer/Score bar.tscn b/player/smallPlayer/Score bar.tscn deleted file mode 100644 index aecee93..0000000 --- a/player/smallPlayer/Score bar.tscn +++ /dev/null @@ -1,18 +0,0 @@ -[gd_scene load_steps=2 format=3 uid="uid://cnvs3iophpe3n"] - -[ext_resource type="Script" uid="uid://biv656fho5bpy" path="res://player/smallPlayer/progress_bar.gd" id="1_qy0dt"] - -[node name="Control" type="Control"] -layout_mode = 3 -anchors_preset = 15 -anchor_right = 1.0 -anchor_bottom = 1.0 -grow_horizontal = 2 -grow_vertical = 2 - -[node name="CanvasLayer" type="CanvasLayer" parent="."] - -[node name="ProgressBar" type="ProgressBar" parent="CanvasLayer"] -offset_right = 367.0 -offset_bottom = 27.0 -script = ExtResource("1_qy0dt") diff --git a/player/smallPlayer/player.tscn b/player/smallPlayer/player.tscn index 94df689..6397e22 100644 --- a/player/smallPlayer/player.tscn +++ b/player/smallPlayer/player.tscn @@ -10,7 +10,7 @@ [ext_resource type="Texture2D" uid="uid://jfhpkm78lqyx" path="res://player/smallPlayer/playerSprites/playerSprite_0007.png" id="8_op7ga"] [ext_resource type="Texture2D" uid="uid://jssqmb4832pr" path="res://player/smallPlayer/playerSprites/playerSprite_0008.png" id="9_q13i1"] [ext_resource type="Texture2D" uid="uid://dxeg6715vly1v" path="res://player/smallPlayer/playerSprites/playerSprite_0009.png" id="10_pylmc"] -[ext_resource type="PackedScene" uid="uid://cnvs3iophpe3n" path="res://player/smallPlayer/Score bar.tscn" id="11_nvl01"] +[ext_resource type="PackedScene" uid="uid://cnvs3iophpe3n" path="res://player/smallPlayer/menus/Score bar.tscn" id="11_nvl01"] [ext_resource type="Texture2D" uid="uid://b8eut6fnru722" path="res://player/smallPlayer/playerSprites/playerSprite_0010.png" id="11_pbfsw"] [sub_resource type="SpriteFrames" id="SpriteFrames_onrkg"] @@ -54,7 +54,7 @@ animations = [{ [sub_resource type="RectangleShape2D" id="RectangleShape2D_i3pqv"] size = Vector2(22, 22) -[node name="CharacterBody2D" type="CharacterBody2D"] +[node name="player" type="CharacterBody2D"] collision_mask = 2 script = ExtResource("1_ivps1") diff --git a/player/smallPlayer/playerScript.gd b/player/smallPlayer/playerScript.gd index 777740e..b84ed03 100644 --- a/player/smallPlayer/playerScript.gd +++ b/player/smallPlayer/playerScript.gd @@ -1,16 +1,10 @@ extends CharacterBody2D const SPEED = 3.0 -func _ready() -> void: - await get_tree().process_frame - var crystals = get_tree().get_nodes_in_group("crystals") - print("Got " + str(crystals.size()) + " crystals") - for crystal in crystals: - print("Connecting crystal: " + crystal.name) - crystal.connect("crystal_picked_up", Callable(self, "collect")) +var Progress + + -func collect(): - print("something") func _physics_process(delta: float) -> void: # Get the input direction and handle the movement/deceleration. diff --git a/player/smallPlayer/progress_bar.gd b/player/smallPlayer/progress_bar.gd deleted file mode 100644 index e64fe92..0000000 --- a/player/smallPlayer/progress_bar.gd +++ /dev/null @@ -1,6 +0,0 @@ -extends ProgressBar - - -# Called when the node enters the scene tree for the first time. -func _ready() -> void: - pass # Replace with function body. diff --git a/player/smallPlayer/progress_bar.gd.uid b/player/smallPlayer/progress_bar.gd.uid deleted file mode 100644 index b0c463c..0000000 --- a/player/smallPlayer/progress_bar.gd.uid +++ /dev/null @@ -1 +0,0 @@ -uid://biv656fho5bpy