diff --git a/Scenes/Game Scenes/LevelTest.tscn b/Scenes/Game Scenes/LevelTest.tscn index 5656079..e55fa18 100644 --- a/Scenes/Game Scenes/LevelTest.tscn +++ b/Scenes/Game Scenes/LevelTest.tscn @@ -14,7 +14,7 @@ [ext_resource type="Texture2D" uid="uid://c0jre0obv2jlg" path="res://Assets/2D Assets/1_Industrial_Tileset_1.png" id="8_jirwo"] [ext_resource type="Script" uid="uid://c3l0v8hb8wswj" path="res://Scripts/Bolt.gd" id="13_jirwo"] [ext_resource type="PackedScene" uid="uid://bcxi0ij5k1yn" path="res://Scenes/Scene Assets/3d bolt.tscn" id="14_y8c61"] -[ext_resource type="Script" path="res://Scripts/destructible_object.gd" id="15_g414q"] +[ext_resource type="Script" uid="uid://c4dvbchy5m3tc" path="res://Scripts/destructible_object.gd" id="15_g414q"] [ext_resource type="PackedScene" uid="uid://cl4y8xdjw1w2y" path="res://Scenes/Scene Assets/User Interface.tscn" id="16_8dxgu"] [ext_resource type="Texture2D" uid="uid://d3758kcrsgh5s" path="res://Assets/2D Assets/Props/antenna.png" id="16_g414q"] [ext_resource type="PackedScene" path="res://Scenes/Game Scenes/pause_menu.tscn" id="18_vbmf7"] diff --git a/Scenes/Game Scenes/Spawn.tscn b/Scenes/Game Scenes/Spawn.tscn index 33c30a3..f8700d2 100644 --- a/Scenes/Game Scenes/Spawn.tscn +++ b/Scenes/Game Scenes/Spawn.tscn @@ -1,4 +1,4 @@ -[gd_scene load_steps=17 format=4 uid="uid://bab8q3lwp3q54"] +[gd_scene load_steps=18 format=4 uid="uid://bab8q3lwp3q54"] [ext_resource type="Script" uid="uid://mtv4jj62dn53" path="res://Scripts/player.gd" id="1_t5m8g"] [ext_resource type="PackedScene" uid="uid://cixx5dbanxem1" path="res://Scenes/Scene Assets/blastershot.tscn" id="2_rxqr3"] @@ -8,10 +8,11 @@ [ext_resource type="Texture2D" uid="uid://be401px2ecl2s" path="res://Assets/2D Assets/cyberpunk-detective-props/PNG/big-computer.png" id="5_l1q0k"] [ext_resource type="Texture2D" uid="uid://coatakcngahp7" path="res://Assets/2D Assets/Exit_sign.png" id="5_rxqr3"] [ext_resource type="Texture2D" uid="uid://ftebtmw0os3d" path="res://Assets/2D Assets/cyberpunk-detective-props/PNG/elevator.png" id="6_0fr2q"] -[ext_resource type="Script" path="res://Scripts/destructible_object.gd" id="9_l2ouu"] +[ext_resource type="Script" uid="uid://c4dvbchy5m3tc" path="res://Scripts/destructible_object.gd" id="9_l2ouu"] [ext_resource type="Texture2D" uid="uid://d3758kcrsgh5s" path="res://Assets/2D Assets/Props/antenna.png" id="10_ea83u"] [ext_resource type="Script" uid="uid://c3l0v8hb8wswj" path="res://Scripts/Bolt.gd" id="11_ea83u"] [ext_resource type="PackedScene" uid="uid://bcxi0ij5k1yn" path="res://Scenes/Scene Assets/3d bolt.tscn" id="12_k5v5r"] +[ext_resource type="PackedScene" uid="uid://cx0k1lcljgqis" path="res://Scenes/Scene Assets/door.tscn" id="13_5tcfi"] [sub_resource type="RectangleShape2D" id="RectangleShape2D_k5v5r"] size = Vector2(1.77364, 26.2927) @@ -37,18 +38,18 @@ BlasterShot = ExtResource("2_rxqr3") [node name="Cyborg" type="AnimatedSprite2D" parent="Player"] light_mask = 0 visibility_layer = 513 -position = Vector2(17, -11) -scale = Vector2(1.95, 1.95) +position = Vector2(17, -23) +scale = Vector2(2.00625, 1.95) sprite_frames = ExtResource("3_i4aqn") -animation = &"run" -frame_progress = 0.883941 +animation = &"jumping" +frame_progress = 0.588815 [node name="CollisionPolygon2D" type="CollisionPolygon2D" parent="Player"] light_mask = 0 visibility_layer = 512 -position = Vector2(17, -1) -scale = Vector2(0.6, 0.6) -polygon = PackedVector2Array(-18, -48, -14, -20, -28, -19, -25, 29, -18, 28, -15, -4, -11, -4, -14, 57, -14, 60, -4, 60, -5, 28, 2, 29, 4, 60, 14, 60, 14, -4, 17, -4, 19, 28, 27, 28, 29, -21, 12, -21, 14, -48) +position = Vector2(19, -8) +scale = Vector2(0.8625, 0.6625) +polygon = PackedVector2Array(-18, -48, -14, -20, -13.3334, -18.3333, -13.3334, -15, -11.6667, -5, -15, -11.6666, -16.6667, -1.66663, -15, 46.6667, -15, 46.6667, -6.66669, 46.6667, -5, 28, 2, 29, 5, 46.6667, 16.6666, 46.6667, 16.6666, -3.33331, 17, -4, 13.3333, -8.33331, 13.3333, -11.6666, 11.6666, -16.6666, 12, -21, 14, -48) [node name="Camera2D" type="Camera2D" parent="Player"] zoom = Vector2(1.8, 1.8) @@ -181,3 +182,17 @@ shape = SubResource("RectangleShape2D_5tcfi") transparent_bg = true [node name="Bolt" parent="3D Bolt Texture" instance=ExtResource("12_k5v5r")] + +[node name="Door_To_TestScene" parent="." instance=ExtResource("13_5tcfi")] +position = Vector2(3856, 579) +destination_level_tag = "02_first_level" +destination_door_tag = "To_Scene_1" +spawn_direction = "left" + +[node name="CollisionShape2D" parent="Door_To_TestScene" index="0"] +position = Vector2(57, -62) + +[node name="Spawn" parent="Door_To_TestScene" index="1"] +position = Vector2(2, -65) + +[editable path="Door_To_TestScene"] diff --git a/Scripts/navigation_manager.gd b/Scripts/navigation_manager.gd index ed310ea..adb00b1 100644 --- a/Scripts/navigation_manager.gd +++ b/Scripts/navigation_manager.gd @@ -8,17 +8,17 @@ signal on_trigger_player_spawn var spawn_door_tag func go_to_level(level_tag, destination_tag): - var scene_to_load + var scene_to_load - match level_tag: - "01_loop_start": - scene_to_load = _01_loop_start - "02_first_level": - scene_to_load = _02_first_level + match level_tag: + "01_loop_start": + scene_to_load = _01_loop_start + "02_first_level": + scene_to_load = _02_first_level - if scene_to_load != null: - spawn_door_tag = destination_tag - get_tree().change_scene_to_packed(scene_to_load) + if scene_to_load != null: + spawn_door_tag = destination_tag + get_tree().change_scene_to_packed(scene_to_load) func trigger_player_spawn(position: Vector2, direction: String): - on_trigger_player_spawn.emit(position, direction) \ No newline at end of file + on_trigger_player_spawn.emit(position, direction) diff --git a/Scripts/player.gd b/Scripts/player.gd index 4aef5e3..4050ffb 100644 --- a/Scripts/player.gd +++ b/Scripts/player.gd @@ -4,8 +4,8 @@ extends CharacterBody2D @export var Coyote_Time: float @export var BlasterShot: PackedScene -const MOVE_SPEED = 155 -const JUMP_FORCE = 650 +const MOVE_SPEED = 120 +const JUMP_FORCE = 630 const MAX_SPEED = 2000 const MAX_FALL_SPEED = 500 @@ -39,8 +39,8 @@ var jump_buffer : bool var is_crouching: bool = false # Dash variables -const DASH_SPEED = 1400 -const DASH_DURATION = 0.08 +const DASH_SPEED = 1600 +const DASH_DURATION = 0.1 const DASH_COOLDOWN = 0.5