add license, move folders

This commit is contained in:
Nordup 2024-05-04 00:14:24 +04:00
parent 185cc74060
commit 271c4a46a1
132 changed files with 21 additions and 0 deletions

42
app/scripts/platform.gd Normal file
View file

@ -0,0 +1,42 @@
extends Node
class_name Platform
enum {
WINDOWS,
MACOS,
LINUX_BSD,
ANDROID,
IOS,
WEB
}
static func is_windows() -> bool:
return get_platform() == WINDOWS
static func is_linux() -> bool:
return get_platform() == LINUX_BSD
static func is_debug() -> bool:
return OS.is_debug_build()
static func get_platform() -> int:
match OS.get_name():
"Windows", "UWP":
return WINDOWS
"macOS":
return MACOS
"Linux", "FreeBSD", "NetBSD", "OpenBSD", "BSD":
return LINUX_BSD
"Android":
return ANDROID
"iOS":
return IOS
"Web":
return WEB
_:
assert(false, "No such platform")
return -1