Skip to content

Commit

Permalink
Formatting fix on Credits.tscn
Browse files Browse the repository at this point in the history
  • Loading branch information
vivipu committed Mar 23, 2021
1 parent d266c19 commit 2ed22a4
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 13 deletions.
Binary file modified Magic Maze/Export/MagicMaze.zip
Binary file not shown.
9 changes: 4 additions & 5 deletions Magic Maze/Scenes/Levels (Maps)/level1.gd
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,9 @@ onready var tile = get_node("TileMap")
func get_tile(mouse_pos):
var cell_pos = tile.world_to_map(mouse_pos)
return cell_pos
#function for player click
#input function
func _input(event):

#player click
if event is InputEventMouseButton and event.is_pressed():
var clicked = get_tile(event.position)
#detect if tile is there
Expand All @@ -52,18 +52,17 @@ func _input(event):
if vars.lives <= 0:
game_over()
$CanvasLayer/Control/Counter/Label2.text = str(vars.lives)

#game exit
if event is InputEventKey:
if event.scancode == KEY_ESCAPE:
get_tree().quit()
#tile highlighting
else:
var hover = get_tile(event.position)
if tile.get_cell(hover.x, hover.y) == 0:
$Follow.show()
else:
$Follow.hide()
#detect collision with player

#enter high score on game over
func _on_Button2_pressed():
var name = $"CanvasLayer/Control/Counter/HighScore/NameEntry".text
Expand Down
8 changes: 4 additions & 4 deletions Magic Maze/Scenes/Other/Credits.tscn
Original file line number Diff line number Diff line change
Expand Up @@ -12067,10 +12067,10 @@ __meta__ = {
}

[node name="Label" type="Label" parent="."]
margin_left = 448.753
margin_top = 4.00666
margin_right = 707.753
margin_bottom = 67.0067
margin_left = 411.323
margin_top = 5.25992
margin_right = 618.323
margin_bottom = 97.2599
custom_fonts/font = SubResource( 1445 )
text = "CREDITS"
__meta__ = {
Expand Down
7 changes: 3 additions & 4 deletions Magic Maze/Scenes/Other/TitleScreen.gd
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
extends Control

onready var fadeInRect = $FadeIn
onready var vars = get_node("/root/Global")
#set score to 0

func _ready():
#play title screen music
if get_node("/root/MusicTitle").playing == false:
get_node("/root/MusicTitle").play()
#set these values back to default when the player is on the title screen
vars.score = 0
vars.lives = 3
vars.moves = 3
Expand All @@ -25,7 +26,5 @@ func _on_Quit_pressed():
get_tree().quit()
func _on_Instructions_pressed():
get_tree().change_scene("res://Scenes/Other/Instructions.tscn")


func _on_Credits_pressed():
get_tree().change_scene("res://Scenes/Other/Credits.tscn")

0 comments on commit 2ed22a4

Please sign in to comment.