extends Node signal activate_seg(int) signal eat_apple signal die #trigger game over logic var current_seg : Node2D var cur_id : int = 0 var player_mode : bool = false # Called when the node enters the scene tree for the first time. func _ready() -> void: die.connect(end_game) pass # Replace with function body. # Called every frame. 'delta' is the elapsed time since the previous frame. func _process(delta: float) -> void: if (Input.is_action_just_pressed("test_switch_cam")): player_mode = !player_mode func end_game(): print("i die") get_tree().get_root().process_mode = Node.PROCESS_MODE_DISABLED