added parallax background

This commit is contained in:
OddlyTimbot committed 2024-08-04 18:00:21 -04:00
1 parent 3945ea9f65
commit e8da3ca6c6
13 files changed
+62 -49

No files matched your search

+39 -26
View File
@@ -1,4 +1,4 @@
[gd_scene load_steps=14 format=3 uid="uid://y083suj12rld"]
[gd_scene load_steps=17 format=3 uid="uid://y083suj12rld"]
[ext_resource type="Script" path="res://scripts/gamecontroller.gd" id="1_77wyw"]
[ext_resource type="PackedScene" uid="uid://go4yc8hfo1gq" path="res://scenes/character.tscn" id="2_64ccm"]
@@ -6,6 +6,9 @@
[ext_resource type="Script" path="res://scripts/Trigger.gd" id="2_nfj1w"]
[ext_resource type="PackedScene" uid="uid://ukuu7p7vhlq" path="res://scenes/crate.tscn" id="5_u8rgi"]
[ext_resource type="PackedScene" uid="uid://dvd1p6xue0ub2" path="res://scenes/platform.tscn" id="6_bcgm6"]
[ext_resource type="Texture2D" uid="uid://dly4g7fvvtamm" path="res://graphics/background/BG Image.png" id="7_gwkt6"]
[ext_resource type="Texture2D" uid="uid://cw50mfjp2np08" path="res://graphics/background/Additional Sky.png" id="8_pwboq"]
[ext_resource type="Texture2D" uid="uid://6olcj1w1svdg" path="res://graphics/background/Additional Water.png" id="9_pi0v8"]
[sub_resource type="TileSetAtlasSource" id="TileSetAtlasSource_xg6qs"]
texture = ExtResource("2_l22q1")
@@ -177,17 +180,8 @@ texture_region_size = Vector2i(32, 32)
6:1/0/terrains_peering_bit/top_left_corner = 0
6:1/0/terrains_peering_bit/top_side = 0
7:1/0 = 0
7:1/0/terrain_set = 0
7:1/0/terrain = 0
7:1/0/physics_layer_0/linear_velocity = Vector2(0, 0)
7:1/0/physics_layer_0/angular_velocity = 0.0
7:1/0/terrains_peering_bit/right_side = 0
7:1/0/terrains_peering_bit/bottom_right_corner = 0
7:1/0/terrains_peering_bit/bottom_side = 0
7:1/0/terrains_peering_bit/bottom_left_corner = 0
7:1/0/terrains_peering_bit/left_side = 0
7:1/0/terrains_peering_bit/top_side = 0
7:1/0/terrains_peering_bit/top_right_corner = 0
9:1/0 = 0
9:1/0/terrain_set = 0
9:1/0/terrain = 0
@@ -486,6 +480,21 @@ sources/0 = SubResource("TileSetAtlasSource_xg6qs")
[sub_resource type="CircleShape2D" id="CircleShape2D_x8qck"]
radius = 60.2993
[sub_resource type="Animation" id="Animation_buq5q"]
length = 0.001
tracks/0/type = "value"
tracks/0/imported = false
tracks/0/enabled = true
tracks/0/path = NodePath(".:position")
tracks/0/interp = 1
tracks/0/loop_wrap = true
tracks/0/keys = {
"times": PackedFloat32Array(0),
"transitions": PackedFloat32Array(1),
"update": 0,
"values": [Vector2(472, -21)]
}
[sub_resource type="Animation" id="Animation_ueqe3"]
resource_name = "move"
loop_mode = 2
@@ -502,21 +511,6 @@ tracks/0/keys = {
"values": [Vector2(472, -21), Vector2(540, -21)]
}
[sub_resource type="Animation" id="Animation_buq5q"]
length = 0.001
tracks/0/type = "value"
tracks/0/imported = false
tracks/0/enabled = true
tracks/0/path = NodePath(".:position")
tracks/0/interp = 1
tracks/0/loop_wrap = true
tracks/0/keys = {
"times": PackedFloat32Array(0),
"transitions": PackedFloat32Array(1),
"update": 0,
"values": [Vector2(472, -21)]
}
[sub_resource type="AnimationLibrary" id="AnimationLibrary_36p5o"]
_data = {
"RESET": SubResource("Animation_buq5q"),
@@ -529,7 +523,7 @@ script = ExtResource("1_77wyw")
[node name="TileMap" type="TileMap" parent="."]
tile_set = SubResource("TileSet_47g5u")
format = 2
layer_0/tile_data = PackedInt32Array(262141, 262144, 2, 262142, 65536, 4, 262143, 65536, 4, 196608, 65536, 4, 196609, 65536, 4, 196610, 131072, 4, 196613, 262144, 4, 196605, 262144, 1, 131069, 262144, 1, 65534, 65536, 4, 65535, 131072, 4, 4, 131072, 2, 3, 0, 2, -65533, 0, 0, -65532, 131072, 0, 262151, 262144, 2, 196615, 262144, 0, 262153, 262144, 4, 262156, 131072, 2, 196620, 131072, 0, 196619, 0, 0, 262155, 0, 2, 7, 0, 4, 8, 65536, 4, 9, 65536, 4, 10, 1048576, 4, -65526, 983040, 3, -65525, 65536, 4, -65524, 131072, 4, 65550, 0, 4, 65551, 851968, 3, 65552, 131072, 4, 131087, 262144, 2, 65533, 983040, 3)
layer_0/tile_data = PackedInt32Array(262141, 262144, 2, 262142, 65536, 4, 262143, 65536, 4, 196608, 65536, 4, 196609, 65536, 4, 196610, 131072, 4, 196613, 262144, 4, 196605, 262144, 1, 131069, 262144, 1, 65534, 65536, 4, 65535, 131072, 4, 4, 131072, 2, 3, 0, 2, -65533, 0, 0, -65532, 131072, 0, 262151, 262144, 2, 196615, 262144, 0, 262153, 262144, 4, 262156, 131072, 2, 196620, 131072, 0, 196619, 0, 0, 262155, 0, 2, 7, 0, 4, 8, 65536, 4, 9, 65536, 4, 10, 1048576, 4, -65526, 983040, 3, -65525, 65536, 4, -65524, 131072, 4, 65550, 0, 4, 65551, 851968, 3, 65552, 131072, 4, 131087, 262144, 2, 65533, 983040, 3, 196630, 0, 4, 196631, 65536, 4, 196632, 131072, 4, 65559, 262144, 4)
[node name="level" type="Node2D" parent="."]
@@ -569,5 +563,24 @@ libraries = {
}
autoplay = "move"
[node name="ParallaxBackground" type="ParallaxBackground" parent="."]
[node name="ParallaxLayer" type="ParallaxLayer" parent="ParallaxBackground"]
motion_mirroring = Vector2(324, 0)
[node name="Sprite2D" type="Sprite2D" parent="ParallaxBackground/ParallaxLayer"]
position = Vector2(150, 50)
texture = ExtResource("7_gwkt6")
[node name="Sprite2D2" type="Sprite2D" parent="ParallaxBackground/ParallaxLayer"]
position = Vector2(150, -115.5)
scale = Vector2(12, 8.21875)
texture = ExtResource("8_pwboq")
[node name="Sprite2D3" type="Sprite2D" parent="ParallaxBackground/ParallaxLayer"]
position = Vector2(150.5, 175.5)
scale = Vector2(11.9687, 4.21875)
texture = ExtResource("9_pi0v8")
[connection signal="areatrigger" from="AreaTrigger" to="." method="_on_area_2d_areatrigger"]
[connection signal="body_entered" from="AreaTrigger" to="AreaTrigger" method="_on_body_entered"]