1
Fork 0
mirror of https://github.com/Steffo99/watermelonkeys-patched-ld51.git synced 2024-11-26 09:54:23 +00:00
fading-sun/Level1.tscn

264 lines
23 KiB
Text
Raw Normal View History

2022-10-03 22:04:20 +00:00
[gd_scene load_steps=17 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 16:46:46 +00:00
[ext_resource path="res://Giovanna.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 19:57:56 +00:00
[ext_resource path="res://My Platform.tscn" type="PackedScene" id=7]
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 20:32:28 +00:00
[ext_resource path="res://End_Button.tscn" type="PackedScene" id=9]
2022-10-03 22:04:20 +00:00
[ext_resource path="res://enemies/Enemy.tscn" type="PackedScene" id=10]
[ext_resource path="res://ASSETS/sounds/suoneria_giorno.wav" type="AudioStream" id=11]
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
2022-10-03 16:46:46 +00:00
signal day
signal night
2022-10-03 17:23:45 +00:00
export(CanvasItemMaterial) var tiles_mat
2022-10-03 16:26:05 +00:00
onready var layer_1 = $ParallaxBackground/ParallaxLayer2
onready var layer_2 = $\"ParallaxBackground/Purple Sky\"
onready var layer_3 = $ParallaxBackground/ParallaxLayer
2022-10-03 16:46:46 +00:00
onready var sun_sprite = $ParallaxBackground/ParallaxLayer2/Sun
func _ready():
2022-10-03 19:57:56 +00:00
$TileMap.material = tiles_mat
2022-10-03 21:02:20 +00:00
tiles_mat.light_mode = CanvasItemMaterial.LIGHT_MODE_NORMAL
2022-10-03 17:23:45 +00:00
2022-10-03 16:46:46 +00:00
emit_signal(\"day\")
2022-10-03 16:26:05 +00:00
2022-10-03 13:27:12 +00:00
func _input(event):
if Input.is_action_just_pressed(\"quit\"):
get_tree().quit()
2022-10-03 16:26:05 +00:00
func _on_sun_anim_done():
var tween = create_tween()
tween.set_parallel(false)
tween.tween_property(layer_1, \"modulate\", Color.black, 0.3)
tween.tween_property(layer_2, \"modulate\", Color.black, 0.3).set_delay(0.1)
tween.tween_property(layer_3, \"modulate\", Color.black, 0.3).set_delay(0.1)
2022-10-03 16:46:46 +00:00
yield(tween, \"finished\")
2022-10-03 17:23:45 +00:00
tiles_mat.light_mode = CanvasItemMaterial.LIGHT_MODE_LIGHT_ONLY
2022-10-03 16:46:46 +00:00
emit_signal(\"night\")
yield(get_tree().create_timer(10.0), \"timeout\")
fade_back_in()
func fade_back_in():
sun_sprite.animate()
2022-10-03 17:23:45 +00:00
2022-10-03 21:02:20 +00:00
tiles_mat.light_mode = CanvasItemMaterial.LIGHT_MODE_NORMAL
2022-10-03 19:55:20 +00:00
emit_signal(\"day\")
2022-10-03 17:23:45 +00:00
2022-10-03 16:46:46 +00:00
var tween = create_tween()
2022-10-03 17:23:45 +00:00
tween.set_parallel(false)
2022-10-03 16:46:46 +00:00
tween.tween_property(layer_3, \"modulate\", Color.white, 0.3)
tween.tween_property(layer_2, \"modulate\", Color.white, 0.3).set_delay(0.1)
tween.tween_property(layer_1, \"modulate\", Color.white, 0.3).set_delay(0.1)
yield(tween, \"finished\")
2022-10-03 13:27:12 +00:00
2022-10-03 16:26:05 +00:00
func _on_DeathZone_body_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 17:23:45 +00:00
[sub_resource type="CanvasItemMaterial" id=7]
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\")
2022-10-03 16:26:05 +00:00
global_position.x = p.global_position.x
2022-10-03 13:27:12 +00:00
"
[sub_resource type="RectangleShape2D" id=4]
2022-10-03 16:26:05 +00:00
extents = Vector2( 2255, 43 )
2022-10-03 13:27:12 +00:00
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 17:23:45 +00:00
tiles_mat = SubResource( 7 )
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"]
2022-10-03 16:26:05 +00:00
position = Vector2( 0, 62 )
2022-10-03 16:13:44 +00:00
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"]
2022-10-03 17:23:45 +00:00
position = Vector2( -4, 0 )
2022-10-03 13:05:31 +00:00
texture = ExtResource( 5 )
2022-10-03 13:27:12 +00:00
2022-10-03 14:59:38 +00:00
[node name="light" parent="." instance=ExtResource( 1 )]
position = Vector2( 213, 172 )
__meta__ = {
"_edit_group_": true,
"_edit_horizontal_guides_": [ ]
}
2022-10-03 21:03:04 +00:00
[node name="light" parent="light" instance=ExtResource( 1 )]
position = Vector2( 328, -100 )
2022-10-03 19:55:20 +00:00
[node name="TileMap" type="TileMap" parent="."]
2022-10-03 21:02:20 +00:00
material = SubResource( 7 )
2022-10-03 19:55:20 +00:00
tile_set = ExtResource( 3 )
cell_size = Vector2( 16, 16 )
format = 1
2022-10-03 21:46:37 +00:00
tile_data = PoolIntArray( -524230, 18, 0, -524229, 15, 0, -524228, 15, 0, -524227, 15, 0, -524226, 15, 0, -524225, 15, 0, -524224, 15, 0, -524223, 15, 0, -524222, 20, 0, -524168, 18, 0, -524167, 15, 0, -524166, 15, 0, -524165, 15, 0, -524164, 15, 0, -524163, 3, 0, -458695, 18, 0, -458694, 0, 0, -458693, 26, 0, -458692, 26, 2, -458691, 26, 2, -458690, 26, 2, -458689, 26, 2, -458688, 26, 0, -458687, 26, 65539, -458686, 5, 0, -458632, 1610612753, 0, -458631, 1610612736, 0, -458630, 1610612736, 0, -458629, 1610612736, 0, -458628, 1610612736, 0, -458627, 1610612740, 0, -393160, 18, 0, -393159, 0, 0, -393158, 0, 0, -393157, 26, 131072, -393152, 26, 131073, -393151, 26, 131075, -393095, 1610612753, 0, -393094, 1610612736, 0, -393093, 1610612736, 0, -393092, 1610612736, 0, -393091, 1610612740, 0, -327625, 18, 0, -327624, 0, 0, -327623, 26, 65537, -327622, 26, 65538, -327621, 26, 0, -327616, 26, 131073, -327615, 26, 131075, -327558, 1610612753, 0, -327557, 1610612736, 0, -327556, 1610612736, 0, -327555, 1610612740, 0, -262089, 26, 1, -262088, 26, 2, -262087, 26, 0, -262086, 26, 196610, -262085, 26, 0, -262084, 26, 2, -262083, 26, 2, -262082, 26, 2, -262081, 26, 2, -262080, 26, 0, -262079, 26, 131075, -262021, 1610612753, 0, -262020, 1610612736, 0, -262019, 1610612740, 0, -262008, -1073741804, 0, -196544, 26, 131073, -196543, 26, 131075, -196484, 1610612753, 0, -196483, 26, 65537, -196482, 26, 65538, -196481, 26, 65538, -196480, 26, 65538, -196479, 26, 65538, -196478, 26, 65538, -196477, 26, 65538, -196476, 26, 65538, -196475, 26, 65538, -196474, 26, 65539, -196468, -1073741804, 0, -131008, 26, 131073, -131007, 26, 131075, -130947, 26, 196609, -130946, 26, 196610, -130945, 26, 196610, -130944, 26, 196610, -130943, 26, 196610, -130942, 26, 0, -130941, 26, 196610, -130940, 26, 196610, -130939, 26, 196610, -130938, 26, 196611, -130918, 18, 0, -130917, 17, 0, -65488, 26, 65537, -65487, 26, 65538, -65486, 26, 65538, -65485, 26, 65538, -65484, 26, 65538, -65483, 26, 65538, -65482, 26, 65538, -65481, 26, 65538, -65480, 26, 65538, -65479, 26, 65538, -65478, 26, 65538, -65477, 26, 65538, -65476, 26, 65538, -65475, 26, 65539, -65472, 26, 131073, -65471, 26, 131075, -65406, 26, 131072, -65382, 1610612753, 0, -65381, 26, 1, -65380, 26, 2, -65379, 26, 2, -65378, 26, 2, -65377, 26, 2, -65376, 26, 2, -65375, 26, 0, -65374, 26, 65539, 48, 26, 196609, 49, 26, 196610, 50, 26, 196610, 51, 26, 196610, 52, 26, 196610, 53, 26, 196610, 54, 26, 196610, 55, 26, 196610, 56, 26, 196610, 57, 26, 196610, 58, 26, 196610, 59, 26, 196610, 60, 26, 196610, 61, 26, 196611, 64, 26, 131073, 65, 26, 131075, 128, 26, 65536, 130, 26, 131072, 144, -1073741804, 0, 145, -1073741804, 0, 155, 1610612753, 0, 156, 1610612754, 0, 161, 26, 131073, 162, 26, 131075, 65600, 26, 131073, 65601, 26, 131075, 65664, 26, 131072, 65666, 26, 131072, 65690, 1610612762, 0, 65697, 26, 131073, 65698, 26, 131075, 131136, 26, 131073, 131137, 26, 131075, 131200, 26, 131072, 131202, 26, 131072, 131233, 26, 131073, 131234, 26, 131075, 196672, 26, 131073, 196673, 26, 131075, 196724, 26, 1, 196725, 26, 0, 196726, 26, 2, 196727, 26, 2, 196728, 26, 2, 196729, 26, 2, 196730, 26, 2, 196731, 26, 2, 196732, 26, 2, 196733, 26, 3, 196736, 26, 131072, 196738, 26, 196608, 196757, -1073741804, 0, 196758, -1073741804, 0, 196769, 26, 0, 196770, 26, 0, 196771, 26, 0, 196772, 17, 0, 262199, 26, 1, 262200, 26, 2, 262201, 26, 2, 262202, 26, 2, 262203, 26, 2, 262204, 26, 2, 262205, 26, 2, 262206, 26, 2, 262207, 26, 2, 262208, 26, 0, 262209, 26, 196611, 262261, 26, 131072, 262272, 26, 131072, 262273, -1610612723, 0, 262274, -1610612723, 0, 262275, -1610612723, 0, 262276, -1610612723, 0, 262277, -1610612723, 0, 262278, -1610612723, 0, 262279, -1610612723, 0, 262280, -1610612723, 0, 262281, 1610612742, 0, 262305, 26, 131072, 262307, 26, 0, 262308, 26, 0, 327744, 1610612762, 131072, 327797, 26, 131072, 327808, 26, 131072, 327809, -1073741824, 0, 327810, -1073741824, 0, 327811, -1073741824, 0, 327812, -1073741824, 0, 327813, -1073741824, 0, 327814, -1073741824, 0, 327815, -1073741824, 0, 327816, -1073741824, 0, 327817, -1
2022-10-03 19:55:20 +00:00
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"]
2022-10-03 16:26:05 +00:00
position = Vector2( 1771, 12 )
2022-10-03 13:27:12 +00:00
shape = SubResource( 4 )
2022-10-03 14:59:38 +00:00
[node name="Player" parent="." instance=ExtResource( 2 )]
position = Vector2( 73, 39 )
2022-10-03 16:26:05 +00:00
2022-10-03 19:57:56 +00:00
[node name="My Platform" parent="." instance=ExtResource( 7 )]
2022-10-03 21:46:37 +00:00
position = Vector2( 698, 17 )
2022-10-03 19:57:56 +00:00
[node name="My Platform2" parent="." instance=ExtResource( 7 )]
2022-10-03 21:46:37 +00:00
position = Vector2( 406, 118 )
2022-10-03 19:57:56 +00:00
[node name="My Platform3" parent="." instance=ExtResource( 7 )]
2022-10-03 21:46:37 +00:00
position = Vector2( 693, 124 )
[node name="My Platform4" parent="." instance=ExtResource( 7 )]
position = Vector2( 309, 168 )
[node name="My Platform5" parent="." instance=ExtResource( 7 )]
position = Vector2( 1351, 122 )
[node name="My Platform6" parent="." instance=ExtResource( 7 )]
position = Vector2( 1455, 122 )
[node name="My Platform7" parent="." instance=ExtResource( 7 )]
position = Vector2( 1559, 122 )
[node name="My Platform8" parent="." instance=ExtResource( 7 )]
position = Vector2( 1693, 122 )
[node name="My Platform9" parent="." instance=ExtResource( 7 )]
position = Vector2( 1804, 74 )
2022-10-03 19:57:56 +00:00
2022-10-03 20:32:28 +00:00
[node name="Ending" parent="." instance=ExtResource( 9 )]
2022-10-03 21:46:37 +00:00
position = Vector2( 3160, 141 )
2022-10-03 21:02:20 +00:00
z_index = -1
2022-10-03 20:32:28 +00:00
2022-10-03 21:46:37 +00:00
[node name="light2" parent="." instance=ExtResource( 1 )]
position = Vector2( 1177, 66 )
[node name="light" parent="light2" instance=ExtResource( 1 )]
position = Vector2( 739, 163 )
[node name="light3" parent="." instance=ExtResource( 1 )]
position = Vector2( 2085, -76 )
[node name="light4" parent="." instance=ExtResource( 1 )]
position = Vector2( 3012, 237 )
2022-10-03 22:04:20 +00:00
[node name="Enemy" parent="." instance=ExtResource( 10 )]
position = Vector2( 631, 5 )
[node name="AudioStreamPlayer" type="AudioStreamPlayer" parent="."]
stream = ExtResource( 11 )
autoplay = true
2022-10-03 16:26:05 +00:00
[connection signal="sun_anim_done" from="ParallaxBackground/ParallaxLayer2/Sun" to="." method="_on_sun_anim_done"]
[connection signal="body_entered" from="DeathZone" to="." method="_on_DeathZone_body_entered"]