mirror of
https://github.com/Steffo99/watermelonkeys-patched-ld51.git
synced 2024-11-23 08:24:23 +00:00
Endgame
This commit is contained in:
parent
0adc101f1d
commit
f5b86dbf4f
9 changed files with 102 additions and 7 deletions
BIN
ASSETS/win.png
Normal file
BIN
ASSETS/win.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 17 KiB |
35
ASSETS/win.png.import
Normal file
35
ASSETS/win.png.import
Normal file
|
@ -0,0 +1,35 @@
|
|||
[remap]
|
||||
|
||||
importer="texture"
|
||||
type="StreamTexture"
|
||||
path="res://.import/win.png-530482475c8ba0e6c0dad492700280b8.stex"
|
||||
metadata={
|
||||
"vram_texture": false
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://ASSETS/win.png"
|
||||
dest_files=[ "res://.import/win.png-530482475c8ba0e6c0dad492700280b8.stex" ]
|
||||
|
||||
[params]
|
||||
|
||||
compress/mode=0
|
||||
compress/lossy_quality=0.7
|
||||
compress/hdr_mode=0
|
||||
compress/bptc_ldr=0
|
||||
compress/normal_map=0
|
||||
flags/repeat=0
|
||||
flags/filter=false
|
||||
flags/mipmaps=false
|
||||
flags/anisotropic=false
|
||||
flags/srgb=2
|
||||
process/fix_alpha_border=true
|
||||
process/premult_alpha=false
|
||||
process/HDR_as_SRGB=false
|
||||
process/invert_color=false
|
||||
process/normal_map_invert_y=false
|
||||
stream=false
|
||||
size_limit=0
|
||||
detect_3d=true
|
||||
svg/scale=1.0
|
|
@ -1,4 +1,4 @@
|
|||
[gd_scene load_steps=5 format=2]
|
||||
[gd_scene load_steps=6 format=2]
|
||||
|
||||
[ext_resource path="res://ASSETS/Ending1.png" type="Texture" id=1]
|
||||
[ext_resource path="res://ASSETS/Ending2.png" type="Texture" id=2]
|
||||
|
@ -14,6 +14,9 @@ animations = [ {
|
|||
[sub_resource type="RectangleShape2D" id=2]
|
||||
extents = Vector2( 8, 3.5 )
|
||||
|
||||
[sub_resource type="CircleShape2D" id=3]
|
||||
radius = 29.9978
|
||||
|
||||
[node name="Node2D" type="Node2D"]
|
||||
__meta__ = {
|
||||
"_edit_group_": true
|
||||
|
@ -29,3 +32,11 @@ playing = true
|
|||
position = Vector2( 0, 4.5 )
|
||||
shape = SubResource( 2 )
|
||||
one_way_collision = true
|
||||
|
||||
[node name="Area2D" type="Area2D" parent="."]
|
||||
collision_layer = 16
|
||||
collision_mask = 16
|
||||
|
||||
[node name="CollisionShape2D" type="CollisionShape2D" parent="Area2D"]
|
||||
scale = Vector2( -1.11951, 0.823478 )
|
||||
shape = SubResource( 3 )
|
||||
|
|
|
@ -49,6 +49,10 @@ func _on_level_day():
|
|||
|
||||
func _on_level_night():
|
||||
is_night = true
|
||||
|
||||
|
||||
func _on_EndgameCheck_entered(area):
|
||||
get_tree().change_scene(\"res://Win.tscn\")
|
||||
"
|
||||
|
||||
[sub_resource type="RectangleShape2D" id=16]
|
||||
|
@ -95,6 +99,13 @@ shape = SubResource( 4 )
|
|||
|
||||
[node name="DedTimer" type="Timer" parent="PlayerStatus"]
|
||||
|
||||
[node name="EndgameCheck" type="Area2D" parent="PlayerStatus"]
|
||||
collision_layer = 16
|
||||
collision_mask = 16
|
||||
|
||||
[node name="CollisionShape2D2" type="CollisionShape2D" parent="PlayerStatus/EndgameCheck"]
|
||||
shape = SubResource( 4 )
|
||||
|
||||
[node name="WallJump_Area2D" type="Area2D" parent="."]
|
||||
|
||||
[node name="CollisionShape2D" type="CollisionShape2D" parent="WallJump_Area2D"]
|
||||
|
@ -105,3 +116,4 @@ shape = SubResource( 16 )
|
|||
[connection signal="area_entered" from="PlayerStatus/LightCheck" to="PlayerStatus" method="_on_LightCheck_entered"]
|
||||
[connection signal="area_exited" from="PlayerStatus/LightCheck" to="PlayerStatus" method="_on_LightCheck_exited"]
|
||||
[connection signal="timeout" from="PlayerStatus/DedTimer" to="PlayerStatus" method="_on_DedTimer_timeout"]
|
||||
[connection signal="area_entered" from="PlayerStatus/EndgameCheck" to="PlayerStatus" method="_on_EndgameCheck_entered"]
|
||||
|
|
|
@ -25,7 +25,7 @@ onready var sun_sprite = $ParallaxBackground/ParallaxLayer2/Sun
|
|||
|
||||
func _ready():
|
||||
$TileMap.material = tiles_mat
|
||||
tiles_mat.light_mode = CanvasItemMaterial.LIGHT_MODE_UNSHADED
|
||||
tiles_mat.light_mode = CanvasItemMaterial.LIGHT_MODE_NORMAL
|
||||
|
||||
emit_signal(\"day\")
|
||||
|
||||
|
@ -52,7 +52,7 @@ func _on_sun_anim_done():
|
|||
func fade_back_in():
|
||||
sun_sprite.animate()
|
||||
|
||||
tiles_mat.light_mode = CanvasItemMaterial.LIGHT_MODE_UNSHADED
|
||||
tiles_mat.light_mode = CanvasItemMaterial.LIGHT_MODE_NORMAL
|
||||
emit_signal(\"day\")
|
||||
|
||||
var tween = create_tween()
|
||||
|
@ -68,7 +68,6 @@ func _on_DeathZone_body_entered(body):
|
|||
"
|
||||
|
||||
[sub_resource type="CanvasItemMaterial" id=7]
|
||||
light_mode = 1
|
||||
|
||||
[sub_resource type="GDScript" id=6]
|
||||
script/source = "extends Sprite
|
||||
|
@ -185,6 +184,7 @@ __meta__ = {
|
|||
}
|
||||
|
||||
[node name="TileMap" type="TileMap" parent="."]
|
||||
material = SubResource( 7 )
|
||||
tile_set = ExtResource( 3 )
|
||||
cell_size = Vector2( 16, 16 )
|
||||
format = 1
|
||||
|
@ -215,6 +215,7 @@ position = Vector2( 264, -3 )
|
|||
|
||||
[node name="Ending" parent="." instance=ExtResource( 9 )]
|
||||
position = Vector2( 827, 237 )
|
||||
z_index = -1
|
||||
|
||||
[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"]
|
||||
|
|
|
@ -1,9 +1,12 @@
|
|||
[gd_scene load_steps=6 format=2]
|
||||
[gd_scene load_steps=7 format=2]
|
||||
|
||||
[ext_resource path="res://ASSETS/Platforms/Plafformina3.png" type="Texture" id=1]
|
||||
[ext_resource path="res://ASSETS/Platforms/Plafformina1.png" type="Texture" id=2]
|
||||
[ext_resource path="res://ASSETS/Platforms/Plafformina2.png" type="Texture" id=3]
|
||||
|
||||
[sub_resource type="CanvasItemMaterial" id=7]
|
||||
light_mode = 1
|
||||
|
||||
[sub_resource type="SpriteFrames" id=1]
|
||||
animations = [ {
|
||||
"frames": [ ExtResource( 2 ), ExtResource( 3 ), ExtResource( 1 ) ],
|
||||
|
@ -21,6 +24,7 @@ __meta__ = {
|
|||
}
|
||||
|
||||
[node name="AnimatedSprite" type="AnimatedSprite" parent="."]
|
||||
material = SubResource( 7 )
|
||||
frames = SubResource( 1 )
|
||||
playing = true
|
||||
|
||||
|
|
32
Win.tscn
Normal file
32
Win.tscn
Normal file
|
@ -0,0 +1,32 @@
|
|||
[gd_scene load_steps=3 format=2]
|
||||
|
||||
[ext_resource path="res://ASSETS/win.png" type="Texture" id=1]
|
||||
|
||||
[sub_resource type="GDScript" id=1]
|
||||
script/source = "extends Control
|
||||
|
||||
func _input(event):
|
||||
if Input.is_action_just_pressed(\"restart_game\"):
|
||||
get_tree().change_scene(\"res://Level1.tscn\")
|
||||
"
|
||||
|
||||
[node name="Node2D" type="Control"]
|
||||
anchor_right = 1.0
|
||||
anchor_bottom = 1.0
|
||||
script = SubResource( 1 )
|
||||
|
||||
[node name="ColorRect" type="ColorRect" parent="."]
|
||||
anchor_right = 1.0
|
||||
anchor_bottom = 1.0
|
||||
color = Color( 0.00784314, 0.0235294, 0.0784314, 1 )
|
||||
|
||||
[node name="TextureRect" type="TextureRect" parent="."]
|
||||
anchor_left = 0.5
|
||||
anchor_top = 0.5
|
||||
anchor_right = 0.5
|
||||
anchor_bottom = 0.5
|
||||
margin_left = -240.0
|
||||
margin_top = -135.0
|
||||
margin_right = 240.0
|
||||
margin_bottom = 135.0
|
||||
texture = ExtResource( 1 )
|
|
@ -52,9 +52,8 @@ __meta__ = {
|
|||
}
|
||||
|
||||
[node name="Light2D" type="Light2D" parent="."]
|
||||
scale = Vector2( 5, 5 )
|
||||
scale = Vector2( 0.5, 0.5 )
|
||||
texture = ExtResource( 1 )
|
||||
energy = 0.5
|
||||
|
||||
[node name="CollisionShape2D" type="CollisionShape2D" parent="."]
|
||||
shape = SubResource( 3 )
|
||||
|
|
|
@ -101,6 +101,7 @@ restart_game={
|
|||
[layer_names]
|
||||
|
||||
2d_physics/layer_4="Lights"
|
||||
2d_physics/layer_5="Endgame"
|
||||
|
||||
[physics]
|
||||
|
||||
|
|
Loading…
Reference in a new issue