53 lines
1.4 KiB
GDScript
53 lines
1.4 KiB
GDScript
extends Node
|
|
|
|
enum playerState {
|
|
eState_Menu,
|
|
eState_Office,
|
|
eState_Camera,
|
|
eState_Dead
|
|
}
|
|
|
|
enum LocationID {
|
|
POWER_STATION=0,
|
|
DINING_AREA=1,
|
|
WEST_HALL=2,
|
|
EAST_HALL=3,
|
|
SUPPLY_CLOSET=4,
|
|
BACKSTAGE=5,
|
|
LIVING_AREA=6,
|
|
OFFICE_LEFT_DOOR=7,
|
|
OFFICE_RIGHT_DOOR=8,
|
|
OFFICE=9
|
|
}
|
|
|
|
var LocationGraph := {
|
|
LocationID.POWER_STATION: [LocationID.DINING_AREA],
|
|
LocationID.WEST_HALL: [LocationID.OFFICE_LEFT_DOOR],
|
|
LocationID.EAST_HALL: [LocationID.OFFICE_RIGHT_DOOR],
|
|
LocationID.OFFICE_LEFT_DOOR: [],
|
|
LocationID.OFFICE_RIGHT_DOOR: []
|
|
}
|
|
|
|
var gameNight = 0
|
|
var stars = 0
|
|
var nightStarted: bool = false
|
|
var nightCompleted: bool = false
|
|
|
|
var currentPlayerState: playerState = playerState.eState_Menu
|
|
|
|
func _ready() -> void:
|
|
nightStarted = true
|
|
|
|
func _input(event: InputEvent) -> void:
|
|
if event is InputEventKey:
|
|
if event.pressed:
|
|
if event.keycode == KEY_ESCAPE:
|
|
get_tree().quit()
|
|
if event.keycode == KEY_F11:
|
|
if DisplayServer.window_get_mode() == DisplayServer.WINDOW_MODE_EXCLUSIVE_FULLSCREEN:
|
|
DisplayServer.window_set_mode(DisplayServer.WINDOW_MODE_WINDOWED)
|
|
DisplayServer.window_set_size(Vector2i(1152, 648))
|
|
DisplayServer.window_set_position(Vector2i(int((DisplayServer.screen_get_size().x/2.0)-(DisplayServer.window_get_size().x/2.0)),int((DisplayServer.screen_get_size().y/2.0)-(DisplayServer.window_get_size().y/2.0))))
|
|
else:
|
|
DisplayServer.window_set_mode(DisplayServer.WINDOW_MODE_EXCLUSIVE_FULLSCREEN)
|