diff options
Diffstat (limited to 'Levels')
-rw-r--r-- | Levels/Level.gd | 11 | ||||
-rw-r--r-- | Levels/Level_0001.tscn | 15 | ||||
-rw-r--r-- | Levels/Level_0002.tscn | 15 | ||||
-rw-r--r-- | Levels/Level_0003.tscn | 13 | ||||
-rw-r--r-- | Levels/Level_0004.tscn | 13 | ||||
-rw-r--r-- | Levels/Level_0005.tscn | 13 |
6 files changed, 72 insertions, 8 deletions
diff --git a/Levels/Level.gd b/Levels/Level.gd index 0706b0b..910feb8 100644 --- a/Levels/Level.gd +++ b/Levels/Level.gd @@ -1,6 +1,8 @@ extends Node2D +var character: CharacterBody2D + var idx = 0 var timer = 0 @@ -14,8 +16,15 @@ func _ready(): self.set_hud() get_tree().get_root().size_changed.connect(Callable(self, 'resize_hud')) - var character = load("res://Characters/" + Network.player.character + ".tscn").instantiate() + character = load("res://Characters/" + Network.player.character + ".tscn").instantiate() self.set_player(character) + + if has_node("ParallaxBackground"): + $ParallaxBackground/ParallaxLayer.motion_mirroring.x = ( + $ParallaxBackground/ParallaxLayer/Sprite2D.get_rect().size + * + $ParallaxBackground/ParallaxLayer/Sprite2D.scale + ).x func _process(delta): diff --git a/Levels/Level_0001.tscn b/Levels/Level_0001.tscn index 86c527c..6d00d95 100644 --- a/Levels/Level_0001.tscn +++ b/Levels/Level_0001.tscn @@ -1,10 +1,11 @@ -[gd_scene load_steps=6 format=3 uid="uid://c5rui0aqppyhs"] +[gd_scene load_steps=7 format=3 uid="uid://c5rui0aqppyhs"] -[ext_resource type="TileSet" uid="uid://c5h11mosp5q0j" path="res://Assets/Environment/generic_platformer.tres" id="1"] +[ext_resource type="TileSet" uid="uid://c5h11mosp5q0j" path="res://Assets/Environment/generic_platformer/generic_platformer.tres" id="1"] [ext_resource type="PackedScene" uid="uid://bxkau6af500fs" path="res://Characters/Character.tscn" id="2"] [ext_resource type="PackedScene" uid="uid://cssvf3k8yn751" path="res://Objects/Flag.tscn" id="3"] [ext_resource type="Script" path="res://Levels/Level_0001.gd" id="4"] [ext_resource type="PackedScene" path="res://Objects/CheckFall.tscn" id="5"] +[ext_resource type="Texture2D" uid="uid://daf6e8ddbsfgp" path="res://Assets/Environment/generic_platformer/2015-02-26 [DB32](Generic Platformer)(Mountains).png" id="6_kahe0"] [node name="Level_0001" type="Node2D"] script = ExtResource("4") @@ -34,3 +35,13 @@ editor_draw_limits = true [node name="CheckFall" parent="." instance=ExtResource("5")] position = Vector2(1019, 772) scale = Vector2(8, 1) + +[node name="ParallaxBackground" type="ParallaxBackground" parent="."] + +[node name="ParallaxLayer" type="ParallaxLayer" parent="ParallaxBackground"] + +[node name="Sprite2D" type="Sprite2D" parent="ParallaxBackground/ParallaxLayer"] +position = Vector2(-103, -251) +scale = Vector2(6.93056, 6.93056) +texture = ExtResource("6_kahe0") +centered = false diff --git a/Levels/Level_0002.tscn b/Levels/Level_0002.tscn index 9397650..8c7c9fa 100644 --- a/Levels/Level_0002.tscn +++ b/Levels/Level_0002.tscn @@ -1,4 +1,4 @@ -[gd_scene load_steps=28 format=3 uid="uid://7i6ssblunihy"] +[gd_scene load_steps=29 format=3 uid="uid://7i6ssblunihy"] [ext_resource type="Texture2D" uid="uid://cv2wvpr5mttn4" path="res://Assets/Environment/WinterTileset/Tiles/1.png" id="1"] [ext_resource type="PackedScene" uid="uid://bxkau6af500fs" path="res://Characters/Character.tscn" id="2"] @@ -15,6 +15,7 @@ [ext_resource type="Texture2D" uid="uid://doawng5y4amm5" path="res://Assets/Environment/WinterTileset/Object/Tree_2.png" id="13"] [ext_resource type="Texture2D" uid="uid://btr0korernb4" path="res://Assets/Environment/WinterTileset/Object/Igloo.png" id="14"] [ext_resource type="Texture2D" uid="uid://xffp6y4guc5u" path="res://Assets/Environment/WinterTileset/Object/Tree_1.png" id="15"] +[ext_resource type="Texture2D" uid="uid://bb2wq2h3sij5t" path="res://Assets/Environment/WinterTileset/BG/BG.png" id="16_1c524"] [sub_resource type="TileSetAtlasSource" id="TileSetAtlasSource_bmefr"] texture = ExtResource("1") @@ -458,7 +459,7 @@ script = ExtResource("9") [node name="TileMap" type="TileMap" parent="."] scale = Vector2(0.125, 0.125) tile_set = SubResource("10") -cell_quadrant_size = 128 +rendering_quadrant_size = 128 format = 2 layer_0/tile_data = PackedInt32Array(-1441784, 7, 0, 14, 0, 0, 786440, 7, 0, 1048604, 1, 0, 1048603, 1, 0, 1048602, 1, 0, 1048601, 1, 0, 1048600, 1, 0, 1048599, 1, 0, 1048598, 1, 0, 1048597, 1, 0, 1048596, 1, 0, 1048595, 1, 0, 851976, 7, 0, 917512, 7, 0, 983048, 7, 0, 1048584, 0, 0, 1048594, 1, 0, 1048593, 1, 0, 1048592, 1, 0, 1048591, 1, 0, 1048590, 1, 0, 1048589, 1, 0, 1048588, 1, 0, 1048587, 1, 0, 1048586, 1, 0, 1048585, 1, 0, 1048605, 2, 0, 983069, 9, 0, 720904, 7, 0, 655368, 7, 0, 589832, 7, 0, 524296, 7, 0, 458760, 7, 0, 393224, 7, 0, 65550, 6, 0, 131086, 6, 0, 196622, 6, 0, 262158, 6, 0, 327694, 6, 0, 393230, 6, 0, 458766, 6, 0, 43, 1, 0, 42, 1, 0, 41, 1, 0, 40, 1, 0, 39, 1, 0, 38, 1, 0, 37, 1, 0, 36, 1, 0, 35, 1, 0, 34, 1, 0, 33, 1, 0, 32, 1, 0, 31, 1, 0, 30, 1, 0, 327688, 7, 0, 262152, 7, 0, 196616, 7, 0, 131080, 7, 0, 65544, 7, 0, 8, 7, 0, -65528, 7, 0, -131064, 7, 0, -196600, 7, 0, -262136, 7, 0, -65522, 9, 0, -65498, 8, 0, -655293, 3, 0, -524231, 3, 0, -327631, 3, 0, -393166, 10, 0, -589766, 10, 0, -655291, 5, 0, -524229, 5, 0, -327629, 5, 0, -327630, 4, 0, -524230, 4, 0, -655292, 4, 0, -1376248, 7, 0, -1310712, 7, 0, -1245176, 7, 0, -1179640, 7, 0, -1114104, 7, 0, -1048568, 7, 0, -983032, 7, 0, -917496, 7, 0, -851960, 7, 0, -786424, 7, 0, -720888, 7, 0, -655352, 7, 0, -589816, 7, 0, -524280, 7, 0, -458744, 7, 0, -393208, 7, 0, -327672, 7, 0, 524302, 6, 0, 589838, 6, 0, 655374, 6, 0, 720910, 6, 0, 786446, 6, 0, 29, 1, 0, 28, 1, 0, 27, 1, 0, 26, 1, 0, 25, 1, 0, 24, 1, 0, 23, 1, 0, 22, 1, 0, 21, 1, 0, 20, 1, 0, 19, 1, 0, 18, 1, 0, 17, 1, 0, 16, 1, 0, 15, 1, 0, 44, 2, 0) @@ -482,3 +483,13 @@ editor_draw_limits = true [node name="CheckFall" parent="." instance=ExtResource("5")] position = Vector2(472, 320) scale = Vector2(8, 1) + +[node name="ParallaxBackground" type="ParallaxBackground" parent="."] + +[node name="ParallaxLayer" type="ParallaxLayer" parent="ParallaxBackground"] + +[node name="Sprite2D" type="Sprite2D" parent="ParallaxBackground/ParallaxLayer"] +position = Vector2(74.0001, -401) +scale = Vector2(0.784155, 0.784155) +texture = ExtResource("16_1c524") +centered = false diff --git a/Levels/Level_0003.tscn b/Levels/Level_0003.tscn index 7f895fc..bdc022c 100644 --- a/Levels/Level_0003.tscn +++ b/Levels/Level_0003.tscn @@ -1,4 +1,4 @@ -[gd_scene load_steps=28 format=3 uid="uid://cj3urxdtcls8x"] +[gd_scene load_steps=29 format=3 uid="uid://cj3urxdtcls8x"] [ext_resource type="Texture2D" uid="uid://cv2wvpr5mttn4" path="res://Assets/Environment/WinterTileset/Tiles/1.png" id="1"] [ext_resource type="PackedScene" uid="uid://bxkau6af500fs" path="res://Characters/Character.tscn" id="2"] @@ -15,6 +15,7 @@ [ext_resource type="Texture2D" uid="uid://doawng5y4amm5" path="res://Assets/Environment/WinterTileset/Object/Tree_2.png" id="13"] [ext_resource type="Texture2D" uid="uid://btr0korernb4" path="res://Assets/Environment/WinterTileset/Object/Igloo.png" id="14"] [ext_resource type="Texture2D" uid="uid://xffp6y4guc5u" path="res://Assets/Environment/WinterTileset/Object/Tree_1.png" id="15"] +[ext_resource type="Texture2D" uid="uid://bb2wq2h3sij5t" path="res://Assets/Environment/WinterTileset/BG/BG.png" id="16_iyx8m"] [sub_resource type="TileSetAtlasSource" id="TileSetAtlasSource_v701e"] texture = ExtResource("1") @@ -515,3 +516,13 @@ editor_draw_limits = true [node name="CheckFall" parent="." instance=ExtResource("5")] position = Vector2(674, 435) scale = Vector2(8, 1) + +[node name="ParallaxBackground" type="ParallaxBackground" parent="."] + +[node name="ParallaxLayer" type="ParallaxLayer" parent="ParallaxBackground"] + +[node name="Sprite2D" type="Sprite2D" parent="ParallaxBackground/ParallaxLayer"] +position = Vector2(-153, -498) +scale = Vector2(1.14446, 1.14446) +texture = ExtResource("16_iyx8m") +centered = false diff --git a/Levels/Level_0004.tscn b/Levels/Level_0004.tscn index c4bc19b..71e83b3 100644 --- a/Levels/Level_0004.tscn +++ b/Levels/Level_0004.tscn @@ -1,10 +1,11 @@ -[gd_scene load_steps=6 format=3 uid="uid://b4fd51otvuatn"] +[gd_scene load_steps=7 format=3 uid="uid://b4fd51otvuatn"] [ext_resource type="TileSet" path="res://Assets/Environment/nestle.tres" id="1"] [ext_resource type="PackedScene" uid="uid://bxkau6af500fs" path="res://Characters/Character.tscn" id="2"] [ext_resource type="PackedScene" uid="uid://cssvf3k8yn751" path="res://Objects/Flag.tscn" id="3"] [ext_resource type="Script" path="res://Levels/Level_0004.gd" id="4"] [ext_resource type="PackedScene" path="res://Objects/CheckFall.tscn" id="5"] +[ext_resource type="Texture2D" uid="uid://56ec4yc6bstu" path="res://Assets/Environment/FreeTileset/BG/BG.png" id="6_7yvqi"] [node name="Level_0004" type="Node2D"] script = ExtResource("4") @@ -39,3 +40,13 @@ editor_draw_limits = true [node name="CheckFall" parent="." instance=ExtResource("5")] position = Vector2(824, 320) scale = Vector2(8, 1) + +[node name="ParallaxBackground" type="ParallaxBackground" parent="."] + +[node name="ParallaxLayer" type="ParallaxLayer" parent="ParallaxBackground"] + +[node name="Sprite2D" type="Sprite2D" parent="ParallaxBackground/ParallaxLayer"] +position = Vector2(-3, -730) +scale = Vector2(1.504, 1.504) +texture = ExtResource("6_7yvqi") +centered = false diff --git a/Levels/Level_0005.tscn b/Levels/Level_0005.tscn index b41530f..208c049 100644 --- a/Levels/Level_0005.tscn +++ b/Levels/Level_0005.tscn @@ -1,10 +1,11 @@ -[gd_scene load_steps=6 format=3 uid="uid://cdgecw8l2lhto"] +[gd_scene load_steps=7 format=3 uid="uid://cdgecw8l2lhto"] [ext_resource type="TileSet" path="res://Assets/Environment/nestle.tres" id="1"] [ext_resource type="PackedScene" uid="uid://bxkau6af500fs" path="res://Characters/Character.tscn" id="2"] [ext_resource type="PackedScene" uid="uid://cssvf3k8yn751" path="res://Objects/Flag.tscn" id="3"] [ext_resource type="Script" path="res://Levels/Level_0005.gd" id="4"] [ext_resource type="PackedScene" path="res://Objects/CheckFall.tscn" id="5"] +[ext_resource type="Texture2D" uid="uid://56ec4yc6bstu" path="res://Assets/Environment/FreeTileset/BG/BG.png" id="6_y8ca1"] [node name="Level_0005" type="Node2D"] script = ExtResource("4") @@ -41,3 +42,13 @@ editor_draw_limits = true [node name="CheckFall" parent="." instance=ExtResource("5")] position = Vector2(824, 216) scale = Vector2(8, 1) + +[node name="ParallaxBackground" type="ParallaxBackground" parent="."] + +[node name="ParallaxLayer" type="ParallaxLayer" parent="ParallaxBackground"] + +[node name="Sprite2D" type="Sprite2D" parent="ParallaxBackground/ParallaxLayer"] +position = Vector2(-1385, -1856) +scale = Vector2(2.73615, 2.73615) +texture = ExtResource("6_y8ca1") +centered = false |