-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Finished menus; game over works; terrain now places enemies, exit, an…
…d player
- Loading branch information
Showing
15 changed files
with
148 additions
and
8 deletions.
There are no files selected for viewing
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
|
||
extends Area2D | ||
|
||
var player | ||
|
||
func _ready(): | ||
player = get_tree().get_nodes_in_group("players")[0] | ||
set_fixed_process(true) | ||
|
||
func _fixed_process(delta): | ||
if(overlaps_body(player)): | ||
print("Exit found!") | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
|
||
extends VBoxContainer | ||
|
||
func _ready(): | ||
pass | ||
|
||
func _draw(): | ||
draw_rect(Rect2(-2, -2, get_size().x+4, get_size().y+4), Color(255, 255, 255)) | ||
draw_rect(Rect2(-1, -1, get_size().x+2, get_size().y+2), Color(0, 0, 0)) | ||
|
||
func toggle(): | ||
if(get_index() != get_parent().get_child_count() - 1): | ||
get_parent().move_child(self, get_parent().get_child_count() - 1) | ||
show() | ||
var w = get_viewport().get_rect().size.x | ||
var h = get_viewport().get_rect().size.y | ||
var player = get_tree().get_nodes_in_group("players")[0] | ||
var playerCam = player.find_node("Camera2D") | ||
var x = playerCam.get_camera_pos().x - (w / 4) | ||
var y = playerCam.get_camera_pos().y - (h / 4) | ||
set_pos(Vector2(x, y + 40)) | ||
|
||
func _on_Button_pressed(): | ||
get_tree().set_pause(false) | ||
get_tree().change_scene("res://Scenes/main_menu.scn") | ||
hide() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
filter=false | ||
gen_mipmaps=false |
Binary file not shown.