1
Fork 0
mirror of https://github.com/Steffo99/watermelonkeys-patched-ld51.git synced 2024-11-25 17:34:24 +00:00
fading-sun/Level1.tscn

153 lines
9.9 KiB
Text
Raw Normal View History

2022-10-03 14:16:40 +00:00
[gd_scene load_steps=12 format=2]
2022-10-03 13:05:31 +00:00
2022-10-03 14:32:11 +00:00
[ext_resource path="res://light.tscn" type="PackedScene" id=1]
2022-10-03 14:59:38 +00:00
[ext_resource path="res://Player.tscn" type="PackedScene" id=2]
2022-10-03 13:05:31 +00:00
[ext_resource path="res://brick_tileset.tres" type="TileSet" id=3]
[ext_resource path="res://ASSETS/Background/Layer 7.png" type="Texture" id=4]
[ext_resource path="res://ASSETS/Background/Skyline2.png" type="Texture" id=5]
[ext_resource path="res://ASSETS/Background/Skyline1.png" type="Texture" id=6]
2022-10-03 16:13:44 +00:00
[ext_resource path="res://ASSETS/Sunimation/Sun_0_5000ms.png" type="Texture" id=8]
2022-10-03 13:27:12 +00:00
[sub_resource type="GDScript" id=3]
2022-10-03 14:59:38 +00:00
script/source = "extends Node2D
2022-10-03 13:27:12 +00:00
func _input(event):
if Input.is_action_just_pressed(\"quit\"):
get_tree().quit()
func _on_DeathZone_entered(body):
2022-10-03 14:16:40 +00:00
get_tree().change_scene(\"res://Dead.tscn\")
2022-10-03 13:27:12 +00:00
"
2022-10-03 13:05:31 +00:00
2022-10-03 16:13:44 +00:00
[sub_resource type="GDScript" id=6]
script/source = "extends Sprite
export(String, DIR) var sun_frames_path = \"res://ASSETS/Sunimation\"
signal sun_anim_done
var frames := []
var timer := Timer.new()
func _ready():
add_child(timer)
timer.one_shot = true
var frames_names = list_files_in_directory(sun_frames_path, [\"png\"])
frames.resize(len(frames_names))
for f in frames_names:
var tokens = f.trim_prefix(\"Sun_\").trim_suffix(\"ms.png\").split(\"_\")
# print(f, \" \", tmp, \" \", tokens)
var idx = int(tokens[0])
frames[idx] = {
file = \"%s/%s\" % [sun_frames_path, f],
frame_len = float(tokens[1])/1000.0
}
# print(frames)
animate()
func animate():
for fr in frames:
texture = load(fr.file)
timer.start(fr.frame_len)
yield(timer, \"timeout\")
texture = null
emit_signal(\"sun_anim_done\")
func list_files_in_directory(path, ext_filter := [], allow_hidden := false):
var files = []
var dir = Directory.new()
dir.open(path)
dir.list_dir_begin()
var file = dir.get_next()
while file != \"\":
var is_hidden = file.begins_with(\".\")
var ext_ok = (len(ext_filter) == 0 or file.get_extension() in ext_filter)
if (not is_hidden or allow_hidden) and ext_ok:
files.append(file)
file = dir.get_next()
dir.list_dir_end()
return files
"
2022-10-03 13:05:31 +00:00
2022-10-03 13:27:12 +00:00
[sub_resource type="GDScript" id=5]
script/source = "extends Area2D
func _process(delta):
var p = owner.get_meta(\"player\")
position.x = p.position.x
"
[sub_resource type="RectangleShape2D" id=4]
extents = Vector2( 212, 31 )
2022-10-03 14:59:38 +00:00
[node name="Level1" type="Node2D"]
2022-10-03 13:27:12 +00:00
script = SubResource( 3 )
2022-10-03 13:05:31 +00:00
[node name="ParallaxBackground" type="ParallaxBackground" parent="."]
[node name="ParallaxLayer2" type="ParallaxLayer" parent="ParallaxBackground"]
motion_scale = Vector2( 0, 0 )
2022-10-03 14:32:11 +00:00
[node name="Skybox" type="Sprite" parent="ParallaxBackground/ParallaxLayer2"]
2022-10-03 13:05:31 +00:00
texture = ExtResource( 4 )
2022-10-03 16:13:44 +00:00
[node name="Sun" type="Sprite" parent="ParallaxBackground/ParallaxLayer2"]
position = Vector2( 0, 88 )
texture = ExtResource( 8 )
script = SubResource( 6 )
2022-10-03 13:05:31 +00:00
[node name="Purple Sky" type="ParallaxLayer" parent="ParallaxBackground"]
position = Vector2( 0, -90 )
motion_scale = Vector2( 0.4, 0.4 )
motion_mirroring = Vector2( 1920, 0 )
[node name="Sprite" type="Sprite" parent="ParallaxBackground/Purple Sky"]
position = Vector2( 150, 166 )
z_index = -10
texture = ExtResource( 6 )
[node name="ParallaxLayer" type="ParallaxLayer" parent="ParallaxBackground"]
position = Vector2( 1, 138 )
motion_scale = Vector2( 0.65, 0.65 )
motion_mirroring = Vector2( 1920, 0 )
[node name="Sprite" type="Sprite" parent="ParallaxBackground/ParallaxLayer"]
texture = ExtResource( 5 )
2022-10-03 13:27:12 +00:00
2022-10-03 14:59:38 +00:00
[node name="TileMap" type="TileMap" parent="."]
tile_set = ExtResource( 3 )
cell_size = Vector2( 16, 16 )
format = 1
tile_data = PoolIntArray( -262117, 0, 0, 131074, 20, 0, 262148, 20, 0, 393241, 1, 0, 393242, 2, 0, 393243, 17, 0, 393245, 1, 0, 393246, 15, 0, 393247, 15, 0, 393248, 15, 0, 393249, 15, 0, 393250, 15, 0, 393251, 15, 0, 393252, 17, 0, 458777, 4, 0, 458778, 7, 0, 458779, 8, 0, 458781, 4, 0, 458782, 10, 0, 458783, 9, 0, 458784, 10, 0, 458785, 9, 0, 458786, 10, 0, 458787, 9, 0, 458788, 16, 0, 458789, 17, 0, 524291, 20, 0, 524309, 1, 0, 524310, 2, 0, 524311, 3, 0, 524317, 19, 0, 524319, 19, 0, 524321, 19, 0, 524323, 4, 0, 524324, 10, 0, 524325, 16, 0, 524326, 17, 0, 589845, 6, 0, 589846, 7, 0, 589847, 8, 0, 589853, 19, 0, 589855, 19, 0, 589857, 19, 0, 589859, 19, 0, 589861, 13, 0, 589862, 16, 0, 589863, 17, 0, 655360, 3, 0, 655378, 1, 0, 655379, 3, 0, 655389, 19, 0, 655391, 19, 0, 655393, 19, 0, 655395, 19, 0, 655397, 4, 0, 655398, 10, 0, 655399, 16, 0, 655400, 17, 0, 720896, 12, 0, 720897, 20, 0, 720914, 6, 0, 720915, 8, 0, 720925, 19, 0, 720927, 19, 0, 720929, 19, 0, 720931, 19, 0, 720933, 19, 0, 720935, 13, 0, 720936, 10, 0, 720937, 17, 0, 720941, 25, 0, 720942, 2, 0, 720943, 24, 0, 786432, 12, 0, 786436, 20, 0, 786442, 18, 0, 786443, 1, 0, 786444, 2, 0, 786445, 2, 0, 786446, 2, 0, 786447, 2, 0, 786448, 3, 0, 786461, 19, 0, 786463, 19, 0, 786465, 19, 0, 786467, 19, 0, 786469, 19, 0, 786471, 19, 0, 786473, 19, 0, 786478, 19, 0, 851968, 12, 0, 851977, 18, 0, 851978, 16, 0, 851979, 6, 0, 851980, 7, 0, 851981, 7, 0, 851982, 7, 0, 851983, 7, 0, 851984, 8, 0, 851997, 19, 0, 851999, 19, 0, 852001, 19, 0, 852003, 19, 0, 852005, 19, 0, 852007, 19, 0, 852009, 19, 0, 852014, 19, 0, 983030, 20, 0, 917504, 12, 0, 917506, 20, 0, 917512, 18, 0, 917513, 16, 0, 917514, 0, 0, 917515, 5, 0, 917533, 19, 0, 917535, 19, 0, 917537, 19, 0, 917539, 19, 0, 917541, 19, 0, 917543, 19, 0, 917545, 19, 0, 917550, 19, 0, 983040, 12, 0, 983047, 18, 0, 983048, 16, 0, 983049, 0, 0, 983050, 0, 0, 983051, 5, 0, 983069, 19, 0, 983071, 19, 0, 983073, 19, 0, 983075, 19, 0, 983077, 19, 0, 983079, 19, 0, 983081, 19, 0, 983086, 19, 0, 1048576, 14, 0, 1048577, 2, 0, 1048578, 2, 0, 1048579, 2, 0, 1048580, 2, 0, 1048581, 2, 0, 1048582, 2, 0, 1048583, 2, 0, 1048584, 2, 0, 1048585, 2, 0, 1048586, 2, 0, 1048587, 2, 0, 1048588, 2, 0, 1048589, 2, 0, 1048590, 2, 0, 1048591, 2, 0, 1048592, 2, 0, 1048593, 2, 0, 1048594, 2, 0, 1048595, 2, 0, 1048596, 2, 0, 1048597, 2, 0, 1048598, 2, 0, 1048599, 2, 0, 1048600, 2, 0, 1048601, 2, 0, 1048602, 2, 0, 1048603, 2, 0, 1048604, 2, 0, 1048605, 5, 0, 1048607, 19, 0, 1048609, 19, 0, 1048611, 19, 0, 1048613, 19, 0, 1048615, 19, 0, 1048617, 19, 0, 1048622, 19, 0, 1048623, 23, 0, 1048624, 23, 0, 1048625, 23, 0, 1048626, 23, 0, 1048627, 23, 0, 1048628, 23, 0, 1048629, 23, 0, 1048630, 23, 0, 1048631, 23, 0, 1048632, 23, 0, 1048633, 23, 0, 1048634, 23, 0, 1048635, 23, 0, 1048636, 23, 0, 1048637, 23, 0, 1048638, 23, 0, 1048639, 23, 0, 1048640, 23, 0, 1048641, 23, 0, 1048642, 23, 0, 1048643, 23, 0, 1048644, 23, 0, 1048645, 23, 0, 1048646, 23, 0, 1048647, 23, 0, 1048648, 23, 0, 1048649, 23, 0, 1048650, 23, 0, 1048651, 23, 0, 1048652, 23, 0, 1048653, 23, 0, 1048654, 23, 0, 1048655, 23, 0, 1048656, 23, 0, 1048657, 23, 0, 1048658, 23, 0, 1048659, 23, 0, 1048660, 23, 0, 1048661, 23, 0, 1048662, 23, 0, 1048663, 23, 0, 1048664, 23, 0, 1048665, 23, 0, 1048666, 23, 0, 1048667, 23, 0, 1048668, 23, 0, 1048669, 23, 0, 1048670, 23, 0, 1048671, 23, 0, 1048672, 23, 0, 1048673, 23, 0, 1048674, 23, 0, 1048675, 23, 0, 1048676, 23, 0, 1048677, 23, 0, 1048678, 23, 0, 1048679, 23, 0, 1048680, 23, 0, 1048681, 23, 0, 1048682, 23, 0, 1048683, 23, 0, 1048684, 23, 0, 1048685, 23, 0, 1048686, 23, 0, 1048687, 23, 0, 1048688, 23, 0, 1048689, 23, 0, 1048690, 23, 0, 1048691, 23, 0, 1048692, 23, 0, 1048693, 23, 0, 1048694, 23, 0, 1048695, 23, 0, 1048696, 23, 0, 1048697, 23, 0, 1048698, 23, 0, 1048699, 23, 0, 1048700, 23, 0, 1048701, 23, 0, 1048702, 23, 0, 1048703, 23, 0, 1048704, 23, 0, 1048705, 23, 0, 1048706, 23, 0, 1048707, 23, 0, 1048708, 23, 0, 1048709, 23, 0, 1048710, 23, 0, 1048711, 23, 0, 1048712, 23, 0, 1048713, 23, 0, 1048714, 23, 0, 1048715, 23, 0, 1048716, 23, 0, 104
[node name="light" parent="." instance=ExtResource( 1 )]
position = Vector2( 213, 172 )
__meta__ = {
"_edit_group_": true,
"_edit_horizontal_guides_": [ ]
}
2022-10-03 13:27:12 +00:00
[node name="DeathZone" type="Area2D" parent="."]
position = Vector2( 1, 328 )
script = SubResource( 5 )
__meta__ = {
"_edit_group_": true
}
[node name="CollisionShape2D" type="CollisionShape2D" parent="DeathZone"]
shape = SubResource( 4 )
2022-10-03 14:59:38 +00:00
[node name="Player" parent="." instance=ExtResource( 2 )]
position = Vector2( 73, 39 )