Fixed a bunch of bugs

This commit is contained in:
theskywinds 2025-05-23 15:00:15 +02:00
parent d590d22ab5
commit f72957d420
10 changed files with 53 additions and 92 deletions

View File

@ -1,4 +1,4 @@
[gd_scene load_steps=16 format=3 uid="uid://bdd6q3m06bnn3"]
[gd_scene load_steps=15 format=3 uid="uid://bdd6q3m06bnn3"]
[ext_resource type="Script" uid="uid://enxayokme5rs" path="res://levels/levelFinal/core/core.gd" id="1_6sogb"]
[ext_resource type="Texture2D" uid="uid://c54p5kdrt1r71" path="res://levels/levelFinal/core/coreSprites/planetCore_0001.png" id="1_macrm"]
@ -64,18 +64,6 @@ tracks/1/keys = {
"update": 0,
"values": [Color(0, 0, 0, 1)]
}
tracks/2/type = "value"
tracks/2/imported = false
tracks/2/enabled = true
tracks/2/path = NodePath("Label:position")
tracks/2/interp = 1
tracks/2/loop_wrap = true
tracks/2/keys = {
"times": PackedFloat32Array(0),
"transitions": PackedFloat32Array(1),
"update": 0,
"values": [Vector2(510, -39)]
}
[sub_resource type="Animation" id="Animation_a6hc6"]
resource_name = "fadeIn"
@ -103,18 +91,6 @@ tracks/1/keys = {
"update": 0,
"values": [Color(0, 0, 0, 1), Color(0, 0, 0, 0)]
}
tracks/2/type = "value"
tracks/2/imported = false
tracks/2/enabled = true
tracks/2/path = NodePath("Label:position")
tracks/2/interp = 1
tracks/2/loop_wrap = true
tracks/2/keys = {
"times": PackedFloat32Array(0, 0.16, 0.57, 1),
"transitions": PackedFloat32Array(1, 1, 1, 1),
"update": 0,
"values": [Vector2(510, -39), Vector2(501.7, 297.66), Vector2(501.7, 297.66), Vector2(510, -39)]
}
[sub_resource type="Animation" id="Animation_e5775"]
resource_name = "fadeOut"
@ -143,28 +119,11 @@ tracks/1/keys = {
"values": [Color(0, 0, 0, 0), Color(0, 0, 0, 1)]
}
[sub_resource type="Animation" id="Animation_1pmln"]
resource_name = "text"
length = 2.0
tracks/0/type = "value"
tracks/0/imported = false
tracks/0/enabled = true
tracks/0/path = NodePath("Label:position")
tracks/0/interp = 1
tracks/0/loop_wrap = true
tracks/0/keys = {
"times": PackedFloat32Array(0, 0.22, 1.7, 2),
"transitions": PackedFloat32Array(1, 1, 1, 1),
"update": 0,
"values": [Vector2(510, -39), Vector2(518, 296), Vector2(518, 296), Vector2(499, -61)]
}
[sub_resource type="AnimationLibrary" id="AnimationLibrary_h31ej"]
_data = {
&"RESET": SubResource("Animation_h31ej"),
&"fadeIn": SubResource("Animation_a6hc6"),
&"fadeOut": SubResource("Animation_e5775"),
&"text": SubResource("Animation_1pmln")
&"fadeOut": SubResource("Animation_e5775")
}
[node name="core" type="Area2D"]
@ -188,6 +147,7 @@ physics_interpolation_mode = 1
libraries = {
&"": SubResource("AnimationLibrary_h31ej")
}
autoplay = "fadeIn"
script = ExtResource("8_d4a53")
[node name="ColorRect" type="ColorRect" parent="fadeOut"]

View File

