2023-01-15 14:15:51 -05:00
|
|
|
extends Node2D
|
|
|
|
|
|
|
|
@onready var doors = $Doors;
|
|
|
|
|
2023-01-15 15:02:42 -05:00
|
|
|
var mimic_count = 0;
|
|
|
|
|
2023-01-15 14:15:51 -05:00
|
|
|
func _ready():
|
|
|
|
pass
|
|
|
|
|
|
|
|
func _process(delta):
|
2023-01-15 15:02:42 -05:00
|
|
|
if mimic_count >= 4 :
|
|
|
|
doors.remove_child($Doors/Bathroom_Bottom);
|
|
|
|
doors.remove_child($Doors/Cafeteria);
|
2023-01-15 14:15:51 -05:00
|
|
|
|
|
|
|
func _on_pickable_t_shirt_picked():
|
|
|
|
doors.remove_child($Doors/FrontDoor_Left);
|
|
|
|
doors.remove_child($Doors/FrontDoor_Right);
|
|
|
|
|
|
|
|
|
|
|
|
func _on_outside_enemy_is_killed():
|
|
|
|
doors.remove_child($Doors/ClassDoor);
|
|
|
|
|
|
|
|
|
|
|
|
func _on_shoes_picked():
|
2023-01-15 15:51:52 -05:00
|
|
|
doors.remove_child($Doors/Locker);
|
2023-01-15 15:02:42 -05:00
|
|
|
|
|
|
|
|
|
|
|
func _on_mimic_01_is_killed():
|
|
|
|
mimic_count += 1;
|
|
|
|
|
|
|
|
|
|
|
|
func _on_mimic_03_is_killed():
|
|
|
|
mimic_count += 1;
|
|
|
|
|
|
|
|
|
|
|
|
func _on_mimic_04_is_killed():
|
|
|
|
mimic_count += 1;
|
|
|
|
|
|
|
|
|
|
|
|
func _on_mimic_02_is_killed():
|
|
|
|
mimic_count += 1;
|
|
|
|
|
|
|
|
func _on_pants_picked():
|
2023-01-15 15:51:52 -05:00
|
|
|
doors.remove_child($Doors/Bathroom_Top);
|
2023-01-15 15:02:42 -05:00
|
|
|
|
|
|
|
|
|
|
|
func _on_gym_enemy_05_is_killed():
|
|
|
|
doors.remove_child($Doors/Gym);
|
|
|
|
doors.remove_child($Doors/BackDoor_Left);
|
|
|
|
doors.remove_child($Doors/BackDoor_Right);
|
|
|
|
|
2023-01-15 15:28:35 -05:00
|
|
|
|
|
|
|
|
|
|
|
func _on_area_2d_body_entered(body):
|
|
|
|
if body.name == "Player":
|
|
|
|
win();
|
|
|
|
|
|
|
|
func win():
|
|
|
|
get_tree().change_scene_to_file("res://YouWin.tscn");
|