Skip to content

Commit

Permalink
Adding a level end screen
Browse files Browse the repository at this point in the history
  • Loading branch information
JenniBee committed May 7, 2017
1 parent 1e3b002 commit d17f27a
Show file tree
Hide file tree
Showing 10 changed files with 196 additions and 21 deletions.
Binary file added Assets/art/skills-lightsoda-and-jenni.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
6 changes: 3 additions & 3 deletions Assets/scripts/btnToLevel.gd
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,15 @@ var current_scene

func play_pressed():
current_scene.queue_free()
get_tree().change_scene('res://Levels/Level1.xml')
get_tree().change_scene('res://Levels/Level1.tscn')

func play_credits():
current_scene.queue_free()
get_tree().change_scene('res://Levels/Credits.xml')
get_tree().change_scene('res://Levels/Credits.tscn')

func play_options():
current_scene.queue_free()
get_tree().change_scene('res://Levels/Options.xml')
get_tree().change_scene('res://Levels/Options.tscn')

func quit_pressed():
current_scene.queue_free()
Expand Down
2 changes: 1 addition & 1 deletion Assets/scripts/credits.gd
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ var current_scene

func GoBack_pressed():
current_scene.queue_free()
get_tree().change_scene('res://Levels/Menu.xml')
get_tree().change_scene('res://Levels/Menu.tscn')

func _ready():
var root = get_tree().get_root()
Expand Down
12 changes: 12 additions & 0 deletions Assets/scripts/level_end.gd
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
var current_scene

func Quit_pressed():
current_scene.queue_free()
get_tree().quit();

func _ready():
var root = get_tree().get_root()
current_scene = root.get_child(root.get_child_count() -1)

get_node("Quit").connect("pressed", self, "Quit_pressed")

2 changes: 1 addition & 1 deletion Assets/scripts/options.gd
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ var current_scene

func GoBack_pressed():
current_scene.queue_free()
get_tree().change_scene('res://Levels/Menu.xml')
get_tree().change_scene('res://Levels/Menu.tscn')

func _ready():
var root = get_tree().get_root()
Expand Down
2 changes: 1 addition & 1 deletion Assets/scripts/platformer.gd
Original file line number Diff line number Diff line change
Expand Up @@ -261,7 +261,7 @@ func _process(delta):

if(exit_door in player.get_colliding_bodies()):
current_scene.queue_free()
get_tree().quit();
get_tree().change_scene('res://Levels/Level_end.tscn')

#If the water is part of the player's colliding bodies...
if water in player.get_colliding_bodies():
Expand Down
Binary file not shown.
4 changes: 2 additions & 2 deletions Levels/Level1.tscn
Original file line number Diff line number Diff line change
Expand Up @@ -224,7 +224,7 @@ speed = 400

[node name="Moving_platform" type="StaticBody2D" parent="Moving platform"]

transform/pos = Vector2( 2506.83, 288.91 )
transform/pos = Vector2( 2506.83, 186.14 )
transform/scale = Vector2( 43.8363, 2.47025 )
input/pickable = false
shapes/0/shape = SubResource( 8 )
Expand Down Expand Up @@ -268,7 +268,7 @@ speed = 300

[node name="Moving_platform" type="StaticBody2D" parent="Moving platform2"]

transform/pos = Vector2( 2046.95, 136.128 )
transform/pos = Vector2( 2046.95, 969.713 )
transform/scale = Vector2( 43.8363, 2.47025 )
input/pickable = false
shapes/0/shape = SubResource( 8 )
Expand Down
163 changes: 163 additions & 0 deletions Levels/Level_end.tscn
Original file line number Diff line number Diff line change
@@ -0,0 +1,163 @@
[gd_scene load_steps=4 format=1]

[ext_resource path="res://Assets/art/cheer-cheeseness-and-jenni.png" type="Texture" id=1]
[ext_resource path="res://Assets/sounds/Streams/Music/i-play-bad-golf-but-feel-good-jenni.ogg" type="AudioStream" id=2]
[ext_resource path="res://Assets/scripts/level_end.gd" type="Script" id=3]

[node name="Control" type="Control"]

focus/ignore_mouse = false
focus/stop_mouse = true
size_flags/horizontal = 2
size_flags/vertical = 2
margin/left = 0.0
margin/top = 0.0
margin/right = 40.0
margin/bottom = 40.0
__meta__ = {
"__editor_plugin_screen__": "2D"
}

[node name="Camera2D" type="Camera2D" parent="."]

transform/pos = Vector2( 552, 362 )
anchor_mode = 1
rotating = false
current = true
zoom = Vector2( 1, 1 )
limit/left = -10000000
limit/top = -10000000
limit/right = 10000000
limit/bottom = 10000000
drag_margin/h_enabled = true
drag_margin/v_enabled = true
smoothing/enable = false
smoothing/speed = 5.0
drag_margin/left = 0.2
drag_margin/top = 0.2
drag_margin/right = 0.2
drag_margin/bottom = 0.2

[node name="TextureFrame" type="TextureFrame" parent="."]

focus/ignore_mouse = true
focus/stop_mouse = true
size_flags/horizontal = 2
size_flags/vertical = 2
margin/left = -405.0
margin/top = -176.0
margin/right = 1509.0
margin/bottom = 905.0
texture = ExtResource( 1 )
expand = true
stretch_mode = 0