@ -1,4 +1,4 @@
[gd_scene load_steps=7 format=3 uid="uid://dxojtfoa4jbe"]
[gd_scene load_steps=8 format=3 uid="uid://dxojtfoa4jbe"]
[ext_resource type="Script" uid="uid://c3qi2ffmxsl8i" path="res://levels/levelOne/exit_zone.gd" id="1_2uwmc"]
[ext_resource type="Script" uid="uid://jeddvfkorpxu" path="res://levels/levelOne/animation_player.gd" id="2_h31ej"]
@ -30,24 +30,11 @@ tracks/1/keys = {
"times": PackedFloat32Array(0),
"transitions": PackedFloat32Array(1),
"update": 0,
"values": [Color(0, 0, 0, 1)]
}
tracks/2/type = "value"
tracks/2/imported = false
tracks/2/enabled = true
tracks/2/path = NodePath("Label:self_modulate")
tracks/2/interp = 1
tracks/2/loop_wrap = true
tracks/2/keys = {
"times": PackedFloat32Array(0),
"transitions": PackedFloat32Array(1),
"update": 0,
"values": [Color(1, 1, 1, 1)]
}
[sub_resource type="Animation" id="Animation_e5775"]
resource_name = "fadeOut"
length = 1.5
tracks/0/type = "value"
tracks/0/imported = false
tracks/0/enabled = true
@ -55,7 +42,7 @@ tracks/0/path = NodePath("ColorRect:color")
tracks/0/interp = 1
tracks/0/loop_wrap = true
tracks/0/keys = {
"times": PackedFloat32Array(0, 1.46667),
"times": PackedFloat32Array(0, 1),
"transitions": PackedFloat32Array(1, 1),
"update": 0,
"values": [Color(0, 0, 0, 0), Color(0, 0, 0, 1)]
@ -67,16 +54,33 @@ tracks/1/path = NodePath("ColorRect:modulate")
tracks/1/interp = 1
tracks/1/loop_wrap = true
tracks/1/keys = {
"times": PackedFloat32Array(0, 1.46667),
"times": PackedFloat32Array(0, 1),
"transitions": PackedFloat32Array(1, 1),
"update": 0,
"values": [Color(0, 0, 0, 0), Color(0, 0, 0, 1)]
"values": [Color(1, 1, 1, 0), Color(1, 1, 1, 1)]
}
[sub_resource type="Animation" id="Animation_1pmln"]
resource_name = "initialize"
length = 0.01
tracks/0/type = "value"
tracks/0/imported = false
tracks/0/enabled = true
tracks/0/path = NodePath("ColorRect:color")
tracks/0/interp = 1
tracks/0/loop_wrap = true
tracks/0/keys = {
"times": PackedFloat32Array(0),
"transitions": PackedFloat32Array(1),
"update": 0,
"values": [Color(0, 0, 0, 0)]
}
[sub_resource type="AnimationLibrary" id="AnimationLibrary_h31ej"]
_data = {
&"RESET": SubResource("Animation_h31ej"),
&"fadeOut": SubResource("Animation_e5775")
&"fadeOut": SubResource("Animation_e5775"),
&"initialize": SubResource("Animation_1pmln")
}
[node name="exit" type="Node2D"]
@ -90,17 +94,16 @@ position = Vector2(-14, 18)
shape = SubResource("RectangleShape2D_jhhth")
[node name="fadeOut" type="CanvasLayer" parent="."]
visible = false
[node name="AnimationPlayer" type="AnimationPlayer" parent="fadeOut"]
physics_interpolation_mode = 1
libraries = {
&"": SubResource("AnimationLibrary_h31ej")
}
autoplay = "initialize"
script = ExtResource("2_h31ej")
[node name="ColorRect" type="ColorRect" parent="fadeOut"]
modulate = Color(0, 0, 0, 1)
anchors_preset = 15
anchor_right = 1.0
anchor_bottom = 1.0
@ -110,12 +113,5 @@ mouse_filter = 2
color = Color(0, 0, 0, 1)
metadata/_edit_use_anchors_ = true
[node name="Label" type="Label" parent="fadeOut"]
offset_left = 510.0
offset_top = -39.0
offset_right = 602.0
offset_bottom = -16.0
text = "placeholder"
[connection signal="body_entered" from="exitZone" to="exitZone" method="_on_body_entered"]
[connection signal="playerExit" from="exitZone" to="fadeOut/AnimationPlayer" method="_on_exit_zone_player_exit"]

View File

@ -1,8 +1,9 @@
[gd_scene load_steps=9 format=4 uid="uid://ccjb75bercbw8"]
[gd_scene load_steps=10 format=4 uid="uid://ccjb75bercbw8"]
[ext_resource type="TileSet" uid="uid://xnedi1edel2b" path="res://levels/levelOne/tileMaps/baseTileset.tres" id="1_s5r4n"]
[ext_resource type="PackedScene" uid="uid://c1xy5bf2p6vmh" path="res://player/smallPlayer/player.tscn" id="2_r1egm"]
[ext_resource type="PackedScene" uid="uid://darxbklsgh23m" path="res://collectables/crystal/collectableCrystal.tscn" id="3_56573"]
[ext_resource type="Script" uid="uid://bnpus4sru0dpt" path="res://levels/levelOne/playerScriptAnimation.gd" id="3_pr6wu"]
[ext_resource type="PackedScene" uid="uid://bvenxce30ko6p" path="res://levels/backgrounds/caveBackground.tscn" id="5_8lh0c"]
[ext_resource type="PackedScene" uid="uid://dxojtfoa4jbe" path="res://levels/levelOne/exitZone.tscn" id="5_r1egm"]
@ -58,6 +59,7 @@ collision_enabled = false
[node name="player" parent="." instance=ExtResource("2_r1egm")]
position = Vector2(373, 125)
script = ExtResource("3_pr6wu")
[node name="crystals" type="Node2D" parent="."]
position = Vector2(304, 494)

View File

@ -0,0 +1,17 @@
extends CharacterBody2D
const SPEED = 3.0
var Progress
var direction: Vector2
var animationFinished: bool = false
func _on_intro_animation_animation_finished(anim_name: StringName) -> void:
animationFinished = true
func _physics_process(delta: float) -> void:
#Handles movement
if animationFinished:
direction = Input.get_vector("moveLeft", "moveRight", "moveUp", "moveDown")
move_and_collide(direction * SPEED)

View File

@ -0,0 +1 @@
uid://bnpus4sru0dpt

View File

@ -47,18 +47,6 @@ tracks/0/keys = {
"update": 0,
"values": [Color(0, 0, 0, 1), Color(0, 0, 0, 0)]
}
tracks/1/type = "value"
tracks/1/imported = false
tracks/1/enabled = true
tracks/1/path = NodePath("ColorRect:modulate")
tracks/1/interp = 1
tracks/1/loop_wrap = true
tracks/1/keys = {
"times": PackedFloat32Array(0, 1),
"transitions": PackedFloat32Array(1, 1),
"update": 0,
"values": [Color(0, 0, 0, 1), Color(0, 0, 0, 0)]
}
[sub_resource type="Animation" id="Animation_e5775"]
resource_name = "fadeOut"
@ -111,6 +99,7 @@ physics_interpolation_mode = 1
libraries = {
&"": SubResource("AnimationLibrary_h31ej")
}
autoplay = "fadeIn"
script = ExtResource("2_qxd85")
[node name="ColorRect" type="ColorRect" parent="fadeOut"]

View File

@ -205,6 +205,7 @@ physics_interpolation_mode = 1
libraries = {
&"": SubResource("AnimationLibrary_h31ej")
}
autoplay = "fadeIn"
script = ExtResource("17_njh3w")
[node name="ColorRect" type="ColorRect" parent="fadeOut"]

View File

@ -243,6 +243,7 @@ physics_interpolation_mode = 1
libraries = {
&"": SubResource("AnimationLibrary_h31ej")
}
autoplay = "fadeIn"
script = ExtResource("24_ho6ck")
[node name="ColorRect" type="ColorRect" parent="fadeOut"]

View File

@ -207,6 +207,7 @@ physics_interpolation_mode = 1
libraries = {
&"": SubResource("AnimationLibrary_h31ej")
}
autoplay = "fadeIn"
script = ExtResource("17_i2pxn")
[node name="ColorRect" type="ColorRect" parent="fadeOut"]

View File

@ -3,15 +3,8 @@ extends CharacterBody2D
const SPEED = 3.0
var Progress
var direction: Vector2
var animationFinished: bool = false
func _on_intro_animation_animation_finished(anim_name: StringName) -> void:
animationFinished = true
func _physics_process(delta: float) -> void:
#Handles movement
if animationFinished:
direction = Input.get_vector("moveLeft", "moveRight", "moveUp", "moveDown")
move_and_collide(direction * SPEED)
direction = Input.get_vector("moveLeft", "moveRight", "moveUp", "moveDown")
move_and_collide(direction * SPEED)