/
evggal
/
math_game
Обзор
Документация
Войти
/
evggal
/
math_game
Код
Запросы
0
Задачи
Вики
Пакеты
0
Релизы
0
Аналитика
Безопасность
master
scripts/pc.gd
27 строк
674 B
Michail Inyushin
alpha light + scen connection
10 дек 2024, 16:13
10 дек 2024, 16:13
03b3a19
Код
Авторство
О чём код?
extends Node2D # Called when the node enters the scene tree for the first time. func _ready() -> void: pass # Replace with function body. var hero_near_pc = false signal hero_interacted_pc # Called every frame. 'delta' is the elapsed time since the previous frame. func _process(delta: float) -> void: if hero_near_pc: if Input.is_action_just_pressed("Interact"): hero_interacted_pc.emit() print("eeeeee") var x = load("res://scenes/graph.tscn") get_tree().change_scene_to_packed(x) func _on_area_2d_pc_body_entered(body: Node2D) -> void: hero_near_pc = true print("e1") func _on_area_2d_pc_body_exited(body: Node2D) -> void: hero_near_pc = false