EditorVisibleNode.gd 340 B

1234567891011
  1. class_name LevelEditorVisibleNode
  2. extends Node2D
  3. func _ready() -> void:
  4. update()
  5. if Global.level_editor != null:
  6. Global.level_editor.editor_start.connect(update)
  7. Global.level_editor.level_start.connect(update)
  8. func update() -> void:
  9. visible = !LevelEditor.playing_level and Global.current_game_mode == Global.GameMode.LEVEL_EDITOR