Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,4 @@ addons/

.obsidian/

todo.md
Binary file removed assets/item_icons/x.png
Binary file not shown.
34 changes: 0 additions & 34 deletions assets/item_icons/x.png.import

This file was deleted.

Binary file removed assets/maze_assets_very_temp/Apparatus.png
Binary file not shown.
34 changes: 0 additions & 34 deletions assets/maze_assets_very_temp/Apparatus.png.import

This file was deleted.

Binary file removed assets/maze_assets_very_temp/Grid.png
Binary file not shown.
34 changes: 0 additions & 34 deletions assets/maze_assets_very_temp/Grid.png.import

This file was deleted.

Binary file removed assets/maze_assets_very_temp/MazeCharacter.png
Binary file not shown.
34 changes: 0 additions & 34 deletions assets/maze_assets_very_temp/MazeCharacter.png.import

This file was deleted.

Binary file removed assets/maze_assets_very_temp/OutsideCharacter.png
Binary file not shown.
34 changes: 0 additions & 34 deletions assets/maze_assets_very_temp/OutsideCharacter.png.import

This file was deleted.

Binary file removed assets/maze_assets_very_temp/PIECE.png
Binary file not shown.
34 changes: 0 additions & 34 deletions assets/maze_assets_very_temp/PIECE.png.import

This file was deleted.

Binary file removed assets/maze_assets_very_temp/Wall.png
Binary file not shown.
34 changes: 0 additions & 34 deletions assets/maze_assets_very_temp/Wall.png.import

This file was deleted.

Binary file removed assets/menu_arrow.png
Binary file not shown.
34 changes: 0 additions & 34 deletions assets/menu_arrow.png.import

This file was deleted.

27 changes: 24 additions & 3 deletions src/boots/boots.gd
Original file line number Diff line number Diff line change
@@ -1,36 +1,57 @@
extends Node2D


var move_code: Array[String] = ["down","down","down","down","down"]
var recent_moves: Array[String] = ["","","","",""]
var winning_move_code: Array[String] = ["down","down","down","down","down","right"]
var teleport_move_code: Array[String] = ["down","up","down","up"]
var recent_moves: Array[String] = ["","","","","",""]

# Called when the node enters the scene tree for the first time.
signal teleport_entered()

func _ready() -> void:
print("BOOTS ON!!!")
connect_to_player()
connect_to_main()

func connect_to_player() -> void:
var player := get_parent()
player.moved.connect(player_moved)

func connect_to_main() -> void:
var main := get_parent().get_parent()
self.teleport_entered.connect(main.on_teleport_entered)

func player_moved(dir: Vector2) -> void:
match dir:
Vector2(0,1):
push_move("down")
$DownSound.play()
pass
Vector2(0,-1):
push_move("up")
$UpSound.play()
pass
Vector2(1,0):
push_move("right")
$RightSound.play()
pass
Vector2(-1,0):
push_move("left")
$LeftSound.play()
pass
check_move_codes()

if recent_moves == move_code:
func check_move_codes():
if recent_moves == winning_move_code:
code_entered()
if recent_moves.slice(1,-1) == teleport_move_code:
<<<<<<< HEAD
teleport_entered.emit()
=======
teleport_requested.emit()
>>>>>>> 19aa049 (Teleportation And Preparing for next levels)
pass
pass

func push_move(dir_string: String) -> void:
recent_moves.pop_front()
Expand Down
12 changes: 12 additions & 0 deletions src/boots/boots.tscn
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,15 @@

[node name="Boots" type="Node2D"]
script = ExtResource("1_1p87s")

[node name="UpSound" type="AudioStreamPlayer2D" parent="."]
position = Vector2(0, -99)

[node name="DownSound" type="AudioStreamPlayer2D" parent="."]
position = Vector2(0, 99)

[node name="LeftSound" type="AudioStreamPlayer2D" parent="."]
position = Vector2(-99, 0)

[node name="RightSound" type="AudioStreamPlayer2D" parent="."]
position = Vector2(99, 0)
2 changes: 1 addition & 1 deletion src/items/item_res.gd → src/items/item.gd
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,4 @@ func given_to_player():
in_inventory = true

func removed_from_player():
in_inventory = false
in_inventory = false
Loading