[node name="StreamPlayer" type="StreamPlayer" parent="."]

stream/stream = ExtResource( 2 )
stream/play = false
stream/loop = true
stream/volume_db = 0.0
stream/autoplay = true
stream/paused = false
stream/loop_restart_time = 0.0
stream/buffering_ms = 500

[node name="buttons" type="Control" parent="."]

focus/ignore_mouse = false
focus/stop_mouse = true
size_flags/horizontal = 2
size_flags/vertical = 2
margin/left = 0.0
margin/top = 0.0
margin/right = 40.0
margin/bottom = 40.0
script/script = ExtResource( 3 )

[node name="Line1" type="Label" parent="buttons"]

rect/scale = Vector2( 2, 2 )
focus/ignore_mouse = true
focus/stop_mouse = true
size_flags/horizontal = 2
size_flags/vertical = 0
margin/left = 129.0
margin/top = 438.0
margin/right = 511.0
margin/bottom = 461.0
custom_colors/font_color = Color( 0, 0, 0, 1 )
text = "The Lost Dev Team made it out of the first prototype safely!"
percent_visible = 1.0
lines_skipped = 0
max_lines_visible = -1

[node name="Line2" type="Label" parent="buttons"]

rect/scale = Vector2( 2, 2 )
focus/ignore_mouse = true
focus/stop_mouse = true
size_flags/horizontal = 2
size_flags/vertical = 0
margin/left = 173.0
margin/top = 503.0
margin/right = 516.0
margin/bottom = 521.0
custom_colors/font_color = Color( 0, 0, 0, 1 )
text = "But there's much more on the way! And you can help!"
percent_visible = 1.0
lines_skipped = 0
max_lines_visible = -1

[node name="Line3" type="Label" parent="buttons"]

rect/scale = Vector2( 2, 2 )
focus/ignore_mouse = true
focus/stop_mouse = true
size_flags/horizontal = 2
size_flags/vertical = 0
margin/left = -165.0
margin/top = 615.0
margin/right = 549.0
margin/bottom = 629.0
custom_colors/font_color = Color( 0, 0, 0, 1 )
text = "Join the development of the Lost Dev Team at http://www.github.com/double-fine-game-club/the-lost-dev-team"
percent_visible = 1.0
lines_skipped = 0
max_lines_visible = -1

[node name="Line4" type="Label" parent="buttons"]

rect/scale = Vector2( 2, 2 )
focus/ignore_mouse = true
focus/stop_mouse = true
size_flags/horizontal = 2
size_flags/vertical = 0
margin/left = -25.0
margin/top = 685.0
margin/right = 558.0
margin/bottom = 699.0
custom_colors/font_color = Color( 0, 0, 0, 1 )
text = "Together, we can complete the game and help these lost developers find a way home!"
percent_visible = 1.0
lines_skipped = 0
max_lines_visible = -1

[node name="Quit" type="Button" parent="buttons"]

rect/scale = Vector2( 3, 3 )
focus/ignore_mouse = false
focus/stop_mouse = true
size_flags/horizontal = 2
size_flags/vertical = 2
margin/left = 460.0
margin/top = 748.0
margin/right = 511.0
margin/bottom = 772.0
toggle_mode = false
enabled_focus_mode = 2
shortcut = null
text = "Quit"
flat = false


Expand Down
26 changes: 13 additions & 13 deletions Levels/Options.tscn
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[gd_scene load_steps=4 format=1]

[ext_resource path="res://Assets/art/cheer-cheeseness-and-jenni.png" type="Texture" id=1]
[ext_resource path="res://Assets/art/skills-lightsoda-and-jenni.png" type="Texture" id=1]
[ext_resource path="res://Assets/sounds/Streams/Music/beepbox-xong-options-anenome.ogg" type="AudioStream" id=2]
[ext_resource path="res://Assets/scripts/options.gd" type="Script" id=3]

Expand Down Expand Up @@ -82,10 +82,10 @@ focus/ignore_mouse = true
focus/stop_mouse = true
size_flags/horizontal = 2
size_flags/vertical = 0
margin/left = 475.0
margin/top = 404.0
margin/right = 683.0
margin/bottom = 432.0
margin/left = 580.0
margin/top = 445.0
margin/right = 788.0
margin/bottom = 473.0
custom_colors/font_color = Color( 0, 0, 0, 1 )
text = "Options"
percent_visible = 1.0
Expand All @@ -99,10 +99,10 @@ focus/ignore_mouse = true
focus/stop_mouse = true
size_flags/horizontal = 2
size_flags/vertical = 0
margin/left = 395.0
margin/top = 576.0
margin/right = 603.0
margin/bottom = 604.0
margin/left = 506.0
margin/top = 574.0
margin/right = 714.0
margin/bottom = 602.0
custom_colors/font_color = Color( 0, 0, 0, 1 )
text = "Options will go here."
percent_visible = 1.0
Expand All @@ -116,10 +116,10 @@ focus/ignore_mouse = false
focus/stop_mouse = true
size_flags/horizontal = 2
size_flags/vertical = 2
margin/left = 449.0
margin/top = 744.0
margin/right = 500.0
margin/bottom = 768.0
margin/left = 556.0
margin/top = 693.0
margin/right = 607.0
margin/bottom = 717.0
toggle_mode = false
enabled_focus_mode = 2
shortcut = null
Expand Down

0 comments on commit d17f27a

Please sign in to comment.