Add screenshot functionality and new level scene to game manager

This commit is contained in:
2025-06-05 01:00:10 +02:00
parent df154a786c
commit 039dc1d5e5
4 changed files with 23 additions and 3 deletions

8
scripts/screenshot.gd Normal file
View File

@@ -0,0 +1,8 @@
extends Node
func _process(_delta: float) -> void:
if OS.is_debug_build() and Input.is_action_just_pressed("screenshot"):
var img := get_viewport().get_texture().get_image()
var id := OS.get_unique_id() + "_" + Time.get_datetime_string_from_system()
var path := "user://screenshot_" + str(id) + ".png"
img.save_png(path)