mirror of
https://github.com/Steffo99/looping-for-loops.git
synced 2024-11-21 23:54:23 +00:00
🎉 Finish!
This commit is contained in:
parent
6176bfb662
commit
fd337380c0
19 changed files with 308 additions and 41 deletions
4
Objects/GLOBAL.gd
Normal file
4
Objects/GLOBAL.gd
Normal file
|
@ -0,0 +1,4 @@
|
|||
extends Node
|
||||
|
||||
|
||||
var loops_collected: int = 0
|
6
Objects/GLOBAL.tscn
Normal file
6
Objects/GLOBAL.tscn
Normal file
|
@ -0,0 +1,6 @@
|
|||
[gd_scene load_steps=2 format=2]
|
||||
|
||||
[ext_resource path="res://Objects/GLOBAL.gd" type="Script" id=1]
|
||||
|
||||
[node name="GLOBAL" type="Node"]
|
||||
script = ExtResource( 1 )
|
|
@ -36,9 +36,11 @@ position = Vector2( -700, 420 )
|
|||
|
||||
[node name="GameButton" parent="GhostGroup2" instance=ExtResource( 5 )]
|
||||
position = Vector2( 480, 160 )
|
||||
color = Color( 1, 0.490196, 0, 1 )
|
||||
|
||||
[node name="GameButton2" parent="GhostGroup2" instance=ExtResource( 5 )]
|
||||
position = Vector2( 560, 160 )
|
||||
color = Color( 1, 0.490196, 0, 1 )
|
||||
is_active = false
|
||||
|
||||
[node name="GhostBlock" parent="GhostGroup2" instance=ExtResource( 11 )]
|
||||
|
@ -125,5 +127,5 @@ position = Vector2( -180, 660 )
|
|||
position = Vector2( -500, 360 )
|
||||
[connection signal="clicked" from="GhostGroup2/GameButton" to="GhostGroup2/GameButton" method="deactivate"]
|
||||
[connection signal="clicked" from="GhostGroup2/GameButton" to="GhostGroup2" method="toggle"]
|
||||
[connection signal="clicked" from="GhostGroup2/GameButton2" to="GhostGroup2" method="toggle"]
|
||||
[connection signal="clicked" from="GhostGroup2/GameButton2" to="GhostGroup2/GameButton2" method="deactivate"]
|
||||
[connection signal="clicked" from="GhostGroup2/GameButton2" to="GhostGroup2" method="toggle"]
|
||||
|
|
|
@ -20,7 +20,7 @@ texture = ExtResource( 10 )
|
|||
position = Vector2( 1280, 0 )
|
||||
|
||||
[node name="TileMap" parent="ScrollingPipe" instance=ExtResource( 2 )]
|
||||
tile_data = PoolIntArray( 65521, 0, 65536, 131057, 0, 65536, 131061, 0, 65537, 131062, 0, 65537, 131063, 0, 1, 196590, 0, 65536, 196593, 0, 131072, 196594, 0, 65537, 196599, 0, 65536, 262135, 0, 65536, 262137, 0, 0, 262138, 0, 65537, 262139, 0, 65537, 327671, 0, 65536, 327673, 0, 65536, 393205, 0, 65537, 393206, 0, 65537, 393207, 0, 131073, 393209, 0, 65536, 458745, 0, 65536, 524266, 0, 0, 524267, 0, 65537, 524268, 0, 65537, 524269, 0, 65537, 524270, 0, 65537, 524271, 0, 65537, 524272, 0, 65537, 524273, 0, 65537, 524274, 0, 1, 524281, 0, 131072, 524282, 0, 65537, 524283, 0, 65537, 589802, 0, 65536, 589810, 0, 65536, 655338, 0, 65536, 655346, 0, 65536, 720872, 0, 65536, 720874, 0, 65536, 720875, 0, 0, 720876, 0, 65537, 720877, 0, 65537, 720878, 0, 65537, 720879, 0, 65537, 720882, 0, 65536, 786408, 0, 65536, 786410, 0, 65536, 786411, 0, 65536, 786418, 0, 65536, 851944, 0, 65536, 851946, 0, 65536, 851947, 0, 65536, 851954, 0, 65536, 917478, 0, 0, 917479, 0, 65537, 917480, 0, 131073, 917482, 0, 65536, 917483, 0, 65536, 917484, 0, 0, 917485, 0, 65537, 917488, 0, 65537, 917489, 0, 65537, 917490, 0, 131073, 983014, 0, 65536, 983018, 0, 65536, 983019, 0, 65536, 983020, 0, 65536, 983031, 0, 0, 983032, 0, 1, 1048547, 0, 0, 1048548, 0, 1, 1048550, 0, 65536, 1048554, 0, 65536, 1048555, 0, 65536, 1048556, 0, 65536, 1048567, 0, 65536, 1048568, 0, 65536, 1114084, 0, 65536, 1114086, 0, 65536, 1114090, 0, 65536, 1114091, 0, 65536, 1114092, 0, 131072, 1114093, 0, 65537, 1114094, 0, 65537, 1114095, 0, 65537, 1114096, 0, 65537, 1114097, 0, 65537, 1114098, 0, 65537, 1114099, 0, 65537, 1114100, 0, 65537, 1114101, 0, 65537, 1114102, 0, 65537, 1114103, 0, 131073, 1114104, 0, 65536 )
|
||||
tile_data = PoolIntArray( 65521, 0, 65536, 131057, 0, 65536, 131061, 0, 65537, 131062, 0, 65537, 131063, 0, 1, 196590, 0, 65536, 196593, 0, 131072, 196594, 0, 65537, 196599, 0, 65536, 262135, 0, 65536, 262137, 0, 0, 262138, 0, 65537, 262139, 0, 65537, 327671, 0, 65536, 327673, 0, 65536, 393205, 0, 65537, 393206, 0, 65537, 393207, 0, 131073, 393209, 0, 65536, 458745, 0, 65536, 524266, 0, 0, 524267, 0, 65537, 524268, 0, 65537, 524269, 0, 65537, 524270, 0, 65537, 524271, 0, 65537, 524272, 0, 65537, 524273, 0, 65537, 524274, 0, 1, 524281, 0, 131072, 524282, 0, 65537, 524283, 0, 65537, 589802, 0, 65536, 589810, 0, 65536, 655338, 0, 65536, 655346, 0, 65536, 720872, 0, 65536, 720874, 0, 65536, 720875, 0, 0, 720876, 0, 65537, 720877, 0, 65537, 720878, 0, 65537, 720879, 0, 65537, 720882, 0, 65536, 786408, 0, 65536, 786410, 0, 65536, 786411, 0, 65536, 786418, 0, 65536, 851944, 0, 65536, 851946, 0, 65536, 851947, 0, 65536, 851954, 0, 65536, 917478, 0, 0, 917479, 0, 65537, 917480, 0, 131073, 917482, 0, 65536, 917483, 0, 65536, 917484, 0, 0, 917485, 0, 65537, 917488, 0, 65537, 917489, 0, 65537, 917490, 0, 131073, 983014, 0, 65536, 983018, 0, 65536, 983019, 0, 65536, 983020, 0, 65536, 983031, 0, 0, 983032, 0, 1, 1048547, 0, 0, 1048548, 0, 1, 1048550, 0, 65536, 1048554, 0, 65536, 1048555, 0, 65536, 1048556, 0, 65536, 1048567, 0, 65536, 1048568, 0, 65536, 1114084, 0, 65536, 1114090, 0, 65536, 1114091, 0, 65536, 1114092, 0, 131072, 1114093, 0, 65537, 1114094, 0, 65537, 1114095, 0, 65537, 1114096, 0, 65537, 1114097, 0, 65537, 1114098, 0, 65537, 1114099, 0, 65537, 1114100, 0, 65537, 1114101, 0, 65537, 1114102, 0, 65537, 1114103, 0, 131073, 1114104, 0, 65536 )
|
||||
|
||||
[node name="CrossLoop" parent="." instance=ExtResource( 4 )]
|
||||
position = Vector2( 480, 360 )
|
||||
|
|
|
@ -19,9 +19,6 @@ position = Vector2( 1180, 440 )
|
|||
[node name="Buzzsaw" parent="." instance=ExtResource( 3 )]
|
||||
position = Vector2( 740, 180 )
|
||||
|
||||
[node name="Buzzsaw2" parent="." instance=ExtResource( 3 )]
|
||||
position = Vector2( 900, 420 )
|
||||
|
||||
[node name="Buzzsaw3" parent="." instance=ExtResource( 3 )]
|
||||
position = Vector2( 740, 640 )
|
||||
|
||||
|
@ -33,7 +30,7 @@ tile_data = PoolIntArray( 65526, 0, 65536, 131062, 0, 65536, 196591, 0, 0, 19659
|
|||
|
||||
[node name="GameButton" parent="." instance=ExtResource( 4 )]
|
||||
position = Vector2( 1040, 540 )
|
||||
color = Color( 1, 0, 0, 1 )
|
||||
color = Color( 1, 0.490196, 0, 1 )
|
||||
|
||||
[node name="GhostGroup" parent="." instance=ExtResource( 5 )]
|
||||
position = Vector2( 680, 480 )
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
[gd_scene load_steps=9 format=2]
|
||||
[gd_scene load_steps=11 format=2]
|
||||
|
||||
[ext_resource path="res://Objects/ScrollingObjects/Utilities/ScrollingPipesTileMap.tscn" type="PackedScene" id=1]
|
||||
[ext_resource path="res://Objects/ScrollingObjects/ScrollingPipe.tscn" type="PackedScene" id=2]
|
||||
|
@ -8,6 +8,8 @@
|
|||
[ext_resource path="res://Objects/ScrollingObjects/Loop.tscn" type="PackedScene" id=6]
|
||||
[ext_resource path="res://Objects/ScrollingObjects/Ghosts/GhostBlock.tscn" type="PackedScene" id=7]
|
||||
[ext_resource path="res://Objects/ScrollingObjects/ScrollingLaser.tscn" type="PackedScene" id=8]
|
||||
[ext_resource path="res://Sprites/wall-furnace.png" type="Texture" id=9]
|
||||
[ext_resource path="res://Objects/ScrollingObjects/Background.tscn" type="PackedScene" id=10]
|
||||
|
||||
[node name="Node2D" type="Node2D"]
|
||||
|
||||
|
@ -46,6 +48,7 @@ tile_data = PoolIntArray( 393171, 0, 0, 393172, 0, 65537, 393173, 0, 1, 458707,
|
|||
|
||||
[node name="GameButton" parent="." instance=ExtResource( 4 )]
|
||||
position = Vector2( 820, 420 )
|
||||
color = Color( 1, 0.490196, 0, 1 )
|
||||
|
||||
[node name="GhostGroup" parent="." instance=ExtResource( 5 )]
|
||||
position = Vector2( 680, 480 )
|
||||
|
@ -82,4 +85,7 @@ position = Vector2( 1100, 480 )
|
|||
|
||||
[node name="Loop8" parent="Loops" instance=ExtResource( 6 )]
|
||||
position = Vector2( 820, 480 )
|
||||
|
||||
[node name="Background" parent="." instance=ExtResource( 10 )]
|
||||
texture = ExtResource( 9 )
|
||||
[connection signal="clicked" from="GameButton" to="GhostGroup" method="toggle"]
|
||||
|
|
32
Objects/Lose.tscn
Normal file
32
Objects/Lose.tscn
Normal file
|
@ -0,0 +1,32 @@
|
|||
[gd_scene load_steps=4 format=2]
|
||||
|
||||
[ext_resource path="res://Fonts/LiberationMono-Bold.ttf" type="DynamicFontData" id=1]
|
||||
[ext_resource path="res://Objects/ScrollingObjects/PlayButton.tscn" type="PackedScene" id=2]
|
||||
|
||||
[sub_resource type="DynamicFont" id=2]
|
||||
size = 80
|
||||
font_data = ExtResource( 1 )
|
||||
|
||||
[node name="Control" type="Control"]
|
||||
anchor_right = 1.0
|
||||
anchor_bottom = 1.0
|
||||
rect_pivot_offset = Vector2( -280, -360 )
|
||||
__meta__ = {
|
||||
"_edit_use_anchors_": false
|
||||
}
|
||||
|
||||
[node name="Label" type="Label" parent="."]
|
||||
margin_right = 1280.0
|
||||
margin_bottom = 520.0
|
||||
custom_fonts/font = SubResource( 2 )
|
||||
text = "You died..."
|
||||
align = 1
|
||||
valign = 1
|
||||
__meta__ = {
|
||||
"_edit_use_anchors_": false
|
||||
}
|
||||
|
||||
[node name="Button" parent="." instance=ExtResource( 2 )]
|
||||
margin_left = 400.0
|
||||
margin_right = 880.0
|
||||
text = "Play again"
|
|
@ -1,4 +1,4 @@
|
|||
[gd_scene load_steps=34 format=2]
|
||||
[gd_scene load_steps=35 format=2]
|
||||
|
||||
[ext_resource path="res://Objects/SpecialObjects/Player.tscn" type="PackedScene" id=1]
|
||||
[ext_resource path="res://Objects/SpecialObjects/Conductor.tscn" type="PackedScene" id=2]
|
||||
|
@ -32,6 +32,7 @@
|
|||
[ext_resource path="res://Objects/Levels/Bridge.tscn" type="PackedScene" id=30]
|
||||
[ext_resource path="res://Objects/Levels/max_level_2.tscn" type="PackedScene" id=31]
|
||||
[ext_resource path="res://Music/RetroFuture Clean.ogg" type="AudioStream" id=32]
|
||||
[ext_resource path="res://Objects/Levels/max_level_3.tscn" type="PackedScene" id=33]
|
||||
|
||||
[sub_resource type="StyleBoxFlat" id=1]
|
||||
bg_color = Color( 0, 0, 0, 0.294118 )
|
||||
|
@ -49,7 +50,7 @@ __meta__ = {
|
|||
song_bpm = 60.0
|
||||
|
||||
[node name="Wrapper" parent="." instance=ExtResource( 5 )]
|
||||
position = Vector2( 14080, 0 )
|
||||
position = Vector2( 15360, 0 )
|
||||
|
||||
[node name="LoopCountPanel" parent="." instance=ExtResource( 8 )]
|
||||
margin_left = 120.0
|
||||
|
@ -624,7 +625,7 @@ position = Vector2( 6400, 0 )
|
|||
position = Vector2( 10240, 0 )
|
||||
|
||||
[node name="Safe" type="Node2D" parent="."]
|
||||
position = Vector2( 11520, 0 )
|
||||
position = Vector2( 12800, 0 )
|
||||
|
||||
[node name="Background" parent="Safe" instance=ExtResource( 13 )]
|
||||
|
||||
|
@ -816,8 +817,11 @@ position = Vector2( 580, 240 )
|
|||
[node name="Loop16" parent="Safe/Loops" instance=ExtResource( 20 )]
|
||||
position = Vector2( 500, 240 )
|
||||
|
||||
[node name="Node2D" parent="." instance=ExtResource( 33 )]
|
||||
position = Vector2( 11520, 0 )
|
||||
|
||||
[node name="Background" parent="." instance=ExtResource( 13 )]
|
||||
position = Vector2( 13440, 360 )
|
||||
position = Vector2( 14720, 360 )
|
||||
|
||||
[node name="AudioStreamPlayer" type="AudioStreamPlayer" parent="."]
|
||||
stream = ExtResource( 32 )
|
||||
|
@ -826,38 +830,38 @@ autoplay = true
|
|||
[connection signal="loop_collected" from="Player" to="LoopCountPanel" method="_on_Player_loop_collected"]
|
||||
[connection signal="body_entered" from="Intro/WinDoor" to="Player" method="_on_WinDoor_body_entered"]
|
||||
[connection signal="clicked" from="BuzzsawChoice/CBSpeedChangeButton" to="BuzzsawChoice/GhostGroup" method="toggle"]
|
||||
[connection signal="clicked" from="LongJump/GhostGroup/CBSpeedChangeButton" to="LongJump/GhostGroup" method="deactivate"]
|
||||
[connection signal="clicked" from="LongJump/GhostGroup/CBSpeedChangeButton" to="LongJump/GhostGroup/CBSpeedChangeButton" method="_on_GameButton_clicked"]
|
||||
[connection signal="clicked" from="LongJump/GhostGroup/CBSpeedChangeButton" to="LongJump/GhostGroup" method="deactivate"]
|
||||
[connection signal="clicked" from="LongJump/GhostGroup/CBSpeedChangeButton2" to="LongJump/GhostGroup" method="deactivate"]
|
||||
[connection signal="clicked" from="LongJump/GhostGroup/CBSpeedChangeButton2" to="LongJump/GhostGroup/CBSpeedChangeButton2" method="_on_GameButton_clicked"]
|
||||
[connection signal="clicked" from="LongJump/GhostGroup/CBSpeedChangeButton3" to="LongJump/GhostGroup/CBSpeedChangeButton3" method="_on_GameButton_clicked"]
|
||||
[connection signal="clicked" from="LongJump/GhostGroup/CBSpeedChangeButton3" to="LongJump/GhostGroup" method="deactivate"]
|
||||
[connection signal="clicked" from="LongJump/GhostGroup2/CBSpeedChangeButton" to="LongJump/GhostGroup2" method="deactivate"]
|
||||
[connection signal="clicked" from="LongJump/GhostGroup2/CBSpeedChangeButton" to="LongJump/GhostGroup2/CBSpeedChangeButton" method="_on_GameButton_clicked"]
|
||||
[connection signal="clicked" from="LongJump/GhostGroup2/CBSpeedChangeButton" to="BuzzsawChoice/GhostGroup2" method="activate"]
|
||||
[connection signal="clicked" from="LongJump/GhostGroup2/CBSpeedChangeButton2" to="LongJump/GhostGroup2" method="deactivate"]
|
||||
[connection signal="clicked" from="LongJump/GhostGroup2/CBSpeedChangeButton" to="LongJump/GhostGroup2/CBSpeedChangeButton" method="_on_GameButton_clicked"]
|
||||
[connection signal="clicked" from="LongJump/GhostGroup2/CBSpeedChangeButton" to="LongJump/GhostGroup2" method="deactivate"]
|
||||
[connection signal="clicked" from="LongJump/GhostGroup2/CBSpeedChangeButton2" to="BuzzsawChoice/GhostGroup2" method="activate"]
|
||||
[connection signal="clicked" from="LongJump/GhostGroup2/CBSpeedChangeButton2" to="LongJump/GhostGroup2/CBSpeedChangeButton2" method="_on_GameButton_clicked"]
|
||||
[connection signal="clicked" from="LongJump/GhostGroup2/CBSpeedChangeButton2" to="LongJump/GhostGroup2" method="deactivate"]
|
||||
[connection signal="clicked" from="LongJump/GhostGroup2/CBSpeedChangeButton3" to="BuzzsawChoice/GhostGroup2" method="activate"]
|
||||
[connection signal="clicked" from="LongJump/GhostGroup2/CBSpeedChangeButton3" to="LongJump/GhostGroup2/CBSpeedChangeButton3" method="_on_GameButton_clicked"]
|
||||
[connection signal="clicked" from="LongJump/GhostGroup2/CBSpeedChangeButton3" to="LongJump/GhostGroup2" method="deactivate"]
|
||||
[connection signal="clicked" from="LongJump/GhostGroup2/CBSpeedChangeButton3" to="BuzzsawChoice/GhostGroup2" method="activate"]
|
||||
[connection signal="clicked" from="Tower/GameButtonChain/GameButton6" to="Tower/GhostGroup" method="deactivate"]
|
||||
[connection signal="clicked" from="MaxLevel1/Node2D/GameButton" to="MaxLevel1/Node2D/GameButton" method="toggle"]
|
||||
[connection signal="clicked" from="MaxLevel1/Node2D/GameButton" to="MaxLevel1/Node2D/Laser" method="toggle"]
|
||||
[connection signal="clicked" from="MaxLevel1/Node2D/GameButton" to="MaxLevel1/Node2D/GameButton" method="toggle"]
|
||||
[connection signal="clicked" from="MaxLevel1/Node2D2/GameButton" to="MaxLevel1/Node2D2/Laser" method="toggle"]
|
||||
[connection signal="clicked" from="MaxLevel1/Node2D2/GameButton" to="MaxLevel1/Node2D2/GameButton" method="toggle"]
|
||||
[connection signal="clicked" from="MaxLevel1/Node2D3/GameButton" to="MaxLevel1/Node2D3/Laser" method="toggle"]
|
||||
[connection signal="clicked" from="MaxLevel1/Node2D3/GameButton" to="MaxLevel1/Node2D3/GameButton" method="toggle"]
|
||||
[connection signal="clicked" from="MaxLevel1/Node2D4/GameButton" to="Tower/GhostGroup2" method="deactivate"]
|
||||
[connection signal="clicked" from="MaxLevel1/Node2D4/GameButton" to="MaxLevel1/Node2D4/Laser" method="toggle"]
|
||||
[connection signal="clicked" from="MaxLevel1/Node2D4/GameButton" to="MaxLevel1/Node2D4/GameButton" method="toggle"]
|
||||
[connection signal="clicked" from="MaxLevel1/Node2D5/GameButton" to="MaxLevel1/Node2D5/GameButton" method="toggle"]
|
||||
[connection signal="clicked" from="MaxLevel1/Node2D4/GameButton" to="Tower/GhostGroup2" method="deactivate"]
|
||||
[connection signal="clicked" from="MaxLevel1/Node2D5/GameButton" to="MaxLevel1/Node2D5/Laser" method="toggle"]
|
||||
[connection signal="clicked" from="MaxLevel1/Node2D6/GameButton" to="MaxLevel1/Node2D6/Laser" method="toggle"]
|
||||
[connection signal="clicked" from="MaxLevel1/Node2D5/GameButton" to="MaxLevel1/Node2D5/GameButton" method="toggle"]
|
||||
[connection signal="clicked" from="MaxLevel1/Node2D6/GameButton" to="MaxLevel1/Node2D6/GameButton" method="toggle"]
|
||||
[connection signal="clicked" from="MaxLevel1/Node2D6/GameButton" to="MaxLevel1/Node2D6/Laser" method="toggle"]
|
||||
[connection signal="clicked" from="MaxLevel1/Node2D7/GameButton" to="MaxLevel1/Node2D7/GameButton" method="toggle"]
|
||||
[connection signal="clicked" from="MaxLevel1/Node2D7/GameButton" to="MaxLevel1/Node2D7/Laser" method="toggle"]
|
||||
[connection signal="clicked" from="MaxLevel1/Node2D8/GameButton" to="MaxLevel1/Node2D8/GameButton" method="toggle"]
|
||||
[connection signal="clicked" from="MaxLevel1/Node2D8/GameButton" to="MaxLevel1/Node2D8/Laser" method="toggle"]
|
||||
[connection signal="clicked" from="Safe/GameButtonChain/GameButton9" to="Intro/GhostGroup" method="deactivate"]
|
||||
[connection signal="clicked" from="Safe/GameButtonChain/GameButton9" to="Safe/GhostGroup" method="deactivate"]
|
||||
[connection signal="clicked" from="Safe/GameButtonChain/GameButton9" to="Intro/GhostGroup" method="deactivate"]
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
[gd_scene load_steps=8 format=2]
|
||||
[gd_scene load_steps=7 format=2]
|
||||
|
||||
[ext_resource path="res://Fonts/LiberationMono-Bold.ttf" type="DynamicFontData" id=1]
|
||||
[ext_resource path="res://Objects/Menu.gd" type="Script" id=2]
|
||||
[ext_resource path="res://Resources/ryg_logo.png" type="Texture" id=3]
|
||||
[ext_resource path="res://Music/Robobozo.ogg" type="AudioStream" id=4]
|
||||
[ext_resource path="res://Objects/ScrollingObjects/PlayButton.tscn" type="PackedScene" id=5]
|
||||
|
||||
[sub_resource type="DynamicFont" id=1]
|
||||
size = 32
|
||||
|
@ -13,14 +13,9 @@ font_data = ExtResource( 1 )
|
|||
size = 256
|
||||
font_data = ExtResource( 1 )
|
||||
|
||||
[sub_resource type="DynamicFont" id=3]
|
||||
size = 64
|
||||
font_data = ExtResource( 1 )
|
||||
|
||||
[node name="Menu" type="Control"]
|
||||
anchor_right = 1.0
|
||||
anchor_bottom = 1.0
|
||||
script = ExtResource( 2 )
|
||||
__meta__ = {
|
||||
"_edit_use_anchors_": false
|
||||
}
|
||||
|
@ -60,16 +55,7 @@ text = "LÖÖPS"
|
|||
align = 1
|
||||
valign = 1
|
||||
|
||||
[node name="Button" type="Button" parent="."]
|
||||
margin_left = 480.0
|
||||
margin_top = 520.0
|
||||
margin_right = 800.0
|
||||
margin_bottom = 680.0
|
||||
custom_fonts/font = SubResource( 3 )
|
||||
text = "Play"
|
||||
__meta__ = {
|
||||
"_edit_use_anchors_": false
|
||||
}
|
||||
[node name="Button" parent="." instance=ExtResource( 5 )]
|
||||
|
||||
[node name="TextureRect" type="TextureRect" parent="."]
|
||||
margin_left = 1080.0
|
||||
|
@ -85,4 +71,3 @@ __meta__ = {
|
|||
stream = ExtResource( 4 )
|
||||
volume_db = -13.109
|
||||
autoplay = true
|
||||
[connection signal="pressed" from="Button" to="." method="_on_Button_pressed"]
|
||||
|
|
5
Objects/ScrollingObjects/PlayButton.gd
Normal file
5
Objects/ScrollingObjects/PlayButton.gd
Normal file
|
@ -0,0 +1,5 @@
|
|||
extends Button
|
||||
|
||||
|
||||
func _on_Button_pressed():
|
||||
get_tree().change_scene("res://Objects/Main.tscn")
|
21
Objects/ScrollingObjects/PlayButton.tscn
Normal file
21
Objects/ScrollingObjects/PlayButton.tscn
Normal file
|
@ -0,0 +1,21 @@
|
|||
[gd_scene load_steps=4 format=2]
|
||||
|
||||
[ext_resource path="res://Fonts/LiberationMono-Bold.ttf" type="DynamicFontData" id=1]
|
||||
[ext_resource path="res://Objects/ScrollingObjects/PlayButton.gd" type="Script" id=2]
|
||||
|
||||
[sub_resource type="DynamicFont" id=1]
|
||||
size = 64
|
||||
font_data = ExtResource( 1 )
|
||||
|
||||
[node name="Button" type="Button"]
|
||||
margin_left = 480.0
|
||||
margin_top = 520.0
|
||||
margin_right = 800.0
|
||||
margin_bottom = 680.0
|
||||
custom_fonts/font = SubResource( 1 )
|
||||
text = "Play"
|
||||
script = ExtResource( 2 )
|
||||
__meta__ = {
|
||||
"_edit_use_anchors_": false
|
||||
}
|
||||
[connection signal="pressed" from="." to="." method="_on_Button_pressed"]
|
|
@ -129,10 +129,15 @@ func _physics_process(_delta):
|
|||
func win():
|
||||
print("YOU WIN!")
|
||||
print("You collected %s loops." % loops_collected)
|
||||
$FadeTo/AnimationPlayer.play("FadeToWhite")
|
||||
|
||||
func die():
|
||||
print("YOU DIED")
|
||||
print("You collected %s loops." % loops_collected)
|
||||
$Body.visible = false
|
||||
$Donut.visible = false
|
||||
$Legs.visible = false
|
||||
$FadeTo/AnimationPlayer.play("FadeToBlack")
|
||||
|
||||
|
||||
func _on_WinDoor_body_entered(body):
|
||||
|
@ -141,3 +146,11 @@ func _on_WinDoor_body_entered(body):
|
|||
|
||||
func _on_Area2D_body_entered(body):
|
||||
die()
|
||||
|
||||
|
||||
func _on_AnimationPlayer_animation_finished(anim_name):
|
||||
GLOBAL.loops_collected = loops_collected
|
||||
if anim_name == "FadeToWhite":
|
||||
get_tree().change_scene("res://Objects/Win.tscn")
|
||||
elif anim_name == "FadeToBlack":
|
||||
get_tree().change_scene("res://Objects/Lose.tscn")
|
||||
|
|
|
@ -1,9 +1,10 @@
|
|||
[gd_scene load_steps=7 format=2]
|
||||
[gd_scene load_steps=10 format=2]
|
||||
|
||||
[ext_resource path="res://Sprites/Gatto/Donut.tres" type="SpriteFrames" id=1]
|
||||
[ext_resource path="res://Objects/SpecialObjects/Player.gd" type="Script" id=2]
|
||||
[ext_resource path="res://Sprites/Gatto/Body.tres" type="SpriteFrames" id=3]
|
||||
[ext_resource path="res://Sprites/Gatto/Legs.tres" type="SpriteFrames" id=4]
|
||||
[ext_resource path="res://Sprites/white.png" type="Texture" id=5]
|
||||
|
||||
[sub_resource type="RectangleShape2D" id=1]
|
||||
extents = Vector2( 19, 19 )
|
||||
|
@ -11,6 +12,36 @@ extents = Vector2( 19, 19 )
|
|||
[sub_resource type="RectangleShape2D" id=2]
|
||||
extents = Vector2( 17, 17 )
|
||||
|
||||
[sub_resource type="Animation" id=3]
|
||||
resource_name = "FadeToBlack"
|
||||
tracks/0/type = "value"
|
||||
tracks/0/path = NodePath(".:modulate")
|
||||
tracks/0/interp = 1
|
||||
tracks/0/loop_wrap = true
|
||||
tracks/0/imported = false
|
||||
tracks/0/enabled = true
|
||||
tracks/0/keys = {
|
||||
"times": PoolRealArray( 0, 1 ),
|
||||
"transitions": PoolRealArray( 1, 1 ),
|
||||
"update": 0,
|
||||
"values": [ Color( 0, 0, 0, 0 ), Color( 0, 0, 0, 1 ) ]
|
||||
}
|
||||
|
||||
[sub_resource type="Animation" id=4]
|
||||
resource_name = "FadeToWhite"
|
||||
tracks/0/type = "value"
|
||||
tracks/0/path = NodePath(".:modulate")
|
||||
tracks/0/interp = 1
|
||||
tracks/0/loop_wrap = true
|
||||
tracks/0/imported = false
|
||||
tracks/0/enabled = true
|
||||
tracks/0/keys = {
|
||||
"times": PoolRealArray( 0, 1 ),
|
||||
"transitions": PoolRealArray( 1, 1 ),
|
||||
"update": 0,
|
||||
"values": [ Color( 1, 1, 1, 0 ), Color( 1, 1, 1, 1 ) ]
|
||||
}
|
||||
|
||||
[node name="Player" type="KinematicBody2D"]
|
||||
z_index = 1
|
||||
collision_layer = 2
|
||||
|
@ -45,4 +76,14 @@ collision_mask = 29
|
|||
|
||||
[node name="CollisionShape2D" type="CollisionShape2D" parent="Area2D"]
|
||||
shape = SubResource( 2 )
|
||||
|
||||
[node name="FadeTo" type="Sprite" parent="."]
|
||||
modulate = Color( 0, 0, 0, 0 )
|
||||
z_index = 4096
|
||||
texture = ExtResource( 5 )
|
||||
|
||||
[node name="AnimationPlayer" type="AnimationPlayer" parent="FadeTo"]
|
||||
anims/FadeToBlack = SubResource( 3 )
|
||||
anims/FadeToWhite = SubResource( 4 )
|
||||
[connection signal="body_entered" from="Area2D" to="." method="_on_Area2D_body_entered"]
|
||||
[connection signal="animation_finished" from="FadeTo/AnimationPlayer" to="." method="_on_AnimationPlayer_animation_finished"]
|
||||
|
|
73
Objects/Win.tscn
Normal file
73
Objects/Win.tscn
Normal file
|
@ -0,0 +1,73 @@
|
|||
[gd_scene load_steps=6 format=2]
|
||||
|
||||
[ext_resource path="res://Fonts/LiberationMono-Bold.ttf" type="DynamicFontData" id=1]
|
||||
[ext_resource path="res://Sprites/victory.png" type="Texture" id=2]
|
||||
|
||||
[sub_resource type="DynamicFont" id=1]
|
||||
size = 40
|
||||
font_data = ExtResource( 1 )
|
||||
|
||||
[sub_resource type="DynamicFont" id=2]
|
||||
size = 120
|
||||
font_data = ExtResource( 1 )
|
||||
|
||||
[sub_resource type="GDScript" id=3]
|
||||
script/source = "extends Label
|
||||
|
||||
func _ready():
|
||||
text = GLOBAL.loops_collected
|
||||
"
|
||||
|
||||
[node name="Control" type="Control"]
|
||||
anchor_right = 1.0
|
||||
anchor_bottom = 1.0
|
||||
__meta__ = {
|
||||
"_edit_use_anchors_": false
|
||||
}
|
||||
|
||||
[node name="TextureRect" type="TextureRect" parent="."]
|
||||
anchor_top = 1.0
|
||||
anchor_bottom = 1.0
|
||||
margin_top = -700.0
|
||||
margin_right = 700.0
|
||||
texture = ExtResource( 2 )
|
||||
|
||||
[node name="Label" type="Label" parent="."]
|
||||
margin_left = 760.0
|
||||
margin_top = 120.0
|
||||
margin_right = 1200.0
|
||||
margin_bottom = 200.0
|
||||
custom_fonts/font = SubResource( 1 )
|
||||
text = "You collected"
|
||||
align = 1
|
||||
valign = 1
|
||||
__meta__ = {
|
||||
"_edit_use_anchors_": false
|
||||
}
|
||||
|
||||
[node name="Label3" type="Label" parent="."]
|
||||
margin_left = 760.0
|
||||
margin_top = 360.0
|
||||
margin_right = 1200.0
|
||||
margin_bottom = 440.0
|
||||
custom_fonts/font = SubResource( 1 )
|
||||
text = "lööps!"
|
||||
align = 1
|
||||
valign = 1
|
||||
__meta__ = {
|
||||
"_edit_use_anchors_": false
|
||||
}
|
||||
|
||||
[node name="Label2" type="Label" parent="."]
|
||||
margin_left = 760.0
|
||||
margin_top = 200.0
|
||||
margin_right = 1200.0
|
||||
margin_bottom = 360.0
|
||||
custom_fonts/font = SubResource( 2 )
|
||||
text = "999"
|
||||
align = 1
|
||||
valign = 1
|
||||
script = SubResource( 3 )
|
||||
__meta__ = {
|
||||
"_edit_use_anchors_": false
|
||||
}
|
BIN
Sprites/victory.png
(Stored with Git LFS)
Normal file
BIN
Sprites/victory.png
(Stored with Git LFS)
Normal file
Binary file not shown.
34
Sprites/victory.png.import
Normal file
34
Sprites/victory.png.import
Normal file
|
@ -0,0 +1,34 @@
|
|||
[remap]
|
||||
|
||||
importer="texture"
|
||||
type="StreamTexture"
|
||||
path="res://.import/victory.png-3ae3126c247d012599cd55a33ca4d3fa.stex"
|
||||
metadata={
|
||||
"vram_texture": false
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://Sprites/victory.png"
|
||||
dest_files=[ "res://.import/victory.png-3ae3126c247d012599cd55a33ca4d3fa.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=true
|
||||
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
|
||||
stream=false
|
||||
size_limit=0
|
||||
detect_3d=true
|
||||
svg/scale=1.0
|
BIN
Sprites/white.png
(Stored with Git LFS)
Normal file
BIN
Sprites/white.png
(Stored with Git LFS)
Normal file
Binary file not shown.
34
Sprites/white.png.import
Normal file
34
Sprites/white.png.import
Normal file
|
@ -0,0 +1,34 @@
|
|||
[remap]
|
||||
|
||||
importer="texture"
|
||||
type="StreamTexture"
|
||||
path="res://.import/white.png-a347c6a7d84041e138b2e121d3c40de4.stex"
|
||||
metadata={
|
||||
"vram_texture": false
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://Sprites/white.png"
|
||||
dest_files=[ "res://.import/white.png-a347c6a7d84041e138b2e121d3c40de4.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=true
|
||||
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
|
||||
stream=false
|
||||
size_limit=0
|
||||
detect_3d=true
|
||||
svg/scale=1.0
|
|
@ -138,6 +138,10 @@ config/name="Looping for Lööps"
|
|||
run/main_scene="res://Objects/Menu.tscn"
|
||||
config/icon="res://Sprites/clock.png"
|
||||
|
||||
[autoload]
|
||||
|
||||
GLOBAL="*res://Objects/GLOBAL.tscn"
|
||||
|
||||
[debug]
|
||||
|
||||
settings/stdout/print_fps=true
|
||||
|
@ -196,4 +200,4 @@ cheat_slower={
|
|||
quality/driver/driver_name="GLES2"
|
||||
vram_compression/import_etc=true
|
||||
vram_compression/import_etc2=false
|
||||
environment/default_clear_color=Color( 0.235294, 0.2, 0.168627, 1 )
|
||||
environment/default_clear_color=Color( 0.101961, 0.0627451, 0.027451, 1 )
|
||||
|
|
Loading…
Reference in a new issue