diff --git a/core/Door.gd b/core/Door.gd new file mode 100644 index 0000000..d090706 --- /dev/null +++ b/core/Door.gd @@ -0,0 +1,26 @@ +@tool +extends Sprite2D +@export_group("Travel settings") +@export_file("*.tscn") var NextScene:String +@export_enum("LEFT","RIGHT","UP","DOWN") var Travel :int +@export var Spawn_Position:Vector2 = Vector2(0,0 +) +var NextSceneLoaded + +func _on_area_2d_area_entered(area): + if(area): + if(MapManager and MapManager.player == area.get_parent() and (MapManager.player.Traveling == false) ): + MapManager.player.Traveling = true + print("enter door",area) + NextSceneLoaded = load(NextScene) + if (NextSceneLoaded != null): + MapManager.transition_to_scene(NextSceneLoaded,Spawn_Position,Travel) + else: + printerr("error loading ",NextScene) + + + + +func _ready(): + NextSceneLoaded = load(NextScene) + print(NextSceneLoaded) diff --git a/core/Door.tscn b/core/Door.tscn new file mode 100644 index 0000000..3dcccde --- /dev/null +++ b/core/Door.tscn @@ -0,0 +1,28 @@ +[gd_scene load_steps=5 format=3 uid="uid://do65rgg0p2plt"] + +[ext_resource type="Texture2D" uid="uid://cxharyv0ajr37" path="res://textures/atlas/DioramaEntrance_All_01_SPRT.png" id="1_4vclu"] +[ext_resource type="Script" path="res://core/Door.gd" id="2_8a3ug"] + +[sub_resource type="AtlasTexture" id="AtlasTexture_wi524"] +atlas = ExtResource("1_4vclu") +region = Rect2(12, 96, 216, 112) + +[sub_resource type="RectangleShape2D" id="RectangleShape2D_ajnvj"] +size = Vector2(202.667, 60.3336) + +[node name="Door" type="Sprite2D"] +position = Vector2(-0.333333, 457.667) +texture = SubResource("AtlasTexture_wi524") +flip_h = true +script = ExtResource("2_8a3ug") + +[node name="Area2D" type="Area2D" parent="."] +input_pickable = false +monitorable = false + +[node name="CollisionShape2D" type="CollisionShape2D" parent="Area2D"] +position = Vector2(-3.57628e-07, -15.667) +shape = SubResource("RectangleShape2D_ajnvj") + +[connection signal="area_entered" from="Area2D" to="." method="_on_area_2d_area_entered"] +[connection signal="area_exited" from="Area2D" to="." method="_on_area_2d_area_exited"] diff --git a/core/player.gd b/core/player.gd index 05c2439..3fcb6f6 100644 --- a/core/player.gd +++ b/core/player.gd @@ -6,9 +6,12 @@ extends CharacterBody2D const SPEED = 1000.0 const MOUSESPEED = 10.0 -func teleport(location:Transform2D , direction:float = 1): - transform = location - scale = Vector2(direction,1) + +var Traveling = false + +func teleport(location:Vector2 , direction:float = 1): + position = location + #scale = Vector2(direction,1) # Change the skin on every sprite func changeSkin(NewSkin:CanvasTexture,_NewHat:CanvasTexture = null): diff --git a/core/player.tscn b/core/player.tscn index 4a13dd1..4183729 100644 --- a/core/player.tscn +++ b/core/player.tscn @@ -1,4 +1,4 @@ -[gd_scene load_steps=23 format=3 uid="uid://0m1hk2nu4bps"] +[gd_scene load_steps=24 format=3 uid="uid://0m1hk2nu4bps"] [ext_resource type="Script" path="res://core/player.gd" id="1_whhfc"] [ext_resource type="Texture2D" uid="uid://5pmqr3y62guu" path="res://textures/player/currentCloth.tres" id="2_w1l4c"] @@ -499,6 +499,10 @@ node_connections = [&"output", 0, &"WalkRun"] [sub_resource type="CanvasTexture" id="CanvasTexture_2b3h6"] diffuse_texture = ExtResource("6_3ryww") +[sub_resource type="CapsuleShape2D" id="CapsuleShape2D_8drh2"] +radius = 130.0 +height = 550.0 + [node name="Player" type="CharacterBody2D"] motion_mode = 1 script = ExtResource("1_whhfc") @@ -511,6 +515,7 @@ position = Vector2(0, -75) shape = SubResource("RectangleShape2D_kapu3") [node name="Camera2D" type="Camera2D" parent="."] +visible = false zoom = Vector2(0.13, 0.13) position_smoothing_enabled = true position_smoothing_speed = 2.0 @@ -546,23 +551,23 @@ parameters/WalkRun/3/TimeScale/scale = 0.3 position = Vector2(17, 0) [node name="BootL" type="Sprite2D" parent="Skeleton2D"] -position = Vector2(-51.293, -36.973) -rotation = 0.119813 +position = Vector2(-93.6914, -35.1428) +rotation = 0.413206 texture = ExtResource("2_w1l4c") region_enabled = true region_rect = Rect2(896, 768, 128, 128) metadata/Type = "Skin" [node name="BootR" type="Sprite2D" parent="Skeleton2D"] -position = Vector2(5.51367, -43.3018) -rotation = -0.307954 +position = Vector2(40.2865, -41.1666) +rotation = -0.671407 texture = ExtResource("2_w1l4c") region_enabled = true region_rect = Rect2(896, 768, 128, 128) metadata/Type = "Skin" [node name="Body" type="Sprite2D" parent="Skeleton2D"] -position = Vector2(51, -231.006) +position = Vector2(51, -234.374) texture = ExtResource("2_w1l4c") offset = Vector2(-15, 0) region_enabled = true @@ -586,7 +591,7 @@ metadata/Type = "Skin" [node name="Tail" type="Sprite2D" parent="Skeleton2D/Body"] show_behind_parent = true -position = Vector2(44, 101.006) +position = Vector2(44, 104.374) rotation = 0.153589 texture = ExtResource("2_w1l4c") offset = Vector2(70, 0) @@ -595,8 +600,9 @@ region_rect = Rect2(768, 640, 256, 128) metadata/Type = "Skin" [node name="Head" type="Sprite2D" parent="Skeleton2D"] -position = Vector2(-40, -404.006) -rotation = 0.0641361 +position = Vector2(-40, -407.374) +rotation = 0.0767937 +scale = Vector2(1, 1) texture = ExtResource("2_w1l4c") offset = Vector2(0, -168) region_enabled = true @@ -684,3 +690,9 @@ z_index = -1 position = Vector2(42, -381) scale = Vector2(1.89731, 1.89731) texture = SubResource("CanvasTexture_2b3h6") + +[node name="DetectionArea" type="Area2D" parent="."] + +[node name="CollisionShape2D" type="CollisionShape2D" parent="DetectionArea"] +position = Vector2(0, -266.265) +shape = SubResource("CapsuleShape2D_8drh2") diff --git a/core/sceneInstance.gd b/core/sceneInstance.gd index b7527a8..6cb775e 100644 --- a/core/sceneInstance.gd +++ b/core/sceneInstance.gd @@ -6,31 +6,68 @@ extends Node2D @export var InitialMap :PackedScene @onready var current_scene = $CurrentScene +@onready var next_scene = $NextScene #@onready var scene_transition = $ScreenTransition/AnimationPlayer -var player +var player:Object -func transition_to_scene(new_scene: PackedScene, spawn_location = Vector2(0,0), spawn_direction = 1): + +func _process(_delta): + if($CurrentScene.get_child_count() >0): + if($CurrentScene.get_child(0).position != Vector2(0,0)): + breakpoint + +func transition_to_scene(new_scene: PackedScene, spawn_location: Vector2, spawn_direction = 1): #screen_transition.play('FadeToBlack') - if(current_scene.get_child_count() > 0 and current_scene.get_child(0)): - current_scene.get_child(0).queue_free() - current_scene.add_child(new_scene.instantiate()) - - #region Spawn Player - if (player): - player.teleport(spawn_location, spawn_direction) - else: - player = $CurrentScene.find_child("player",true) + if (new_scene): + if (current_scene.get_child_count() == 0 ): + current_scene.add_child(new_scene.instantiate()) + else: + next_scene.add_child(new_scene.instantiate()) + #region Anim Map + if (next_scene.get_child(0) != null): + match spawn_direction: + 0: + $AnimationPlayer.play("travel_left",-1,1) + 1: + $AnimationPlayer.play("travel_left",-1,1) + 2: + $AnimationPlayer.play("travel_up",-1,1) + 3: + $AnimationPlayer.play("travel_down",-1,1) + #endregion + #region Spawn Player if (player): + player.reparent(next_scene.get_child(0)) player.teleport(spawn_location, spawn_direction) - else: #Spawn the player if there is none - if (InitialPlayer): - player = InitialPlayer.instantiate() - player.set_name("player") - current_scene.get_child(0).add_child(player) - else: - printerr("No Initial player found") - #endregion + else: + player = $CurrentScene.find_child("player",true) + if (player): + player.teleport(spawn_location, spawn_direction) + else: #Spawn the player if there is none + if (InitialPlayer): + player = InitialPlayer.instantiate() + player.set_name("player") + current_scene.get_child(0).add_child(player) + else: + printerr("No Initial player found") + #endregion + else: + printerr("No New Scene") func _on_ready(): transition_to_scene(InitialMap,Vector2(0,0),1) +func on_travel_end(): + player.Traveling = false + print("end travel") + +func _on_animation_player_animation_finished(anim_name): + print("anim finished") + current_scene.get_child(0).queue_free() + current_scene.position = Vector2(0,0) + if (next_scene.get_child_count() > 0): + next_scene.get_child(0).reparent(current_scene) + if (next_scene.get_child_count() > 0): + next_scene.get_child(0).queue_free() + print("level unloaded") + await get_tree().create_timer(1).connect("timeout",Callable(self,"on_travel_end")) diff --git a/maps/map1.tscn b/maps/map1.tscn index 87088ad..d68f1d6 100644 --- a/maps/map1.tscn +++ b/maps/map1.tscn @@ -1,8 +1,9 @@ -[gd_scene load_steps=34 format=3 uid="uid://wlqsvbqpcbh"] +[gd_scene load_steps=33 format=3 uid="uid://wlqsvbqpcbh"] [ext_resource type="Texture2D" uid="uid://cacwy4tka88k1" path="res://maps/map1.tres" id="1_pt5vq"] [ext_resource type="Texture2D" uid="uid://cxharyv0ajr37" path="res://textures/atlas/DioramaEntrance_All_01_SPRT.png" id="2_n7y5f"] [ext_resource type="Texture2D" uid="uid://c5bd2ta3esnib" path="res://extracted/4010-A Tiny Sticker Tale review pic 1.jpg" id="3_yh2wy"] +[ext_resource type="PackedScene" uid="uid://do65rgg0p2plt" path="res://core/Door.tscn" id="4_lwk0u"] [ext_resource type="PackedScene" uid="uid://bddcriwo55x8k" path="res://prefab/prefab_woddenbridge.tscn" id="4_okpsn"] [ext_resource type="Texture2D" uid="uid://cun14l52f477p" path="res://textures/atlas/Bushes_All_01_SPRT.png" id="5_xmosd"] [ext_resource type="PackedScene" uid="uid://domcpxdf6lqpb" path="res://prefab/free_sticker.tscn" id="6_3fkbm"] @@ -14,16 +15,10 @@ [ext_resource type="Texture2D" uid="uid://ciyh3rnoo4uk" path="res://extracted/Texture2D/SimpleParticles_All_01_SPRT.png" id="12_ro7fd"] [ext_resource type="Texture2D" uid="uid://dcgjlblm2rpy4" path="res://textures/2d_lights_and_shadows_neutral_point_light.webp" id="13_sm1ou"] -[sub_resource type="ShaderMaterial" id="ShaderMaterial_js06g"] - [sub_resource type="AtlasTexture" id="AtlasTexture_gnudx"] atlas = ExtResource("2_n7y5f") region = Rect2(252, 16, 108, 256) -[sub_resource type="AtlasTexture" id="AtlasTexture_wi524"] -atlas = ExtResource("2_n7y5f") -region = Rect2(12, 96, 216, 112) - [sub_resource type="AtlasTexture" id="AtlasTexture_ex6vq"] atlas = ExtResource("2_n7y5f") region = Rect2(0, 16, 228, 80) @@ -97,7 +92,6 @@ radius = 42.25 [node name="Map1" type="Node2D"] z_as_relative = false y_sort_enabled = true -material = SubResource("ShaderMaterial_js06g") [node name="Floors05Sprt" type="Sprite2D" parent="."] z_index = -10 @@ -129,11 +123,6 @@ position = Vector2(-481.833, -238.667) texture = SubResource("AtlasTexture_gnudx") flip_h = true -[node name="Door3" type="Sprite2D" parent="Floors05Sprt"] -position = Vector2(-0.333333, 457.667) -texture = SubResource("AtlasTexture_wi524") -flip_h = true - [node name="Door4" type="Sprite2D" parent="Floors05Sprt"] position = Vector2(14.3333, -456.333) texture = SubResource("AtlasTexture_ex6vq") @@ -144,6 +133,12 @@ position = Vector2(325.833, -87.5) scale = Vector2(0.95216, 0.95216) metadata/Tags = ["bridge"] +[node name="Door3" parent="Floors05Sprt" instance=ExtResource("4_lwk0u")] +position = Vector2(-1.5, 455) +NextScene = "res://maps/map2.tscn" +Travel = 3 +Spawn_Position = Vector2(333, -2652) + [node name="4010-aTinyStickerTaleReviewPic1" type="Sprite2D" parent="."] visible = false top_level = true diff --git a/maps/map2.tres b/maps/map2.tres new file mode 100644 index 0000000..5e14578 --- /dev/null +++ b/maps/map2.tres @@ -0,0 +1,8 @@ +[gd_resource type="AtlasTexture" load_steps=2 format=3 uid="uid://6hc7x8qe6r1c"] + +[ext_resource type="Texture2D" uid="uid://bk87x1lpjog5j" path="res://textures/atlas/Floors_05_SPRT.png" id="1_w8qho"] + +[resource] +atlas = ExtResource("1_w8qho") +region = Rect2(1020, 1008, 1020, 1040) +filter_clip = true diff --git a/maps/map2.tscn b/maps/map2.tscn new file mode 100644 index 0000000..e5b7eeb --- /dev/null +++ b/maps/map2.tscn @@ -0,0 +1,219 @@ +[gd_scene load_steps=27 format=3 uid="uid://5tfe84u3gyty"] + +[ext_resource type="Texture2D" uid="uid://bnmlngwnibfnj" path="res://extracted/ref_map2.jpg" id="1_cdv75"] +[ext_resource type="Texture2D" uid="uid://cypb81fuw4w44" path="res://textures/atlas/GroundExtensions_All_01_SPRT.png" id="3_54rqc"] +[ext_resource type="Texture2D" uid="uid://6hc7x8qe6r1c" path="res://maps/map2.tres" id="3_gbt28"] +[ext_resource type="PackedScene" uid="uid://domcpxdf6lqpb" path="res://prefab/free_sticker.tscn" id="4_2tdya"] +[ext_resource type="Texture2D" uid="uid://cxharyv0ajr37" path="res://textures/atlas/DioramaEntrance_All_01_SPRT.png" id="4_lgnnp"] +[ext_resource type="PackedScene" uid="uid://do65rgg0p2plt" path="res://core/Door.tscn" id="4_yvr3q"] +[ext_resource type="Texture2D" uid="uid://dggavne4ueche" path="res://extracted/Texture2D/Tree_Field_01_SPRT.png" id="5_lwnej"] +[ext_resource type="PackedScene" uid="uid://6ww1g2enfdx3" path="res://prefab/solid_sticker.tscn" id="6_k22qa"] +[ext_resource type="Texture2D" uid="uid://chuv25pm2vqen" path="res://textures/atlas/Rocks_All_01_SPRT.png" id="7_pykf8"] +[ext_resource type="Texture2D" uid="uid://b366mcexlko72" path="res://textures/atlas/LogsAndWood_All_01_SPRT.png" id="8_ugxkt"] + +[sub_resource type="AtlasTexture" id="AtlasTexture_rckkj"] +atlas = ExtResource("3_54rqc") +region = Rect2(0, 624, 540, 656) +filter_clip = true + +[sub_resource type="AtlasTexture" id="AtlasTexture_7lxfk"] +atlas = ExtResource("4_lgnnp") +region = Rect2(360, 288, 108, 272) + +[sub_resource type="AtlasTexture" id="AtlasTexture_a0jcl"] +atlas = ExtResource("4_lgnnp") +region = Rect2(0, 16, 228, 80) + +[sub_resource type="CapsuleShape2D" id="CapsuleShape2D_np57i"] +radius = 70.0 +height = 512.0 + +[sub_resource type="CapsuleShape2D" id="CapsuleShape2D_3r7ts"] +radius = 80.0 +height = 254.0 + +[sub_resource type="AtlasTexture" id="AtlasTexture_ti2p7"] +atlas = ExtResource("7_pykf8") +region = Rect2(288, 256, 192, 160) + +[sub_resource type="CapsuleShape2D" id="CapsuleShape2D_r6rf6"] +radius = 65.0 +height = 184.05 + +[sub_resource type="RectangleShape2D" id="RectangleShape2D_4rns6"] +size = Vector2(133.06, 62.73) + +[sub_resource type="AtlasTexture" id="AtlasTexture_4pwyl"] +atlas = ExtResource("8_ugxkt") +region = Rect2(1600, 944, 104, 176) + +[sub_resource type="RectangleShape2D" id="RectangleShape2D_djose"] +size = Vector2(154.335, 84.705) + +[sub_resource type="RectangleShape2D" id="RectangleShape2D_enbs7"] +size = Vector2(65.54, 94.235) + +[sub_resource type="AtlasTexture" id="AtlasTexture_ddtk8"] +atlas = ExtResource("7_pykf8") +region = Rect2(1440, 1376, 256, 256) + +[sub_resource type="CapsuleShape2D" id="CapsuleShape2D_io0k5"] +radius = 105.36 +height = 291.04 + +[sub_resource type="RectangleShape2D" id="RectangleShape2D_o3kxg"] +size = Vector2(201.89, 146.45) + +[sub_resource type="AtlasTexture" id="AtlasTexture_ko6cw"] +atlas = ExtResource("7_pykf8") +region = Rect2(544, 1728, 416, 288) + +[sub_resource type="RectangleShape2D" id="RectangleShape2D_ontns"] +size = Vector2(325.915, 124.47) + +[node name="Map2" type="Node2D"] +z_as_relative = false +y_sort_enabled = true + +[node name="Map2" type="Sprite2D" parent="."] +z_index = -10 +scale = Vector2(5.44506, 5.44506) +texture = ExtResource("3_gbt28") +metadata/_edit_lock_ = true + +[node name="StaticBody2D" type="StaticBody2D" parent="Map2"] + +[node name="CollisionPolygon2D2" type="CollisionPolygon2D" parent="Map2/StaticBody2D"] +visible = false +position = Vector2(5.32593, -60.2381) +build_mode = 1 +polygon = PackedVector2Array(-448, -432.5, -29.5759, -431.73, -29.5681, -475.661, 128.557, -481.354, 134.066, -431.429, 458, -430.833, 456.928, 275.846, 138.841, 274.193, 142.514, 319.372, 134.415, 336.571, -270.153, 338.472, -270.153, 270.888, -447.378, 269.786, -444.694, 85.548, -509.269, 86.1331, -512.758, -74.563, -445.734, -77.3378) + +[node name="Dock" type="Sprite2D" parent="Map2"] +position = Vector2(-80.2562, 4.59132) +texture = SubResource("AtlasTexture_rckkj") + +[node name="StaticBody2D" type="StaticBody2D" parent="Map2/Dock"] + +[node name="CollisionPolygon2D" type="CollisionPolygon2D" parent="Map2/Dock/StaticBody2D"] +position = Vector2(-4.95862, -0.550958) +polygon = PackedVector2Array(-183.469, 112.763, -180.347, 275.112, -175.205, 275.479, -177.592, 112.212) + +[node name="CollisionPolygon2D2" type="CollisionPolygon2D" parent="Map2/Dock/StaticBody2D"] +polygon = PackedVector2Array(-27.3642, 105.6, -27.9152, 135.719, 217.628, 133.883, 223.505, 140.311, 224.791, 257.481, 230.668, 257.481, 227.362, 128.557, -24.9768, 130.577) + +[node name="Door1" type="Sprite2D" parent="Map2"] +position = Vector2(-472.171, -51.0555) +scale = Vector2(0.74059, 0.74059) +texture = SubResource("AtlasTexture_7lxfk") +flip_h = true + +[node name="Door" parent="Map2" instance=ExtResource("4_yvr3q")] +position = Vector2(67.4006, -511.656) +scale = Vector2(0.869617, 0.869617) +texture = SubResource("AtlasTexture_a0jcl") +NextScene = "res://maps/map1.tscn" +Travel = 2 +Spawn_Position = Vector2(0, 2317) + +[node name="RefMap2" type="Sprite2D" parent="."] +visible = false +modulate = Color(1, 1, 1, 0.741176) +z_index = -5 +position = Vector2(-123, -696) +scale = Vector2(6.39228, 6.39228) +texture = ExtResource("1_cdv75") + +[node name="Tree1" parent="." instance=ExtResource("4_2tdya")] +position = Vector2(-2084.56, -1642.1) +texture = ExtResource("5_lwnej") +offset = Vector2(-251.145, -512) +Shape = SubResource("CapsuleShape2D_np57i") +Position = Vector2(0, -253.27) +Rotation = 0.01 + +[node name="Tree2" parent="." instance=ExtResource("4_2tdya")] +position = Vector2(-1569.56, -1870.1) +scale = Vector2(3.2, 3.324) +texture = ExtResource("5_lwnej") +offset = Vector2(-251.145, -512) +Shape = SubResource("CapsuleShape2D_np57i") +Position = Vector2(0, -253.27) +Rotation = 0.01 + +[node name="Tree3" parent="." instance=ExtResource("4_2tdya")] +position = Vector2(2156, -1876) +scale = Vector2(3, 3.117) +texture = ExtResource("5_lwnej") +offset = Vector2(-251.145, -512) +Shape = SubResource("CapsuleShape2D_np57i") +Position = Vector2(0, -253.27) +Rotation = 0.01 + +[node name="Bush1" parent="." instance=ExtResource("4_2tdya")] +position = Vector2(-1554.56, -1581.1) +Shape = SubResource("CapsuleShape2D_3r7ts") +Rotation = 1.6 + +[node name="Bush2" parent="." instance=ExtResource("4_2tdya")] +position = Vector2(-1863.56, -2052.1) +Shape = SubResource("CapsuleShape2D_3r7ts") +Rotation = 1.6 + +[node name="Bush3" parent="." instance=ExtResource("4_2tdya")] +position = Vector2(2171, -1357) +Shape = SubResource("CapsuleShape2D_3r7ts") +Rotation = 1.6 + +[node name="Rock1" parent="." instance=ExtResource("6_k22qa")] +position = Vector2(2160, -900.32) +scale = Vector2(5, 5.195) +texture = SubResource("AtlasTexture_ti2p7") +offset = Vector2(-78.385, -130.2) +StickerShape = SubResource("CapsuleShape2D_r6rf6") +Position = Vector2(8.56, -52.395) +CollisionShape = SubResource("RectangleShape2D_4rns6") +CollisionPosition = Vector2(7.915, -31.39) +metadata/tags = ["rock"] + +[node name="Box1" parent="." instance=ExtResource("6_k22qa")] +position = Vector2(1195, -898.32) +scale = Vector2(5, 4.51) +texture = SubResource("AtlasTexture_4pwyl") +offset = Vector2(-52.525, -167.375) +StickerShape = SubResource("RectangleShape2D_djose") +Position = Vector2(0, -76.12) +CollisionShape = SubResource("RectangleShape2D_enbs7") +CollisionPosition = Vector2(0, -49.595) + +[node name="Box2" parent="." instance=ExtResource("6_k22qa")] +position = Vector2(1437, -1275.32) +scale = Vector2(5, 4.51) +texture = SubResource("AtlasTexture_4pwyl") +offset = Vector2(-54.04, -167.375) +StickerShape = SubResource("RectangleShape2D_djose") +Position = Vector2(0, -76.12) +CollisionShape = SubResource("RectangleShape2D_enbs7") +CollisionPosition = Vector2(0, -49.595) + +[node name="Rock2" parent="." instance=ExtResource("6_k22qa")] +position = Vector2(1776, -705.32) +scale = Vector2(5, 5.195) +texture = SubResource("AtlasTexture_ddtk8") +offset = Vector2(-126.11, -220.56) +StickerShape = SubResource("CapsuleShape2D_io0k5") +Position = Vector2(0, -89.77) +CollisionShape = SubResource("RectangleShape2D_o3kxg") +CollisionPosition = Vector2(0, -66.02) +metadata/tags = ["rock"] + +[node name="Rock3" parent="." instance=ExtResource("6_k22qa")] +position = Vector2(-993, -2293) +scale = Vector2(4.97891, 4.95232) +texture = SubResource("AtlasTexture_ko6cw") +offset = Vector2(-208.35, -260.555) +StickerShape = SubResource("CapsuleShape2D_io0k5") +Position = Vector2(0, -123.545) +CollisionShape = SubResource("RectangleShape2D_ontns") +CollisionPosition = Vector2(0, -65.23) +metadata/tags = ["rock"] diff --git a/maps/mapManager.tscn b/maps/mapManager.tscn index 1b3d656..de58576 100644 --- a/maps/mapManager.tscn +++ b/maps/mapManager.tscn @@ -1,9 +1,206 @@ -[gd_scene load_steps=5 format=3 uid="uid://d382cexpr4075"] +[gd_scene load_steps=11 format=3 uid="uid://d382cexpr4075"] [ext_resource type="Script" path="res://core/sceneInstance.gd" id="1_p0vo1"] [ext_resource type="PackedScene" uid="uid://0m1hk2nu4bps" path="res://core/player.tscn" id="2_fyjh8"] [ext_resource type="PackedScene" uid="uid://wlqsvbqpcbh" path="res://maps/map1.tscn" id="2_qgqfi"] -[ext_resource type="PackedScene" uid="uid://524sv8spw6go" path="res://core/Cursor.tscn" id="4_uwedi"] +[ext_resource type="PackedScene" uid="uid://bxin06eifwhb5" path="res://core/Background.tscn" id="4_81gsq"] +[ext_resource type="Texture2D" uid="uid://cr27nsk1jw2ks" path="res://textures/pattern/Pattern_swamp.png" id="5_pl2si"] + +[sub_resource type="Animation" id="Animation_gjtj4"] +length = 0.001 +tracks/0/type = "bezier" +tracks/0/imported = false +tracks/0/enabled = true +tracks/0/path = NodePath("NextScene:position:x") +tracks/0/interp = 1 +tracks/0/loop_wrap = true +tracks/0/keys = { +"handle_modes": PackedInt32Array(0), +"points": PackedFloat32Array(10000, -0.25, 0, 0.25, 0), +"times": PackedFloat32Array(0) +} +tracks/1/type = "bezier" +tracks/1/imported = false +tracks/1/enabled = true +tracks/1/path = NodePath("NextScene:position:y") +tracks/1/interp = 1 +tracks/1/loop_wrap = true +tracks/1/keys = { +"handle_modes": PackedInt32Array(0), +"points": PackedFloat32Array(0, -0.25, 0, 0.25, 0), +"times": PackedFloat32Array(0) +} +tracks/2/type = "bezier" +tracks/2/imported = false +tracks/2/enabled = true +tracks/2/path = NodePath("CurrentScene:position:x") +tracks/2/interp = 1 +tracks/2/loop_wrap = true +tracks/2/keys = { +"handle_modes": PackedInt32Array(0), +"points": PackedFloat32Array(0, -0.25, 0, 0.25, 0), +"times": PackedFloat32Array(0) +} +tracks/3/type = "bezier" +tracks/3/imported = false +tracks/3/enabled = true +tracks/3/path = NodePath("CurrentScene:position:y") +tracks/3/interp = 1 +tracks/3/loop_wrap = true +tracks/3/keys = { +"handle_modes": PackedInt32Array(0), +"points": PackedFloat32Array(0, -0.25, 0, 0.25, 0), +"times": PackedFloat32Array(0) +} + +[sub_resource type="Animation" id="Animation_w8b25"] +resource_name = "travel_down" +tracks/0/type = "bezier" +tracks/0/imported = false +tracks/0/enabled = true +tracks/0/path = NodePath("NextScene:position:x") +tracks/0/interp = 1 +tracks/0/loop_wrap = true +tracks/0/keys = { +"handle_modes": PackedInt32Array(0, 0), +"points": PackedFloat32Array(0, -0.25, 0, 0.25, 0, 0, -0.25, 0, 0.25, 0), +"times": PackedFloat32Array(0, 1) +} +tracks/1/type = "bezier" +tracks/1/imported = false +tracks/1/enabled = true +tracks/1/path = NodePath("NextScene:position:y") +tracks/1/interp = 1 +tracks/1/loop_wrap = true +tracks/1/keys = { +"handle_modes": PackedInt32Array(0, 0), +"points": PackedFloat32Array(10000, -0.25, 0, 0.25, 0, 0, -0.25, 0, 0.25, 0), +"times": PackedFloat32Array(0, 1) +} +tracks/2/type = "bezier" +tracks/2/imported = false +tracks/2/enabled = true +tracks/2/path = NodePath("CurrentScene:position:x") +tracks/2/interp = 1 +tracks/2/loop_wrap = true +tracks/2/keys = { +"handle_modes": PackedInt32Array(0, 0, 0), +"points": PackedFloat32Array(0, -0.25, 0, 0.25, 0, 0, -0.25, 0, 0.25, 0, 0, -0.25, 0, 0.25, 0), +"times": PackedFloat32Array(0, 0.3, 1) +} +tracks/3/type = "bezier" +tracks/3/imported = false +tracks/3/enabled = true +tracks/3/path = NodePath("CurrentScene:position:y") +tracks/3/interp = 1 +tracks/3/loop_wrap = true +tracks/3/keys = { +"handle_modes": PackedInt32Array(0, 0, 0), +"points": PackedFloat32Array(0, -0.25, 0, 0.25, 0, 0, -0.25, 0, 0.25, 0, -10000, -0.25, 0, 0.25, 0), +"times": PackedFloat32Array(0, 0.3, 1) +} + +[sub_resource type="Animation" id="Animation_pd367"] +resource_name = "travel_left" +tracks/0/type = "bezier" +tracks/0/imported = false +tracks/0/enabled = true +tracks/0/path = NodePath("CurrentScene:position:x") +tracks/0/interp = 1 +tracks/0/loop_wrap = true +tracks/0/keys = { +"handle_modes": PackedInt32Array(0, 0, 0), +"points": PackedFloat32Array(0, -0.25, 0, 0.25, 0, 0, -0.25, 0, 0.25, 0, -10000, -0.25, 0, 0.25, 0), +"times": PackedFloat32Array(0, 0.3, 1) +} +tracks/1/type = "bezier" +tracks/1/imported = false +tracks/1/enabled = true +tracks/1/path = NodePath("CurrentScene:position:y") +tracks/1/interp = 1 +tracks/1/loop_wrap = true +tracks/1/keys = { +"handle_modes": PackedInt32Array(0, 0, 0), +"points": PackedFloat32Array(0, -0.25, 0, 0.25, 0, 0, -0.25, 0, 0.25, 0, 0, -0.25, 0, 0.25, 0), +"times": PackedFloat32Array(0, 0.3, 1) +} +tracks/2/type = "bezier" +tracks/2/imported = false +tracks/2/enabled = true +tracks/2/path = NodePath("NextScene:position:x") +tracks/2/interp = 1 +tracks/2/loop_wrap = true +tracks/2/keys = { +"handle_modes": PackedInt32Array(0, 0), +"points": PackedFloat32Array(10000, -0.25, 0, 0.25, 0, 0, -0.25, 0, 0.25, 0), +"times": PackedFloat32Array(0, 1) +} +tracks/3/type = "bezier" +tracks/3/imported = false +tracks/3/enabled = true +tracks/3/path = NodePath("NextScene:position:y") +tracks/3/interp = 1 +tracks/3/loop_wrap = true +tracks/3/keys = { +"handle_modes": PackedInt32Array(0, 0), +"points": PackedFloat32Array(0, -0.25, 0, 0.25, 0, 0, -0.25, 0, 0.25, 0), +"times": PackedFloat32Array(0, 1) +} + +[sub_resource type="Animation" id="Animation_c7s7o"] +resource_name = "travel_up" +tracks/0/type = "bezier" +tracks/0/imported = false +tracks/0/enabled = true +tracks/0/path = NodePath("CurrentScene:position:x") +tracks/0/interp = 1 +tracks/0/loop_wrap = true +tracks/0/keys = { +"handle_modes": PackedInt32Array(0, 0, 0), +"points": PackedFloat32Array(0, -0.25, 0, 0.25, 0, 0, -0.25, 0, 0.25, 0, 0, -0.25, 0, 0.25, 0), +"times": PackedFloat32Array(0, 0.3, 1) +} +tracks/1/type = "bezier" +tracks/1/imported = false +tracks/1/enabled = true +tracks/1/path = NodePath("CurrentScene:position:y") +tracks/1/interp = 1 +tracks/1/loop_wrap = true +tracks/1/keys = { +"handle_modes": PackedInt32Array(0, 0, 0), +"points": PackedFloat32Array(0, -0.25, 0, 0.25, 0, 0, -0.25, 0, 0.25, 0, 10000, -0.25, 0, 0.25, 0), +"times": PackedFloat32Array(0, 0.3, 1) +} +tracks/2/type = "bezier" +tracks/2/imported = false +tracks/2/enabled = true +tracks/2/path = NodePath("NextScene:position:x") +tracks/2/interp = 1 +tracks/2/loop_wrap = true +tracks/2/keys = { +"handle_modes": PackedInt32Array(0, 0), +"points": PackedFloat32Array(0, -0.25, 0, 0.25, 0, 0, -0.25, 0, 0.25, 0), +"times": PackedFloat32Array(0, 1) +} +tracks/3/type = "bezier" +tracks/3/imported = false +tracks/3/enabled = true +tracks/3/path = NodePath("NextScene:position:y") +tracks/3/interp = 1 +tracks/3/loop_wrap = true +tracks/3/keys = { +"handle_modes": PackedInt32Array(0, 0), +"points": PackedFloat32Array(-10000, -0.25, 0, 0.25, 0, 0, -0.25, 0, 0.25, 0), +"times": PackedFloat32Array(0, 1) +} + +[sub_resource type="AnimationLibrary" id="AnimationLibrary_q5lfn"] +_data = { +"RESET": SubResource("Animation_gjtj4"), +"travel_down": SubResource("Animation_w8b25"), +"travel_left": SubResource("Animation_pd367"), +"travel_up": SubResource("Animation_c7s7o") +} [node name="MapManager" type="Node2D"] script = ExtResource("1_p0vo1") @@ -12,6 +209,21 @@ InitialMap = ExtResource("2_qgqfi") [node name="CurrentScene" type="Node2D" parent="."] -[node name="Cursor" parent="." instance=ExtResource("4_uwedi")] +[node name="NextScene" type="Node2D" parent="."] +position = Vector2(10000, 0) + +[node name="AnimationPlayer" type="AnimationPlayer" parent="."] +libraries = { +"": SubResource("AnimationLibrary_q5lfn") +} + +[node name="Camera2D" type="Camera2D" parent="."] +zoom = Vector2(0.13, 0.13) + +[node name="Background" parent="Camera2D" instance=ExtResource("4_81gsq")] +Pattern = ExtResource("5_pl2si") +PatternColor = Color(1, 1, 1, 0.490196) +BGColor = Color(0.173374, 0.319037, 0.221103, 1) [connection signal="ready" from="." to="." method="_on_ready"] +[connection signal="animation_finished" from="AnimationPlayer" to="." method="_on_animation_player_animation_finished"] diff --git a/extracted/Texture2D/GroundExtensions_All_01_SPRT.png b/textures/atlas/GroundExtensions_All_01_SPRT.png similarity index 100% rename from extracted/Texture2D/GroundExtensions_All_01_SPRT.png rename to textures/atlas/GroundExtensions_All_01_SPRT.png diff --git a/extracted/Texture2D/GroundExtensions_All_01_SPRT.png.import b/textures/atlas/GroundExtensions_All_01_SPRT.png.import similarity index 74% rename from extracted/Texture2D/GroundExtensions_All_01_SPRT.png.import rename to textures/atlas/GroundExtensions_All_01_SPRT.png.import index c033712..45f1c99 100644 --- a/extracted/Texture2D/GroundExtensions_All_01_SPRT.png.import +++ b/textures/atlas/GroundExtensions_All_01_SPRT.png.import @@ -3,15 +3,15 @@ importer="texture" type="CompressedTexture2D" uid="uid://cypb81fuw4w44" -path="res://.godot/imported/GroundExtensions_All_01_SPRT.png-5c1cdd42acb7add9ff8cd748828f96b8.ctex" +path="res://.godot/imported/GroundExtensions_All_01_SPRT.png-d47adbbfdf8892d530b662fb8ce80df9.ctex" metadata={ "vram_texture": false } [deps] -source_file="res://extracted/Texture2D/GroundExtensions_All_01_SPRT.png" -dest_files=["res://.godot/imported/GroundExtensions_All_01_SPRT.png-5c1cdd42acb7add9ff8cd748828f96b8.ctex"] +source_file="res://textures/atlas/GroundExtensions_All_01_SPRT.png" +dest_files=["res://.godot/imported/GroundExtensions_All_01_SPRT.png-d47adbbfdf8892d530b662fb8ce80df9.ctex"] [params]