extends Node2D ## Title screen: PLAY -> character select, EDITOR -> content editor. func _ready() -> void: # export smoke-test hook: FOITIN_SHOT=1 boots straight into a demo fight # that saves user://shot.png and quits (match_engine reads the env too) if OS.get_environment("FOITIN_SHOT") != "": GameState.p1_pick = "kachujin" GameState.p2_pick = "decks" get_tree().change_scene_to_file.call_deferred("res://engine/scenes/Fight.tscn") return var bg := ColorRect.new() bg.color = Color("#101218") bg.size = Vector2(1280, 720) add_child(bg) var title := Label.new() title.text = "F O I T I N" title.add_theme_font_size_override("font_size", 110) title.position = Vector2(400, 170) add_child(title) var sub := Label.new() sub.text = "digitized fighting" sub.modulate = Color(1, 1, 1, 0.45) sub.add_theme_font_size_override("font_size", 26) sub.position = Vector2(540, 300) add_child(sub) Settings.load_and_apply() _button("PLAY", Vector2(540, 400), func(): get_tree().change_scene_to_file("res://engine/scenes/Select.tscn")) _button("EDITOR", Vector2(540, 470), func(): get_tree().change_scene_to_file("res://engine/scenes/Editor.tscn")) _button("SETTINGS", Vector2(540, 540), func(): get_tree().change_scene_to_file("res://engine/scenes/Settings.tscn")) var hint := Label.new() hint.text = "P1: WASD + J/K P2: arrows + O/P" hint.modulate = Color(1, 1, 1, 0.35) hint.position = Vector2(470, 660) add_child(hint) func _button(text: String, pos: Vector2, cb: Callable) -> void: var b := Button.new() b.text = text b.position = pos b.size = Vector2(200, 56) b.add_theme_font_size_override("font_size", 28) b.pressed.connect(cb) add_child(b)