Initial Commit

This commit is contained in:
June
2026-03-24 22:00:03 -07:00
parent bf9620bbb6
commit 5533b95cff
73 changed files with 1647 additions and 293 deletions

12
Data/cameras.json Normal file
View File

@@ -0,0 +1,12 @@
{
"HANGAR": 1,
"KITCHEN": 2,
"REC_ROOM": 3,
"RESTROOM": 4,
"SUPPLY_ROOM": 5,
"MAINTENANCE_ROOM": 6,
"STORAGE_A": 7,
"STORAGE_B": 8,
"EAST_HALLWAY": 9,
"WEST_HALLWAY": 10
}

58
Data/locations.json Normal file
View File

@@ -0,0 +1,58 @@
{
"0": {
"name": "office",
"connections": [2]
},
"1": {
"name": "hangar",
"connections": [3, 4, 2, 5, 7]
},
"2": {
"name": "hangar_rear",
"connections": [1, 11, 12]
},
"3": {
"name": "kitchen",
"connections": [1, 4]
},
"4": {
"name": "rec_room",
"connections": [1, 3, 5]
},
"5": {
"name": "restroom",
"connections": [1, 4]
},
"6": {
"name": "supply_room",
"connections": [11, 7]
},
"7": {
"name": "maintenance_room",
"connections": [1, 6, 10]
},
"8": {
"name": "storage_a",
"connections": [11]
},
"9": {
"name": "storage_b",
"connections": [10]
},
"10": {
"name": "power_room",
"connections": [7, 12, 9]
},
"11": {
"name": "east_hallway",
"connections": [2, 6, 8]
},
"12": {
"name": "west_hallway",
"connections": [2, 10]
},
"99": {
"name": "hidden",
"connections": []
}
}

Binary file not shown.

View File

@@ -0,0 +1,36 @@
[remap]
importer="font_data_dynamic"
type="FontFile"
uid="uid://wr4m0m2b03d5"
path="res://.godot/imported/GoogleSansCode-Italic-VariableFont_wght.ttf-a2a26cfb6932a691544202c2650925a2.fontdata"
[deps]
source_file="res://Fonts/GoogleSansCode-Italic-VariableFont_wght.ttf"
dest_files=["res://.godot/imported/GoogleSansCode-Italic-VariableFont_wght.ttf-a2a26cfb6932a691544202c2650925a2.fontdata"]
[params]
Rendering=null
antialiasing=1
generate_mipmaps=false
disable_embedded_bitmaps=true
multichannel_signed_distance_field=false
msdf_pixel_range=8
msdf_size=48
allow_system_fallback=true
force_autohinter=false
modulate_color_glyphs=false
hinting=1
subpixel_positioning=4
keep_rounding_remainders=true
oversampling=0.0
Fallbacks=null
fallbacks=[]
Compress=null
compress=true
preload=[]
language_support={}
script_support={}
opentype_features={}

Binary file not shown.

View File

@@ -0,0 +1,36 @@
[remap]
importer="font_data_dynamic"
type="FontFile"
uid="uid://vfqxvpmfjob"
path="res://.godot/imported/GoogleSansCode-VariableFont_wght.ttf-71ec7162bd5ed1b2eff71e698c300beb.fontdata"
[deps]
source_file="res://Fonts/GoogleSansCode-VariableFont_wght.ttf"
dest_files=["res://.godot/imported/GoogleSansCode-VariableFont_wght.ttf-71ec7162bd5ed1b2eff71e698c300beb.fontdata"]
[params]
Rendering=null
antialiasing=1
generate_mipmaps=false
disable_embedded_bitmaps=true
multichannel_signed_distance_field=false
msdf_pixel_range=8
msdf_size=48
allow_system_fallback=true
force_autohinter=false
modulate_color_glyphs=false
hinting=1
subpixel_positioning=4
keep_rounding_remainders=true
oversampling=0.0
Fallbacks=null
fallbacks=[]
Compress=null
compress=true
preload=[]
language_support={}
script_support={}
opentype_features={}

Binary file not shown.

View File

@@ -0,0 +1,36 @@
[remap]
importer="font_data_dynamic"
type="FontFile"
uid="uid://crmm0c1icbfha"
path="res://.godot/imported/GoogleSansCode-Bold.ttf-087254a4e12d2d8a067fd76c26d31bca.fontdata"
[deps]
source_file="res://Fonts/static/GoogleSansCode-Bold.ttf"
dest_files=["res://.godot/imported/GoogleSansCode-Bold.ttf-087254a4e12d2d8a067fd76c26d31bca.fontdata"]
[params]
Rendering=null
antialiasing=1
generate_mipmaps=false
disable_embedded_bitmaps=true
multichannel_signed_distance_field=false
msdf_pixel_range=8
msdf_size=48
allow_system_fallback=true
force_autohinter=false
modulate_color_glyphs=false
hinting=1
subpixel_positioning=4
keep_rounding_remainders=true
oversampling=0.0
Fallbacks=null
fallbacks=[]
Compress=null
compress=true
preload=[]
language_support={}
script_support={}
opentype_features={}

Binary file not shown.

View File

@@ -0,0 +1,36 @@
[remap]
importer="font_data_dynamic"
type="FontFile"
uid="uid://b712tdutfjs77"
path="res://.godot/imported/GoogleSansCode-BoldItalic.ttf-9a3008c979bbf2211d0e982a411f21c8.fontdata"
[deps]
source_file="res://Fonts/static/GoogleSansCode-BoldItalic.ttf"
dest_files=["res://.godot/imported/GoogleSansCode-BoldItalic.ttf-9a3008c979bbf2211d0e982a411f21c8.fontdata"]
[params]
Rendering=null
antialiasing=1
generate_mipmaps=false
disable_embedded_bitmaps=true
multichannel_signed_distance_field=false
msdf_pixel_range=8
msdf_size=48
allow_system_fallback=true
force_autohinter=false
modulate_color_glyphs=false
hinting=1
subpixel_positioning=4
keep_rounding_remainders=true
oversampling=0.0
Fallbacks=null
fallbacks=[]
Compress=null
compress=true
preload=[]
language_support={}
script_support={}
opentype_features={}

Binary file not shown.

View File

@@ -0,0 +1,36 @@
[remap]
importer="font_data_dynamic"
type="FontFile"
uid="uid://ddl46lhvx5li6"
path="res://.godot/imported/GoogleSansCode-ExtraBold.ttf-d7b627144676629e1d8a817f6702c4f1.fontdata"
[deps]
source_file="res://Fonts/static/GoogleSansCode-ExtraBold.ttf"
dest_files=["res://.godot/imported/GoogleSansCode-ExtraBold.ttf-d7b627144676629e1d8a817f6702c4f1.fontdata"]
[params]
Rendering=null
antialiasing=1
generate_mipmaps=false
disable_embedded_bitmaps=true
multichannel_signed_distance_field=false
msdf_pixel_range=8
msdf_size=48
allow_system_fallback=true
force_autohinter=false
modulate_color_glyphs=false
hinting=1
subpixel_positioning=4
keep_rounding_remainders=true
oversampling=0.0
Fallbacks=null
fallbacks=[]
Compress=null
compress=true
preload=[]
language_support={}
script_support={}
opentype_features={}

Binary file not shown.

View File

@@ -0,0 +1,36 @@
[remap]
importer="font_data_dynamic"
type="FontFile"
uid="uid://baodxrgytog5g"
path="res://.godot/imported/GoogleSansCode-ExtraBoldItalic.ttf-fa1cb0fdc476bded05d63e3451bbff03.fontdata"
[deps]
source_file="res://Fonts/static/GoogleSansCode-ExtraBoldItalic.ttf"
dest_files=["res://.godot/imported/GoogleSansCode-ExtraBoldItalic.ttf-fa1cb0fdc476bded05d63e3451bbff03.fontdata"]
[params]
Rendering=null
antialiasing=1
generate_mipmaps=false
disable_embedded_bitmaps=true
multichannel_signed_distance_field=false
msdf_pixel_range=8
msdf_size=48
allow_system_fallback=true
force_autohinter=false
modulate_color_glyphs=false
hinting=1
subpixel_positioning=4
keep_rounding_remainders=true
oversampling=0.0
Fallbacks=null
fallbacks=[]
Compress=null
compress=true
preload=[]
language_support={}
script_support={}
opentype_features={}

Binary file not shown.

View File

@@ -0,0 +1,36 @@
[remap]
importer="font_data_dynamic"
type="FontFile"
uid="uid://dt0b3rlq2avre"
path="res://.godot/imported/GoogleSansCode-Italic.ttf-ebbbb80532b390574369c22981d2b1d4.fontdata"
[deps]
source_file="res://Fonts/static/GoogleSansCode-Italic.ttf"
dest_files=["res://.godot/imported/GoogleSansCode-Italic.ttf-ebbbb80532b390574369c22981d2b1d4.fontdata"]
[params]
Rendering=null
antialiasing=1
generate_mipmaps=false
disable_embedded_bitmaps=true
multichannel_signed_distance_field=false
msdf_pixel_range=8
msdf_size=48
allow_system_fallback=true
force_autohinter=false
modulate_color_glyphs=false
hinting=1
subpixel_positioning=4
keep_rounding_remainders=true
oversampling=0.0
Fallbacks=null
fallbacks=[]
Compress=null
compress=true
preload=[]
language_support={}
script_support={}
opentype_features={}

Binary file not shown.

View File

@@ -0,0 +1,36 @@
[remap]
importer="font_data_dynamic"
type="FontFile"
uid="uid://djnfe42xypi0o"
path="res://.godot/imported/GoogleSansCode-Light.ttf-9e70c8066444469b76944579f1ca4567.fontdata"
[deps]
source_file="res://Fonts/static/GoogleSansCode-Light.ttf"
dest_files=["res://.godot/imported/GoogleSansCode-Light.ttf-9e70c8066444469b76944579f1ca4567.fontdata"]
[params]
Rendering=null
antialiasing=1
generate_mipmaps=false
disable_embedded_bitmaps=true
multichannel_signed_distance_field=false
msdf_pixel_range=8
msdf_size=48
allow_system_fallback=true
force_autohinter=false
modulate_color_glyphs=false
hinting=1
subpixel_positioning=4
keep_rounding_remainders=true
oversampling=0.0
Fallbacks=null
fallbacks=[]
Compress=null
compress=true
preload=[]
language_support={}
script_support={}
opentype_features={}

Binary file not shown.

View File

@@ -0,0 +1,36 @@
[remap]
importer="font_data_dynamic"
type="FontFile"
uid="uid://d2wbvhhpecbil"
path="res://.godot/imported/GoogleSansCode-LightItalic.ttf-421a0e540c04ba7ab2e15fb8ab389b45.fontdata"
[deps]
source_file="res://Fonts/static/GoogleSansCode-LightItalic.ttf"
dest_files=["res://.godot/imported/GoogleSansCode-LightItalic.ttf-421a0e540c04ba7ab2e15fb8ab389b45.fontdata"]
[params]
Rendering=null
antialiasing=1
generate_mipmaps=false
disable_embedded_bitmaps=true
multichannel_signed_distance_field=false
msdf_pixel_range=8
msdf_size=48
allow_system_fallback=true
force_autohinter=false
modulate_color_glyphs=false
hinting=1
subpixel_positioning=4
keep_rounding_remainders=true
oversampling=0.0
Fallbacks=null
fallbacks=[]
Compress=null
compress=true
preload=[]
language_support={}
script_support={}
opentype_features={}

Binary file not shown.

View File

@@ -0,0 +1,36 @@
[remap]
importer="font_data_dynamic"
type="FontFile"
uid="uid://c4fxnt0ftgl20"
path="res://.godot/imported/GoogleSansCode-Medium.ttf-fb7dbb128091636ca0839a01855be337.fontdata"
[deps]
source_file="res://Fonts/static/GoogleSansCode-Medium.ttf"
dest_files=["res://.godot/imported/GoogleSansCode-Medium.ttf-fb7dbb128091636ca0839a01855be337.fontdata"]
[params]
Rendering=null
antialiasing=1
generate_mipmaps=false
disable_embedded_bitmaps=true
multichannel_signed_distance_field=false
msdf_pixel_range=8
msdf_size=48
allow_system_fallback=true
force_autohinter=false
modulate_color_glyphs=false
hinting=1
subpixel_positioning=4
keep_rounding_remainders=true
oversampling=0.0
Fallbacks=null
fallbacks=[]
Compress=null
compress=true
preload=[]
language_support={}
script_support={}
opentype_features={}

Binary file not shown.

View File

@@ -0,0 +1,36 @@
[remap]
importer="font_data_dynamic"
type="FontFile"
uid="uid://dkc6gejp0qd4g"
path="res://.godot/imported/GoogleSansCode-MediumItalic.ttf-6b93a0e1a199c92b5bf0904fdeb47555.fontdata"
[deps]
source_file="res://Fonts/static/GoogleSansCode-MediumItalic.ttf"
dest_files=["res://.godot/imported/GoogleSansCode-MediumItalic.ttf-6b93a0e1a199c92b5bf0904fdeb47555.fontdata"]
[params]
Rendering=null
antialiasing=1
generate_mipmaps=false
disable_embedded_bitmaps=true
multichannel_signed_distance_field=false
msdf_pixel_range=8
msdf_size=48
allow_system_fallback=true
force_autohinter=false
modulate_color_glyphs=false
hinting=1
subpixel_positioning=4
keep_rounding_remainders=true
oversampling=0.0
Fallbacks=null
fallbacks=[]
Compress=null
compress=true
preload=[]
language_support={}
script_support={}
opentype_features={}

Binary file not shown.

View File

@@ -0,0 +1,36 @@
[remap]
importer="font_data_dynamic"
type="FontFile"
uid="uid://3l4achvmar4l"
path="res://.godot/imported/GoogleSansCode-Regular.ttf-b2396c043c66363815feed5c05f871b7.fontdata"
[deps]
source_file="res://Fonts/static/GoogleSansCode-Regular.ttf"
dest_files=["res://.godot/imported/GoogleSansCode-Regular.ttf-b2396c043c66363815feed5c05f871b7.fontdata"]
[params]
Rendering=null
antialiasing=1
generate_mipmaps=false
disable_embedded_bitmaps=true
multichannel_signed_distance_field=false
msdf_pixel_range=8
msdf_size=48
allow_system_fallback=true
force_autohinter=false
modulate_color_glyphs=false
hinting=1
subpixel_positioning=4
keep_rounding_remainders=true
oversampling=0.0
Fallbacks=null
fallbacks=[]
Compress=null
compress=true
preload=[]
language_support={}
script_support={}
opentype_features={}

Binary file not shown.

View File

@@ -0,0 +1,36 @@
[remap]
importer="font_data_dynamic"
type="FontFile"
uid="uid://c4lwexp4kg01c"
path="res://.godot/imported/GoogleSansCode-SemiBold.ttf-a602604e7ee8d31a56319f6802b6274f.fontdata"
[deps]
source_file="res://Fonts/static/GoogleSansCode-SemiBold.ttf"
dest_files=["res://.godot/imported/GoogleSansCode-SemiBold.ttf-a602604e7ee8d31a56319f6802b6274f.fontdata"]
[params]
Rendering=null
antialiasing=1
generate_mipmaps=false
disable_embedded_bitmaps=true
multichannel_signed_distance_field=false
msdf_pixel_range=8
msdf_size=48
allow_system_fallback=true
force_autohinter=false
modulate_color_glyphs=false
hinting=1
subpixel_positioning=4
keep_rounding_remainders=true
oversampling=0.0
Fallbacks=null
fallbacks=[]
Compress=null
compress=true
preload=[]
language_support={}
script_support={}
opentype_features={}

Binary file not shown.

View File

@@ -0,0 +1,36 @@
[remap]
importer="font_data_dynamic"
type="FontFile"
uid="uid://bmb10p0lpwre3"
path="res://.godot/imported/GoogleSansCode-SemiBoldItalic.ttf-0c58788c23f2dd9a50690d62c2fa586a.fontdata"
[deps]
source_file="res://Fonts/static/GoogleSansCode-SemiBoldItalic.ttf"
dest_files=["res://.godot/imported/GoogleSansCode-SemiBoldItalic.ttf-0c58788c23f2dd9a50690d62c2fa586a.fontdata"]
[params]
Rendering=null
antialiasing=1
generate_mipmaps=false
disable_embedded_bitmaps=true
multichannel_signed_distance_field=false
msdf_pixel_range=8
msdf_size=48
allow_system_fallback=true
force_autohinter=false
modulate_color_glyphs=false
hinting=1
subpixel_positioning=4
keep_rounding_remainders=true
oversampling=0.0
Fallbacks=null
fallbacks=[]
Compress=null
compress=true
preload=[]
language_support={}
script_support={}
opentype_features={}

View File

@@ -0,0 +1,516 @@
[gd_scene load_steps=41 format=3 uid="uid://cfko0vrf1dfod"]
[ext_resource type="Script" uid="uid://ttgieweerpay" path="res://Scripts/Logic/cNight.gd" id="1_3fysp"]
[ext_resource type="Script" uid="uid://vunrx4ig88oq" path="res://Scripts/Levels/lsOffice.gd" id="1_rljuy"]
[ext_resource type="Script" uid="uid://qp1x4i2r65hr" path="res://Scripts/Characters/cConstruct.gd" id="2_6edvq"]
[ext_resource type="Script" uid="uid://cntxldpts5png" path="res://Scripts/Characters/cCharacter_Debug.gd" id="3_uyeer"]
[ext_resource type="Script" uid="uid://d1k3x55514fyq" path="res://Scripts/Levels/Rooms/crPowerRoom.gd" id="4_ka2vk"]
[ext_resource type="Texture2D" uid="uid://b0iv7oawsp72q" path="res://Renders/Office/Office Inside/office.png" id="5_orox1"]
[ext_resource type="Shader" uid="uid://sxb00aj6wt0h" path="res://Shaders/perspective.gdshader" id="7_k0myi"]
[ext_resource type="Script" uid="uid://cfn4cgsc5amet" path="res://Scripts/Levels/Rooms/crHallwayL.gd" id="7_mm4xn"]
[ext_resource type="Texture2D" uid="uid://08sb14xwnkn5" path="res://Renders/Office/Monitor/46.png" id="7_r7ejh"]
[ext_resource type="Texture2D" uid="uid://bweysv245y8k5" path="res://Renders/Office/Monitor/132.png" id="8_md3e2"]
[ext_resource type="Texture2D" uid="uid://duqoximcr7mn4" path="res://Renders/Office/Monitor/133.png" id="9_rljuy"]
[ext_resource type="Shader" uid="uid://dy4tffth3v12b" path="res://Scripts/Logic/video_distortion.gdshader" id="10_jt74f"]
[ext_resource type="Texture2D" uid="uid://dddgpqeg6vwch" path="res://Renders/Office/Monitor/136.png" id="10_qvm5e"]
[ext_resource type="Texture2D" uid="uid://dhcayopmw04og" path="res://Renders/Office/Monitor/137.png" id="11_di7y1"]
[ext_resource type="Script" uid="uid://dauob2yqkuh6m" path="res://Scripts/Effects/efVideoDistortion.gd" id="11_f84q5"]
[ext_resource type="Texture2D" uid="uid://cybdrp5y0gut7" path="res://Renders/Office/Monitor/138.png" id="12_3kdu4"]
[ext_resource type="Texture2D" uid="uid://dbqdormcb15b" path="res://Renders/Office/Monitor/139.png" id="13_qw55p"]
[ext_resource type="Texture2D" uid="uid://de3o1l20w1fv0" path="res://Renders/Office/Monitor/140.png" id="14_gk2h7"]
[ext_resource type="Texture2D" uid="uid://dvrotl2psyj43" path="res://Renders/Office/Monitor/141.png" id="15_frhvm"]
[ext_resource type="Texture2D" uid="uid://b0t51te81bn1f" path="res://Renders/Office/Monitor/142.png" id="16_are38"]
[ext_resource type="Texture2D" uid="uid://c3cyyimucnkup" path="res://Renders/Office/Monitor/144.png" id="17_y8r8c"]
[ext_resource type="Texture2D" uid="uid://cflkeyri73l23" path="res://Renders/Camera/PowerStation/powerstation_wide_1.png" id="18_md3e2"]
[ext_resource type="Shader" uid="uid://cb1jf4frbw7jo" path="res://Shaders/static_blocky.gdshader" id="20_215pv"]
[ext_resource type="Texture2D" uid="uid://frw0kmb23qcv" path="res://Renders/Locations/Names/71.png" id="20_md3e2"]
[ext_resource type="Texture2D" uid="uid://demhjv3dvqv7j" path="res://Renders/Static & Menu/Full Static/12.png" id="21_jriy1"]
[ext_resource type="Texture2D" uid="uid://dpu5xkpl55gf1" path="res://Renders/Static & Menu/Full Static/13.png" id="22_jt74f"]
[ext_resource type="Texture2D" uid="uid://xogv0gtd81oa" path="res://Renders/Static & Menu/Full Static/14.png" id="23_f84q5"]
[ext_resource type="Texture2D" uid="uid://cx4kees6td1yl" path="res://Renders/Static & Menu/Full Static/15.png" id="24_mm4xn"]
[ext_resource type="Texture2D" uid="uid://cbm30gs7fsjyg" path="res://Renders/Static & Menu/Full Static/16.png" id="25_fweg3"]
[ext_resource type="Texture2D" uid="uid://da45s38mhie03" path="res://Renders/Static & Menu/Full Static/17.png" id="26_arhhw"]
[ext_resource type="Texture2D" uid="uid://bhyc5ojiegof5" path="res://Renders/Static & Menu/Full Static/18.png" id="27_hhn4j"]
[ext_resource type="Texture2D" uid="uid://c47r1lgi7hn8l" path="res://Renders/Static & Menu/Full Static/20.png" id="28_nm5vp"]
[ext_resource type="Script" uid="uid://cw6yeu0c7lgr2" path="res://Scripts/Effects/efStatic.gd" id="29_wj2rx"]
[ext_resource type="Script" uid="uid://c14ey58hfx7i8" path="res://Scripts/Logic/cPlayerCamera.gd" id="32_jriy1"]
[sub_resource type="GDScript" id="GDScript_f84q5"]
script/source = "# CameraSystem.gd
extends Node
class_name CameraManager
@export var display: TextureRect
var current_room: cRoom
@export var rooms: Array[Room] = []
func select_room(room_id: Global):
for room in rooms:
print(room, room.room_id)
print(\"Comparing room id: \", room.room_id, \" With: \", room_id)
if room.room_id == room_id:
current_room = room
break
func force_room(index: int):
if index >= 0 and index < rooms.size():
current_room = rooms[index]
else:
print(\"force_room: invalid index \", index)
func _process(_delta):
if current_room == null:
current_room = rooms[0]
if current_room:
current_room._process(_delta)
display.texture = current_room.getTexture()
func _on_cam_pressed(id:int) -> void:
print(\"Camera Change with: \", id)
force_room(id)
return
var eRoom: Global.LocationID
match id:
0: eRoom = Global.LocationID.POWER_STATION
1: eRoom = Global.LocationID.DINING_AREA
2: eRoom = Global.LocationID.WEST_HALL
3: eRoom = Global.LocationID.EAST_HALL
4: eRoom = Global.LocationID.SUPPLY_CLOSET
5: eRoom = Global.LocationID.BACKSTAGE
6: eRoom = Global.LocationID.LIVING_AREA
7: eRoom = Global.LocationID.OFFICE_LEFT_DOOR
8: eRoom = Global.LocationID.OFFICE_RIGHT_DOOR
9: eRoom = Global.LocationID.OFFICE
select_room(eRoom)
"
[sub_resource type="ShaderMaterial" id="ShaderMaterial_orox1"]
shader = ExtResource("7_k0myi")
shader_parameter/zoom = 0.54
shader_parameter/sharpness = 2.0
shader_parameter/direction = Vector2(0, 1)
shader_parameter/wrapping_mode = 0
[sub_resource type="ShaderMaterial" id="ShaderMaterial_f84q5"]
shader = ExtResource("10_jt74f")
shader_parameter/amount = 0.5270000250325
shader_parameter/seed = 0.465
shader_parameter/line_density = 0.858000040755
shader_parameter/offset_mul = 1.0
shader_parameter/screen_offset = Vector2(0, 0)
shader_parameter/screen_bend_amount = Vector2(0.02, 0.02)
[sub_resource type="ShaderMaterial" id="ShaderMaterial_kh8bn"]
shader = ExtResource("20_215pv")
shader_parameter/alpha_threshold = 0.022000001045
shader_parameter/alpha_modifier = 0.400000019
[sub_resource type="SpriteFrames" id="SpriteFrames_8uri8"]
animations = [{
"frames": [{
"duration": 1.0,
"texture": ExtResource("21_jriy1")
}, {
"duration": 1.0,
"texture": ExtResource("22_jt74f")
}, {
"duration": 1.0,
"texture": ExtResource("23_f84q5")
}, {
"duration": 1.0,
"texture": ExtResource("24_mm4xn")
}, {
"duration": 1.0,
"texture": ExtResource("25_fweg3")
}, {
"duration": 1.0,
"texture": ExtResource("26_arhhw")
}, {
"duration": 1.0,
"texture": ExtResource("27_hhn4j")
}, {
"duration": 1.0,
"texture": ExtResource("28_nm5vp")
}],
"loop": true,
"name": &"default",
"speed": 10.0
}]
[sub_resource type="SpriteFrames" id="SpriteFrames_er86o"]
animations = [{
"frames": [{
"duration": 1.0,
"texture": ExtResource("16_are38")
}, {
"duration": 1.0,
"texture": ExtResource("7_r7ejh")
}, {
"duration": 1.0,
"texture": ExtResource("17_y8r8c")
}, {
"duration": 1.0,
"texture": ExtResource("8_md3e2")
}, {
"duration": 1.0,
"texture": ExtResource("9_rljuy")
}, {
"duration": 1.0,
"texture": ExtResource("10_qvm5e")
}, {
"duration": 1.0,
"texture": ExtResource("11_di7y1")
}, {
"duration": 1.0,
"texture": ExtResource("12_3kdu4")
}, {
"duration": 1.0,
"texture": ExtResource("13_qw55p")
}, {
"duration": 1.0,
"texture": ExtResource("14_gk2h7")
}, {
"duration": 1.0,
"texture": ExtResource("15_frhvm")
}],
"loop": false,
"name": &"flipdown",
"speed": 30.0
}, {
"frames": [{
"duration": 1.0,
"texture": ExtResource("7_r7ejh")
}, {
"duration": 1.0,
"texture": ExtResource("8_md3e2")
}, {
"duration": 1.0,
"texture": ExtResource("9_rljuy")
}, {
"duration": 1.0,
"texture": ExtResource("10_qvm5e")
}, {
"duration": 1.0,
"texture": ExtResource("11_di7y1")
}, {
"duration": 1.0,
"texture": ExtResource("12_3kdu4")
}, {
"duration": 1.0,
"texture": ExtResource("13_qw55p")
}, {
"duration": 1.0,
"texture": ExtResource("14_gk2h7")
}, {
"duration": 1.0,
"texture": ExtResource("15_frhvm")
}, {
"duration": 1.0,
"texture": ExtResource("16_are38")
}, {
"duration": 1.0,
"texture": ExtResource("17_y8r8c")
}],
"loop": false,
"name": &"flipup",
"speed": 30.0
}, {
"frames": [{
"duration": 1.0,
"texture": ExtResource("7_r7ejh")
}],
"loop": false,
"name": &"idle",
"speed": 0.0
}]
[node name="Node2D" type="Node2D" node_paths=PackedStringArray("officeLayer", "cameraUnit", "cameraAnimation", "cameraLayer")]
script = ExtResource("1_rljuy")
officeLayer = NodePath("Office")
cameraUnit = NodePath("CameraUnit")
cameraAnimation = NodePath("CameraUnit/AnimatedSprite2D")
cameraLayer = NodePath("Camera")
metadata/_edit_horizontal_guides_ = [1136.0]
[node name="Camera2D" type="Camera2D" parent="." node_paths=PackedStringArray("officeSprite")]
position = Vector2(640, 368)
script = ExtResource("32_jriy1")
scrollArea = 800
scrollSpeed = 800.0
scrollDivisions = 2
officeSprite = NodePath("../Office/Office")
[node name="NightManager" type="Node" parent="."]
script = ExtResource("1_3fysp")
metadata/_custom_type_script = "uid://ttgieweerpay"
[node name="CameraManager" type="Node" parent="." node_paths=PackedStringArray("display")]
script = SubResource("GDScript_f84q5")
display = NodePath("../Camera/CameraFeed")
[node name="AI" type="Container" parent="."]
offset_left = -8.0
offset_right = 32.0
offset_bottom = 40.0
metadata/_edit_use_anchors_ = true
[node name="cConstructBrain" type="Node2D" parent="AI"]
position = Vector2(8, -64)
script = ExtResource("2_6edvq")
[node name="Rooms" type="Container" parent="."]
offset_right = 40.0
offset_bottom = 40.0
metadata/_edit_use_anchors_ = true
[node name="PowerRoom" type="Node" parent="Rooms"]
script = ExtResource("4_ka2vk")
metadata/_custom_type_script = "uid://d1k3x55514fyq"
[node name="HallWayL" type="Node" parent="Rooms"]
script = ExtResource("7_mm4xn")
metadata/_custom_type_script = "uid://cfn4cgsc5amet"
[node name="Office" type="CanvasLayer" parent="."]
[node name="Office" type="Sprite2D" parent="Office"]
position = Vector2(-264, -80)
scale = Vector2(0.3, 0.3)
texture = ExtResource("5_orox1")
centered = false
[node name="Shader_Perspective" type="ColorRect" parent="Office"]
material = SubResource("ShaderMaterial_orox1")
anchors_preset = 15
anchor_right = 1.0
anchor_bottom = 1.0
offset_left = -264.0
offset_top = -80.0
offset_right = 256.0
offset_bottom = 64.0
grow_horizontal = 2
grow_vertical = 2
[node name="Camera" type="CanvasLayer" parent="."]
[node name="CameraFeed" type="TextureRect" parent="Camera"]
offset_left = -248.0
offset_top = -72.0
offset_right = 7578.087
offset_bottom = 3684.5217
scale = Vector2(0.23, 0.23)
texture = ExtResource("18_md3e2")
expand_mode = 1
metadata/_edit_use_anchors_ = true
[node name="ColorRect" type="ColorRect" parent="Camera"]
material = SubResource("ShaderMaterial_orox1")
anchors_preset = 15
anchor_right = 1.0
anchor_bottom = 1.0
offset_left = -305.04
offset_top = -88.56
offset_right = 214.95996
offset_bottom = 55.440002
grow_horizontal = 2
grow_vertical = 2
metadata/_edit_use_anchors_ = true
[node name="Video_Distortion" type="ColorRect" parent="Camera"]
material = SubResource("ShaderMaterial_f84q5")
anchors_preset = 15
anchor_right = 1.0
anchor_bottom = 1.0
offset_left = -264.0
offset_top = -80.0
offset_right = 256.0
offset_bottom = 64.0
grow_horizontal = 2
grow_vertical = 2
script = ExtResource("11_f84q5")
amount_base = 0.43
amount_amp = 0.72
amount_speed = 1.455
metadata/_edit_use_anchors_ = true
[node name="Static" type="AnimatedSprite2D" parent="Camera"]
material = SubResource("ShaderMaterial_kh8bn")
sprite_frames = SubResource("SpriteFrames_8uri8")
centered = false
script = ExtResource("29_wj2rx")
[node name="cConstructDebugger" type="Node2D" parent="Camera" node_paths=PackedStringArray("target")]
position = Vector2(128, 128)
script = ExtResource("3_uyeer")
target = NodePath("../../AI/cConstructBrain")
[node name="Control" type="Control" parent="Camera"]
layout_mode = 3
anchors_preset = 0
offset_left = 1032.0
offset_top = 392.0
offset_right = 1256.0
offset_bottom = 616.0
metadata/_edit_use_anchors_ = true
[node name="71" type="Sprite2D" parent="Camera/Control"]
position = Vector2(112, -24)
texture = ExtResource("20_md3e2")
[node name="Cam0" type="Button" parent="Camera/Control"]
layout_mode = 1
offset_right = 82.0
offset_bottom = 31.0
text = "Camera 0
"
metadata/_edit_use_anchors_ = true
[node name="Cam1" type="Button" parent="Camera/Control"]
layout_mode = 1
anchors_preset = 1
anchor_left = 1.0
anchor_right = 1.0
offset_left = -82.0
offset_bottom = 31.0
grow_horizontal = 0
text = "Camera 1
"
metadata/_edit_use_anchors_ = true
[node name="Cam2" type="Button" parent="Camera/Control"]
layout_mode = 1
offset_top = 48.0
offset_right = 82.0
offset_bottom = 79.0
text = "Camera 2
"
metadata/_edit_use_anchors_ = true
[node name="Cam3" type="Button" parent="Camera/Control"]
layout_mode = 1
anchors_preset = 1
anchor_left = 1.0
anchor_right = 1.0
offset_left = -80.0
offset_top = 48.0
offset_right = 2.0
offset_bottom = 79.0
grow_horizontal = 0
text = "Camera 3"
metadata/_edit_use_anchors_ = true
[node name="Cam4" type="Button" parent="Camera/Control"]
layout_mode = 1
anchors_preset = 4
anchor_top = 0.5
anchor_bottom = 0.5
offset_top = -15.5
offset_right = 82.0
offset_bottom = 15.5
grow_vertical = 2
text = "Camera 4
"
metadata/_edit_use_anchors_ = true
[node name="Cam5" type="Button" parent="Camera/Control"]
layout_mode = 1
anchors_preset = 6
anchor_left = 1.0
anchor_top = 0.5
anchor_right = 1.0
anchor_bottom = 0.5
offset_left = -82.0
offset_top = -15.5
offset_bottom = 15.5
grow_horizontal = 0
grow_vertical = 2
text = "Camera 5
"
metadata/_edit_use_anchors_ = true
[node name="Cam6" type="Button" parent="Camera/Control"]
layout_mode = 1
anchors_preset = 2
anchor_top = 1.0
anchor_bottom = 1.0
offset_top = -74.0
offset_right = 82.0
offset_bottom = -43.0
grow_vertical = 0
text = "Camera 6
"
metadata/_edit_use_anchors_ = true
[node name="Cam7" type="Button" parent="Camera/Control"]
layout_mode = 1
anchors_preset = 3
anchor_left = 1.0
anchor_top = 1.0
anchor_right = 1.0
anchor_bottom = 1.0
offset_left = -80.0
offset_top = -74.0
offset_right = 2.0
offset_bottom = -43.0
grow_horizontal = 0
grow_vertical = 0
text = "Camera 7
"
metadata/_edit_use_anchors_ = true
[node name="Cam8" type="Button" parent="Camera/Control"]
layout_mode = 1
anchors_preset = 2
anchor_top = 1.0
anchor_bottom = 1.0
offset_top = -31.0
offset_right = 82.0
grow_vertical = 0
text = "Camera 8
"
metadata/_edit_use_anchors_ = true
[node name="Cam9" type="Button" parent="Camera/Control"]
layout_mode = 1
anchors_preset = 3
anchor_left = 1.0
anchor_top = 1.0
anchor_right = 1.0
anchor_bottom = 1.0
offset_left = -82.0
offset_top = -31.0
grow_horizontal = 0
grow_vertical = 0
text = "Camera 9
"
metadata/_edit_use_anchors_ = true
[node name="CameraUnit" type="CanvasLayer" parent="."]
visible = false
[node name="AnimatedSprite2D" type="AnimatedSprite2D" parent="CameraUnit"]
position = Vector2(640, 360)
sprite_frames = SubResource("SpriteFrames_er86o")
animation = &"flipdown"
[node name="GlobalUI" type="CanvasLayer" parent="."]
layer = 4
[node name="CameraButton" type="Button" parent="GlobalUI"]
anchors_preset = 7
anchor_left = 0.5
anchor_top = 1.0
anchor_right = 0.5
anchor_bottom = 1.0
offset_left = -264.0
offset_top = -72.0
offset_right = 264.0
grow_horizontal = 2
grow_vertical = 0
theme_override_font_sizes/font_size = 41
text = "CAMERA"
[connection signal="night_completed" from="NightManager" to="." method="_on_night_manager_night_completed"]
[connection signal="mouse_entered" from="GlobalUI/CameraButton" to="." method="_on_camerabutton_mouse_entered"]
[connection signal="mouse_exited" from="GlobalUI/CameraButton" to="." method="_on_camerabutton_mouse_exited"]

View File

@@ -1,11 +1,10 @@
[gd_scene load_steps=41 format=3 uid="uid://cfko0vrf1dfod"] [gd_scene load_steps=41 format=3 uid="uid://cfko0vrf1dfod"]
[ext_resource type="Script" uid="uid://ttgieweerpay" path="res://Scripts/Logic/NightManager.gd" id="1_3fysp"] [ext_resource type="Script" uid="uid://ttgieweerpay" path="res://Scripts/Logic/cNight.gd" id="1_3fysp"]
[ext_resource type="Script" uid="uid://vunrx4ig88oq" path="res://Scripts/Levels/lsOffice.gd" id="1_rljuy"] [ext_resource type="Script" uid="uid://vunrx4ig88oq" path="res://Scripts/Levels/lsOffice.gd" id="1_rljuy"]
[ext_resource type="Script" uid="uid://qp1x4i2r65hr" path="res://Scripts/Characters/cConstruct.gd" id="2_6edvq"] [ext_resource type="Script" uid="uid://qp1x4i2r65hr" path="res://Scripts/Characters/cConstruct.gd" id="2_6edvq"]
[ext_resource type="Script" uid="uid://cntxldpts5png" path="res://Scripts/Characters/cCharacter_Debug.gd" id="3_uyeer"] [ext_resource type="Script" uid="uid://cntxldpts5png" path="res://Scripts/Characters/cCharacter_Debug.gd" id="3_uyeer"]
[ext_resource type="Script" uid="uid://d1k3x55514fyq" path="res://Scripts/Levels/Rooms/crPowerRoom.gd" id="4_ka2vk"] [ext_resource type="Script" uid="uid://d1k3x55514fyq" path="res://Scripts/Levels/Rooms/crPowerRoom.gd" id="4_ka2vk"]
[ext_resource type="Script" uid="uid://cxj3fa512gs6r" path="res://Scripts/Logic/cCameraManager.gd" id="4_ufrlt"]
[ext_resource type="Texture2D" uid="uid://b0iv7oawsp72q" path="res://Renders/Office/Office Inside/office.png" id="5_orox1"] [ext_resource type="Texture2D" uid="uid://b0iv7oawsp72q" path="res://Renders/Office/Office Inside/office.png" id="5_orox1"]
[ext_resource type="Shader" uid="uid://sxb00aj6wt0h" path="res://Shaders/perspective.gdshader" id="7_k0myi"] [ext_resource type="Shader" uid="uid://sxb00aj6wt0h" path="res://Shaders/perspective.gdshader" id="7_k0myi"]
[ext_resource type="Script" uid="uid://cfn4cgsc5amet" path="res://Scripts/Levels/Rooms/crHallwayL.gd" id="7_mm4xn"] [ext_resource type="Script" uid="uid://cfn4cgsc5amet" path="res://Scripts/Levels/Rooms/crHallwayL.gd" id="7_mm4xn"]
@@ -36,6 +35,43 @@
[ext_resource type="Script" uid="uid://cw6yeu0c7lgr2" path="res://Scripts/Effects/efStatic.gd" id="29_wj2rx"] [ext_resource type="Script" uid="uid://cw6yeu0c7lgr2" path="res://Scripts/Effects/efStatic.gd" id="29_wj2rx"]
[ext_resource type="Script" uid="uid://c14ey58hfx7i8" path="res://Scripts/Logic/cPlayerCamera.gd" id="32_jriy1"] [ext_resource type="Script" uid="uid://c14ey58hfx7i8" path="res://Scripts/Logic/cPlayerCamera.gd" id="32_jriy1"]
[sub_resource type="GDScript" id="GDScript_f84q5"]
script/source = "# CameraSystem.gd
extends Node
class_name CameraManager
@export var display: TextureRect
var current_room: cRoom
@export var rooms: Array[cRoom] = []
func select_room(room_id: Global):
for room in rooms:
print(room, room.room_id)
print(\"Comparing room id: \", room.room_id, \" With: \", room_id)
if room.room_id == room_id:
current_room = room
break
func force_room(index: int):
if index >= 0 and index < rooms.size():
current_room = rooms[index]
else:
print(\"force_room: invalid index \", index)
func _process(_delta):
if current_room == null:
current_room = rooms[0]
if current_room:
current_room._process(_delta)
display.texture = current_room.getTexture()
func _on_cam_pressed(id:int) -> void:
print(\"Camera Change with: \", id)
force_room(id)
return
"
[sub_resource type="ShaderMaterial" id="ShaderMaterial_orox1"] [sub_resource type="ShaderMaterial" id="ShaderMaterial_orox1"]
shader = ExtResource("7_k0myi") shader = ExtResource("7_k0myi")
shader_parameter/zoom = 0.54 shader_parameter/zoom = 0.54
@@ -196,34 +232,31 @@ officeSprite = NodePath("../Office/Office")
script = ExtResource("1_3fysp") script = ExtResource("1_3fysp")
metadata/_custom_type_script = "uid://ttgieweerpay" metadata/_custom_type_script = "uid://ttgieweerpay"
[node name="CameraManager" type="Node" parent="." node_paths=PackedStringArray("display", "rooms")] [node name="CameraManager" type="Node" parent="." node_paths=PackedStringArray("display")]
script = ExtResource("4_ufrlt") script = SubResource("GDScript_f84q5")
display = NodePath("../Camera/CameraFeed") display = NodePath("../Camera/CameraFeed")
rooms = [NodePath("../Rooms/PowerRoom"), NodePath("../Rooms/HallWayL")]
metadata/_custom_type_script = "uid://cxj3fa512gs6r"
[node name="AI" type="Container" parent="."] [node name="AI" type="Container" parent="."]
offset_left = -8.0 offset_left = -8.0
offset_right = 32.0 offset_right = 32.0
offset_bottom = 40.0 offset_bottom = 40.0
metadata/_edit_use_anchors_ = true
[node name="cConstructBrain" type="Node2D" parent="AI" node_paths=PackedStringArray("night_manager")] [node name="cConstructBrain" type="Node2D" parent="AI"]
position = Vector2(8, -64) position = Vector2(8, -64)
script = ExtResource("2_6edvq") script = ExtResource("2_6edvq")
night_manager = NodePath("../../NightManager")
[node name="Rooms" type="Container" parent="."] [node name="Rooms" type="Container" parent="."]
offset_right = 40.0 offset_right = 40.0
offset_bottom = 40.0 offset_bottom = 40.0
metadata/_edit_use_anchors_ = true
[node name="PowerRoom" type="Node" parent="Rooms" node_paths=PackedStringArray("enemies")] [node name="PowerRoom" type="Node" parent="Rooms"]
script = ExtResource("4_ka2vk") script = ExtResource("4_ka2vk")
enemies = [NodePath("../../AI/cConstructBrain")]
metadata/_custom_type_script = "uid://d1k3x55514fyq" metadata/_custom_type_script = "uid://d1k3x55514fyq"
[node name="HallWayL" type="Node" parent="Rooms"] [node name="HallWayL" type="Node" parent="Rooms"]
script = ExtResource("7_mm4xn") script = ExtResource("7_mm4xn")
room_id = 7
metadata/_custom_type_script = "uid://cfn4cgsc5amet" metadata/_custom_type_script = "uid://cfn4cgsc5amet"
[node name="Office" type="CanvasLayer" parent="."] [node name="Office" type="CanvasLayer" parent="."]
@@ -256,6 +289,7 @@ offset_bottom = 3684.5217
scale = Vector2(0.23, 0.23) scale = Vector2(0.23, 0.23)
texture = ExtResource("18_md3e2") texture = ExtResource("18_md3e2")
expand_mode = 1 expand_mode = 1
metadata/_edit_use_anchors_ = true
[node name="ColorRect" type="ColorRect" parent="Camera"] [node name="ColorRect" type="ColorRect" parent="Camera"]
material = SubResource("ShaderMaterial_orox1") material = SubResource("ShaderMaterial_orox1")
@@ -268,6 +302,7 @@ offset_right = 214.95996
offset_bottom = 55.440002 offset_bottom = 55.440002
grow_horizontal = 2 grow_horizontal = 2
grow_vertical = 2 grow_vertical = 2
metadata/_edit_use_anchors_ = true
[node name="Video_Distortion" type="ColorRect" parent="Camera"] [node name="Video_Distortion" type="ColorRect" parent="Camera"]
material = SubResource("ShaderMaterial_f84q5") material = SubResource("ShaderMaterial_f84q5")
@@ -284,6 +319,7 @@ script = ExtResource("11_f84q5")
amount_base = 0.43 amount_base = 0.43
amount_amp = 0.72 amount_amp = 0.72
amount_speed = 1.455 amount_speed = 1.455
metadata/_edit_use_anchors_ = true
[node name="Static" type="AnimatedSprite2D" parent="Camera"] [node name="Static" type="AnimatedSprite2D" parent="Camera"]
material = SubResource("ShaderMaterial_kh8bn") material = SubResource("ShaderMaterial_kh8bn")
@@ -291,11 +327,10 @@ sprite_frames = SubResource("SpriteFrames_8uri8")
centered = false centered = false
script = ExtResource("29_wj2rx") script = ExtResource("29_wj2rx")
[node name="cConstructDebugger" type="Node2D" parent="Camera" node_paths=PackedStringArray("target", "night_manager")] [node name="cConstructDebugger" type="Node2D" parent="Camera" node_paths=PackedStringArray("target")]
position = Vector2(128, 128) position = Vector2(128, 128)
script = ExtResource("3_uyeer") script = ExtResource("3_uyeer")
target = NodePath("../../AI/cConstructBrain") target = NodePath("../../AI/cConstructBrain")
night_manager = NodePath("../../NightManager")
[node name="Control" type="Control" parent="Camera"] [node name="Control" type="Control" parent="Camera"]
layout_mode = 3 layout_mode = 3
@@ -304,6 +339,7 @@ offset_left = 1032.0
offset_top = 392.0 offset_top = 392.0
offset_right = 1256.0 offset_right = 1256.0
offset_bottom = 616.0 offset_bottom = 616.0
metadata/_edit_use_anchors_ = true
[node name="71" type="Sprite2D" parent="Camera/Control"] [node name="71" type="Sprite2D" parent="Camera/Control"]
position = Vector2(112, -24) position = Vector2(112, -24)
@@ -315,6 +351,7 @@ offset_right = 82.0
offset_bottom = 31.0 offset_bottom = 31.0
text = "Camera 0 text = "Camera 0
" "
metadata/_edit_use_anchors_ = true
[node name="Cam1" type="Button" parent="Camera/Control"] [node name="Cam1" type="Button" parent="Camera/Control"]
layout_mode = 1 layout_mode = 1
@@ -326,6 +363,7 @@ offset_bottom = 31.0
grow_horizontal = 0 grow_horizontal = 0
text = "Camera 1 text = "Camera 1
" "
metadata/_edit_use_anchors_ = true
[node name="Cam2" type="Button" parent="Camera/Control"] [node name="Cam2" type="Button" parent="Camera/Control"]
layout_mode = 1 layout_mode = 1
@@ -334,6 +372,7 @@ offset_right = 82.0
offset_bottom = 79.0 offset_bottom = 79.0
text = "Camera 2 text = "Camera 2
" "
metadata/_edit_use_anchors_ = true
[node name="Cam3" type="Button" parent="Camera/Control"] [node name="Cam3" type="Button" parent="Camera/Control"]
layout_mode = 1 layout_mode = 1
@@ -346,6 +385,7 @@ offset_right = 2.0
offset_bottom = 79.0 offset_bottom = 79.0
grow_horizontal = 0 grow_horizontal = 0
text = "Camera 3" text = "Camera 3"
metadata/_edit_use_anchors_ = true
[node name="Cam4" type="Button" parent="Camera/Control"] [node name="Cam4" type="Button" parent="Camera/Control"]
layout_mode = 1 layout_mode = 1
@@ -358,6 +398,7 @@ offset_bottom = 15.5
grow_vertical = 2 grow_vertical = 2
text = "Camera 4 text = "Camera 4
" "
metadata/_edit_use_anchors_ = true
[node name="Cam5" type="Button" parent="Camera/Control"] [node name="Cam5" type="Button" parent="Camera/Control"]
layout_mode = 1 layout_mode = 1
@@ -373,6 +414,7 @@ grow_horizontal = 0
grow_vertical = 2 grow_vertical = 2
text = "Camera 5 text = "Camera 5
" "
metadata/_edit_use_anchors_ = true
[node name="Cam6" type="Button" parent="Camera/Control"] [node name="Cam6" type="Button" parent="Camera/Control"]
layout_mode = 1 layout_mode = 1
@@ -385,6 +427,7 @@ offset_bottom = -43.0
grow_vertical = 0 grow_vertical = 0
text = "Camera 6 text = "Camera 6
" "
metadata/_edit_use_anchors_ = true
[node name="Cam7" type="Button" parent="Camera/Control"] [node name="Cam7" type="Button" parent="Camera/Control"]
layout_mode = 1 layout_mode = 1
@@ -401,6 +444,7 @@ grow_horizontal = 0
grow_vertical = 0 grow_vertical = 0
text = "Camera 7 text = "Camera 7
" "
metadata/_edit_use_anchors_ = true
[node name="Cam8" type="Button" parent="Camera/Control"] [node name="Cam8" type="Button" parent="Camera/Control"]
layout_mode = 1 layout_mode = 1
@@ -412,6 +456,7 @@ offset_right = 82.0
grow_vertical = 0 grow_vertical = 0
text = "Camera 8 text = "Camera 8
" "
metadata/_edit_use_anchors_ = true
[node name="Cam9" type="Button" parent="Camera/Control"] [node name="Cam9" type="Button" parent="Camera/Control"]
layout_mode = 1 layout_mode = 1
@@ -426,6 +471,7 @@ grow_horizontal = 0
grow_vertical = 0 grow_vertical = 0
text = "Camera 9 text = "Camera 9
" "
metadata/_edit_use_anchors_ = true
[node name="CameraUnit" type="CanvasLayer" parent="."] [node name="CameraUnit" type="CanvasLayer" parent="."]
visible = false visible = false
@@ -453,8 +499,5 @@ theme_override_font_sizes/font_size = 41
text = "CAMERA" text = "CAMERA"
[connection signal="night_completed" from="NightManager" to="." method="_on_night_manager_night_completed"] [connection signal="night_completed" from="NightManager" to="." method="_on_night_manager_night_completed"]
[connection signal="pressed" from="Camera/Control/Cam0" to="CameraManager" method="_on_cam_pressed" binds= [0]]
[connection signal="pressed" from="Camera/Control/Cam1" to="CameraManager" method="_on_cam_pressed" binds= [1]]
[connection signal="pressed" from="Camera/Control/Cam7" to="CameraManager" method="_on_cam_pressed" binds= [7]]
[connection signal="mouse_entered" from="GlobalUI/CameraButton" to="." method="_on_camerabutton_mouse_entered"] [connection signal="mouse_entered" from="GlobalUI/CameraButton" to="." method="_on_camerabutton_mouse_entered"]
[connection signal="mouse_exited" from="GlobalUI/CameraButton" to="." method="_on_camerabutton_mouse_exited"] [connection signal="mouse_exited" from="GlobalUI/CameraButton" to="." method="_on_camerabutton_mouse_exited"]

89
Levels/test.tscn Normal file
View File

@@ -0,0 +1,89 @@
[gd_scene load_steps=5 format=3 uid="uid://cqd214exw72db"]
[ext_resource type="Theme" uid="uid://bcxvg2kigp6u1" path="res://Themes/UI/Terminal/tTerminalPrompt.tres" id="2_afen0"]
[ext_resource type="Texture2D" uid="uid://c6m1tx7klorqr" path="res://Renders/Camera/PowerStation/powerstation_1.png" id="2_f87w0"]
[ext_resource type="Texture2D" uid="uid://cv2cadqcahubl" path="res://map.png" id="4_afen0"]
[ext_resource type="Script" uid="uid://dmp22gu6t0fw2" path="res://Scripts/Gameplay/CommandLine/cCommandLine.gd" id="13_tqcie"]
[node name="Node2D" type="Node2D"]
metadata/_edit_horizontal_guides_ = [1136.0]
[node name="Camera2D" type="Camera2D" parent="."]
position = Vector2(640, 368)
[node name="ColorRect" type="ColorRect" parent="."]
offset_right = 1280.0
offset_bottom = 728.0
color = Color(0, 0, 0, 1)
[node name="CommandPrompt" type="CanvasLayer" parent="." node_paths=PackedStringArray("output_text", "input_line")]
script = ExtResource("13_tqcie")
output_text = NodePath("CommandOutput")
input_line = NodePath("CommandInput")
[node name="CommandInput" type="LineEdit" parent="CommandPrompt"]
offset_left = 88.0
offset_top = 256.0
offset_right = 520.0
offset_bottom = 296.0
pivot_offset = Vector2(456, 272)
theme = ExtResource("2_afen0")
placeholder_text = "Enter Command . . ."
emoji_menu_enabled = false
caret_blink = true
[node name="CommandOutput" type="TextEdit" parent="CommandPrompt"]
offset_left = 88.0
offset_top = 24.0
offset_right = 520.0
offset_bottom = 256.0
theme = ExtResource("2_afen0")
editable = false
context_menu_enabled = false
emoji_menu_enabled = false
shortcut_keys_enabled = false
selecting_enabled = false
deselect_on_focus_loss_enabled = false
drag_and_drop_selection_enabled = false
virtual_keyboard_enabled = false
virtual_keyboard_show_on_focus = false
middle_mouse_paste_enabled = false
empty_selection_clipboard_enabled = false
wrap_mode = 1
[node name="Camera" type="CanvasLayer" parent="."]
[node name="Camera" type="TextureRect" parent="Camera"]
offset_left = 552.00006
offset_top = 24.0
offset_right = 4392.0
offset_bottom = 2904.0
scale = Vector2(0.185, 0.185)
texture = ExtResource("2_f87w0")
[node name="B_Shock" type="Button" parent="."]
offset_left = 16.0
offset_top = 24.0
offset_right = 80.0
offset_bottom = 88.0
theme = ExtResource("2_afen0")
text = "SHOCK"
[node name="B_Alarm" type="Button" parent="."]
offset_left = 16.0
offset_top = 96.0
offset_right = 80.0
offset_bottom = 160.0
theme = ExtResource("2_afen0")
text = "ALARM"
[node name="Map" type="CanvasLayer" parent="."]
[node name="Map" type="TextureRect" parent="Map"]
offset_left = 120.0
offset_top = 344.0
offset_right = 1609.6553
offset_bottom = 1542.0
scale = Vector2(0.29, 0.29)
pivot_offset = Vector2(-39.952454, -39.952393)
texture = ExtResource("4_afen0")

View File

@@ -0,0 +1,2 @@
class_name npcAkers
extends cCharacter

View File

@@ -0,0 +1 @@
uid://bfo4bx2r2j3cw

View File

@@ -0,0 +1,39 @@
class_name npcConstruct
extends cCharacter
signal location_changed(ai, old_location, new_location)
signal state_changed(ai, old_state, new_state)
var state: int = 0
func advance_state() -> void:
if state >= MAX_STATE:
if reset_after_climax:
state = 0
else:
state += 1
func _ready():
super._ready()
print("Construct Ready")
Global.game.night.hour_changed.connect(_on_hour_changed)
func _on_hour_changed(hour: int):
if hour == 1:
ai_level += 2
if hour == 3:
ai_level += 5
func _process(delta: float) -> void:
super._process(delta)
match state:
0: pass # dormant
1: pass
2: pass
3: pass
4: pass
5: pass
6: pass
advance_state()
if (randi_range(1, 20) > 10):
stunted = true

View File

@@ -0,0 +1,11 @@
class_name npcFlesher
extends cCharacter
signal location_changed(ai, old_location, new_location)
signal state_changed(ai, old_state, new_state)
enum state {
IDLE,
MOVE,
SEEN,
HIDDEN
}

View File

@@ -0,0 +1 @@
uid://d3y7qtu4ox1dv

View File

@@ -0,0 +1,2 @@
class_name npcYoshida
extends cCharacter

View File

@@ -0,0 +1 @@
uid://dguqfb6ddsehj

View File

@@ -1,30 +1,32 @@
class_name cCharacter class_name cCharacter
extends Node extends Node
const Map = preload("res://Scripts/Levels/lsOffice.gd")
# --- Parameters --- # --- Parameters ---
@export_range(0, 20) var ai_level := 10 @export_range(0, 20) var ai_level := 10
@export var min_interval := 8 @export var min_interval := 8
@export var max_interval := 12 @export var max_interval := 12
@export var reset_after_climax := true @export var reset_after_climax := true
@export var character_name := "template"
# --- Constants --- # --- Constants ---
const MAX_STATE := 6 const MAX_STATE := 6
const DEBUG := true const DEBUG := true
# --- Runtime --- # --- Runtime ---
var state: int = 0 var current_room: int = -1
var current_location: int = Global.LocationID.POWER_STATION
var move_timer := 0.0 var move_timer := 0.0
var stunted: bool = false var stunted: bool = false
func get_room_presence(room_id): func move_to(room_id: int):
if current_location != room_id: if current_room != -1:
return -1 Global.rooms[current_room].remove_enemy(self)
return state
current_room = room_id
Global.rooms[current_room].add_enemy(self)
func _init():
_ready()
func _ready() -> void: func _ready() -> void:
randomize() randomize()
@@ -47,31 +49,12 @@ func try_move(delta: float) -> bool:
var roll := randi_range(1, 20) var roll := randi_range(1, 20)
if DEBUG: if DEBUG:
print(name, " | AI:", ai_level, " | Roll:", roll) print(character_name, " | AI:", ai_level, " | Roll:", roll)
return roll <= ai_level return roll <= ai_level
func advance_state() -> void:
if state >= MAX_STATE:
if reset_after_climax:
state = 0
else:
state += 1
func _process(delta: float) -> void: func _process(delta: float) -> void:
if try_move(delta): if try_move(delta):
if(stunted): if(stunted):
stunted = false stunted = false
return return
advance_state()
if (randi_range(1, 20) > 10):
stunted = true
match state:
0: pass # dormant
1: pass
2: pass
3: pass
4: pass
5: pass
6: pass

View File

@@ -1,7 +1,8 @@
extends Node2D extends Node2D
@export var target: Node @export var target: Node
@export var night_manager: NightManager
var night_manager = Global.game.night
func _process(_delta: float) -> void: func _process(_delta: float) -> void:
queue_redraw() queue_redraw()

View File

@@ -1,15 +0,0 @@
class_name cConstruct extends cCharacter
signal location_changed(ai, old_location, new_location)
signal state_changed(ai, old_state, new_state)
@export var night_manager: NightManager
func _ready():
night_manager.hour_changed.connect(_on_hour_changed)
func _on_hour_changed(hour: int):
if hour == 1:
ai_level += 2
if hour == 3:
ai_level += 5

View File

@@ -0,0 +1,27 @@
extends Resource
var desc: String = "Switch to a camera"
var usage: String = "cam <id>"
func main(args: Array, context: Node) -> void:
if args.size() == 0:
context._print("Usage: cam <camera_id_or_name>")
return
var input_value = args[0]
var cam_id: int = -1
var int_value = int(input_value)
if str(int_value) == input_value:
cam_id = int_value
else:
cam_id = Global.cameraHelper.getID(input_value)
if cam_id == -1:
context._print("Invalid camera ID or name: %s" % input_value)
return
var cam_name = Global.cameraHelper.getName(cam_id)
context._print("Camera set to %s" % cam_name.capitalize())
print(Global.cameraHelper.id_to_name)
print(Global.cameraHelper.name_to_id)

View File

@@ -0,0 +1 @@
uid://ooovsrvdoq2a

View File

@@ -0,0 +1,18 @@
extends Resource
var desc: String = "Show commands"
var usage: String = "help"
func main(args: Array, context: cCommandLine) -> void:
if context.commands.size() == 0:
context._print("No commands available.")
return
context._print("Available Commands:")
for name in context.commands.keys():
var cmd_script = context.commands[name]
var cmd_instance = cmd_script.new()
var cmdDescription = cmd_instance.desc
var cmdUsage = "Usage: " + cmd_instance.usage
context._print("%s: %s\n%s" % [name, cmdDescription, cmdUsage])

View File

@@ -0,0 +1 @@
uid://mbcxt6233xib

View File

@@ -0,0 +1,6 @@
extends Resource
var desc: String = "Repeat your input"
var usage: String = "say <text>"
func main(args: Array, context: Node) -> void:
context._print(args)

View File

@@ -0,0 +1 @@
uid://dx43e03pno5sw

View File

@@ -0,0 +1,58 @@
class_name cCommandLine
extends CanvasLayer
var commands_directory = DirAccess.open("res://Scripts/Gameplay/CommandLine/Commands/")
@export var output_text: TextEdit
@export var input_line: LineEdit
var commands: Dictionary = {}
func _ready():
load_commands()
input_line.text_submitted.connect(self._on_command_entered)
# To make a new command, write it in ./Commands with a main() function for entry.
# This function will automatically find and register all command files
func load_commands():
if not commands_directory:
push_error("Failed to open commands folder!")
return
commands_directory.list_dir_begin()
var file_name = commands_directory.get_next()
while file_name != "":
if file_name.ends_with(".gd"):
var command_name = file_name.get_basename().to_lower()
var script = load("res://Scripts/Gameplay/CommandLine/Commands/" + file_name)
commands[command_name] = script
file_name = commands_directory.get_next()
commands_directory.list_dir_end()
func _print(text: String) -> void:
var line = output_text.get_line_count() - 1
output_text.insert_text(text + "\n", line, 0)
func _on_command_entered(new_text: String) -> void:
input_line.clear()
_print("> " + new_text)
# Store command and ensure its not empty
var parts = new_text.strip_edges().split(" ")
if parts.size() == 0:
return
# Parse command and arguments
var cmd = parts[0].to_lower()
var args = parts.slice(1, parts.size())
if commands.has(cmd):
var cmd_script = commands[cmd].new() # Instantiate the script
if cmd_script.has_method("main"):
# Run script
cmd_script.main(args, self)
else:
_print("DEV ERROR !\nCommand '%s' has no main() function!" % cmd)
else:
_print("Unknown command: %s" % cmd)
input_line.text = "" # Clear input

View File

@@ -0,0 +1 @@
uid://dmp22gu6t0fw2

21
Scripts/Helper/hCamera.gd Normal file
View File

@@ -0,0 +1,21 @@
class_name hCamera
var name_to_id: Dictionary = {}
var id_to_name: Dictionary = {}
# Explicit setup function
func setup(cameras_dict: Dictionary) -> void:
if cameras_dict == null:
push_error("Cameras dictionary is null!")
return
name_to_id = cameras_dict.duplicate()
id_to_name.clear()
for name in name_to_id.keys():
id_to_name[int(name_to_id[name])] = name # ensure keys are ints
func getID(cameraName: String) -> int:
return name_to_id.get(cameraName.to_upper(), -1)
func getName(cam_id: int) -> String:
return id_to_name.get(cam_id, "UNKNOWN")

View File

@@ -0,0 +1 @@
uid://boy5lbwt24ugk

View File

@@ -1,14 +1,8 @@
extends Room extends cRoom
class_name HallWayL class_name HallWayL
func _ready(): func _ready():
render_map = { pass
"": preload("res://Renders/Camera/HallWayL/HallwayL0001.png"),
"Yoshida:0": preload("res://Renders/Camera/HallWayL/HallwayL0001.png"),
"Yoshida:1": preload("res://Renders/Camera/HallWayL/HallwayL0002.png"),
"Yoshida:2": preload("res://Renders/Camera/HallWayL/HallwayL0003.png"),
}
room_id = Global.LocationID.POWER_STATION
func _process(_delta): func _process(_delta):
super._process(_delta) super._process(_delta)

View File

@@ -1,17 +1,8 @@
extends Room extends cRoom
class_name PowerRoom class_name PowerRoom
func _ready(): func _ready():
render_map = { pass
"default": preload("res://Renders/Camera/PowerStation/powerstation_1.png"),
"cConstructBrain:0": preload("res://Renders/Camera/PowerStation/powerstation_wide_1.png"),
"cConstructBrain:1": preload("res://Renders/Camera/PowerStation/powerstation_wide_2.png"),
"cConstructBrain:2": preload("res://Renders/Camera/PowerStation/powerstation_wide_3.png"),
"cConstructBrain:3": preload("res://Renders/Camera/PowerStation/powerstation_wide_4.png"),
"cConstructBrain:4": preload("res://Renders/Camera/PowerStation/powerstation_wide_5.png"),
"cConstructBrain:5": preload("res://Renders/Camera/PowerStation/powerstation_wide_6.png"),
}
room_id = Global.LocationID.POWER_STATION
func _process(_delta): func _process(_delta):
super._process(_delta) super._process(_delta)

View File

@@ -1,78 +0,0 @@
class_name lsOffice extends Node
# Discrete places a monster can exist
@export var officeLayer: CanvasLayer
@export var cameraUnit: CanvasLayer
@export var cameraAnimation: AnimatedSprite2D
@export var cameraLayer: CanvasLayer
var camAnimPlaying: bool = false
func _ready() -> void:
cameraLayer.hide()
officeLayer.show()
cameraUnit.hide()
Global.currentPlayerState = Global.playerState.eState_Office
func _on_camerabutton_mouse_entered() -> void:
if(camAnimPlaying): return
match Global.currentPlayerState:
Global.playerState.eState_Menu:
pass
Global.playerState.eState_Office:
Global.currentPlayerState = Global.playerState.eState_Camera
_bringCameraUp()
pass
Global.playerState.eState_Camera:
Global.currentPlayerState = Global.playerState.eState_Office
_bringCameraDown()
pass
Global.playerState.eState_Dead:
pass
pass # Replace with function body.
func _on_camerabutton_mouse_exited() -> void:
if(camAnimPlaying): return
match Global.currentPlayerState:
Global.playerState.eState_Menu:
pass
Global.playerState.eState_Office:
pass
Global.playerState.eState_Camera:
pass
Global.playerState.eState_Dead:
pass
pass # Replace with function body.
func _bringCameraUp() -> int:
cameraUnit.show()
cameraAnimation.play("flipup")
camAnimPlaying = true
await cameraAnimation.animation_finished
camAnimPlaying = false
officeLayer.hide()
cameraLayer.show()
cameraUnit.hide()
return 0
func _bringCameraDown() -> int:
officeLayer.show()
cameraUnit.show()
cameraAnimation.play("flipup", -1)
cameraLayer.hide()
camAnimPlaying = true
await cameraAnimation.animation_finished
camAnimPlaying = false
cameraUnit.hide()
return 0
func _on_night_manager_night_completed() -> void:
pass # Replace with function body.

View File

@@ -1 +0,0 @@
uid://vunrx4ig88oq

View File

@@ -1,6 +1,6 @@
extends Node extends Node
var scene_office = "res://Levels/officeA.tscn" var scene_office = "res://Levels/test.tscn"
func _ready() -> void: func _ready() -> void:
pass pass

View File

@@ -1,47 +0,0 @@
# CameraSystem.gd
extends Node
class_name CameraManager
@export var display: TextureRect
var current_room: Room
@export var rooms: Array[Room] = []
func select_room(room_id: Global.LocationID):
for room in rooms:
print(room, room.room_id)
print("Comparing room id: ", room.room_id, " With: ", room_id)
if room.room_id == room_id:
current_room = room
break
func force_room(index: int):
if index >= 0 and index < rooms.size():
current_room = rooms[index]
else:
print("force_room: invalid index ", index)
func _process(_delta):
if current_room == null:
current_room = rooms[0]
if current_room:
current_room._process(_delta)
display.texture = current_room.getTexture()
func _on_cam_pressed(id:int) -> void:
print("Camera Change with: ", id)
force_room(id)
return
var eRoom: Global.LocationID
match id:
0: eRoom = Global.LocationID.POWER_STATION
1: eRoom = Global.LocationID.DINING_AREA
2: eRoom = Global.LocationID.WEST_HALL
3: eRoom = Global.LocationID.EAST_HALL
4: eRoom = Global.LocationID.SUPPLY_CLOSET
5: eRoom = Global.LocationID.BACKSTAGE
6: eRoom = Global.LocationID.LIVING_AREA
7: eRoom = Global.LocationID.OFFICE_LEFT_DOOR
8: eRoom = Global.LocationID.OFFICE_RIGHT_DOOR
9: eRoom = Global.LocationID.OFFICE
select_room(eRoom)

View File

@@ -1 +0,0 @@
uid://cxj3fa512gs6r

View File

@@ -1,10 +1,10 @@
class_name NightManager class_name cNight
extends Node extends Node
signal hour_changed(new_hour) signal hour_changed(new_hour)
signal night_completed signal night_completed
@export var seconds_per_hour := 10.0 # FNAF-ish @export var seconds_per_hour := 10.0
@export var start_hour := 12 @export var start_hour := 12
@export var end_hour := 6 @export var end_hour := 6

View File

@@ -1,55 +1,17 @@
extends Node class_name cRoom
class_name Room extends Resource
#@export var visual: TextureRect var id: int
var name: String
var connections: Array = []
var enemies: Array = []
# One entry per valid combination func add_enemy(enemy):
# Key = sorted list of enemy IDs + their pose index if enemy not in enemies:
#@export var render_map: Dictionary enemies.append(enemy)
@export var enemies: Array[cCharacter] # all AI that *could* appear here func remove_enemy(enemy):
@export var room_id: Global.LocationID enemies.erase(enemy)
var last_key := ""
var texture: Texture2D
var render_map: Dictionary
#func _process(_delta):
#var key := _build_render_key()
#if key == last_key:
#return
#
#last_key = key
#
#
#if render_map.has(key):
#visual.texture = render_map[key]
#else:
#visual.texture = null # or fallback
func _process(_delta): func _process(_delta):
var key := _build_render_key() pass
if key == null: texture = render_map[""]
if key == last_key:
return
#
last_key = key
#
if render_map.has(key):
texture = render_map[key]
else:
texture = render_map["default"]
func getTexture() -> Texture2D:
return texture
func _build_render_key() -> String:
var entries := []
for enemy in enemies:
var presence : int = enemy.get_room_presence(room_id)
if presence >= 0:
entries.append("%s:%d" % [enemy.name, presence])
entries.sort()
return "|".join(entries)

41
Scripts/cGame.gd Normal file
View File

@@ -0,0 +1,41 @@
class_name cGame
var night: cNight
var rooms: Dictionary = {}
var enemies: Dictionary = {}
var locations: Dictionary = {}
var nightStarted = false
var nightCompleted = false
func build_rooms():
for id_str in locations.keys():
var data = locations[id_str]
var room = cRoom.new()
room.id = int(id_str)
room.name = data.name
room.connections = data.connections
rooms[room.id] = room
func make_enemies():
var eConstruct = npcConstruct.new()
var eFlesher = npcFlesher.new()
var eAkers = npcAkers.new()
var eYoshida = npcYoshida.new()
enemies = {
"construct": eConstruct,
"flesher": eFlesher,
"akers": eAkers,
"yoshida": eYoshida
}
func _setup() -> Array:
print("Setting up Game")
night = cNight.new()
locations = Global.locations
build_rooms()
make_enemies()
print([rooms, enemies])
return [rooms, enemies]

1
Scripts/cGame.gd.uid Normal file
View File

@@ -0,0 +1 @@
uid://cs03e4evkbyy4

13
Scripts/cPlayer.gd Normal file
View File

@@ -0,0 +1,13 @@
class_name cPlayer
var state: playerState = playerState.eState_Menu
enum playerState {
eState_Menu,
eState_Office,
eState_Camera,
eState_Dead
}
func _ready():
pass

1
Scripts/cPlayer.gd.uid Normal file
View File

@@ -0,0 +1 @@
uid://cw6j5qyjwk6cq

View File

@@ -0,0 +1,4 @@
[gd_resource type="StyleBoxFlat" format=3 uid="uid://bp3uohqr42gok"]
[resource]
bg_color = Color(0.05490196, 0.05490196, 0.05490196, 1)

View File

@@ -0,0 +1,51 @@
[gd_resource type="Theme" load_steps=7 format=3 uid="uid://bcxvg2kigp6u1"]
[ext_resource type="FontFile" uid="uid://vfqxvpmfjob" path="res://Fonts/GoogleSansCode-VariableFont_wght.ttf" id="1_3pmii"]
[ext_resource type="StyleBox" uid="uid://bp3uohqr42gok" path="res://Themes/UI/Terminal/lineEdit.tres" id="2_dhgq1"]
[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_3pmii"]
bg_color = Color(0.17254902, 0.17254902, 0.17254902, 1)
corner_radius_top_left = 4
corner_radius_top_right = 4
corner_radius_bottom_right = 4
corner_radius_bottom_left = 4
[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_dhgq1"]
[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_pggp2"]
[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_5mnmm"]
bg_color = Color(0.1728327, 0.17283267, 0.17283267, 1)
border_width_left = 2
border_width_top = 2
border_width_right = 2
border_width_bottom = 2
border_color = Color(0.11858136, 0.11858142, 0.1185813, 1)
border_blend = true
corner_radius_top_left = 8
corner_radius_top_right = 8
corner_radius_bottom_right = 8
corner_radius_bottom_left = 8
[resource]
default_font = ExtResource("1_3pmii")
Button/colors/font_color = Color(0.43137255, 0.6862745, 0, 1)
Button/colors/font_disabled_color = Color(0.17278168, 0.292159, 0, 1)
Button/fonts/font = ExtResource("1_3pmii")
Button/styles/disabled = SubResource("StyleBoxFlat_3pmii")
Button/styles/focus = SubResource("StyleBoxFlat_dhgq1")
Button/styles/hover = SubResource("StyleBoxFlat_pggp2")
Button/styles/normal = SubResource("StyleBoxFlat_5mnmm")
LineEdit/colors/caret_color = Color(0.43253618, 0.6868463, 3.85046e-07, 1)
LineEdit/colors/font_color = Color(0.43137255, 0.6862745, 0, 1)
LineEdit/colors/font_placeholder_color = Color(0.43137255, 0.6862745, 0, 0.42352942)
LineEdit/colors/font_uneditable_color = Color(0.43137255, 0.6862745, 0, 1)
LineEdit/fonts/font = ExtResource("1_3pmii")
LineEdit/styles/focus = ExtResource("2_dhgq1")
LineEdit/styles/normal = ExtResource("2_dhgq1")
LineEdit/styles/read_only = ExtResource("2_dhgq1")
TextEdit/colors/background_color = Color(0.056291588, 0.056291603, 0.056291595, 1)
TextEdit/colors/caret_color = Color(0.16078432, 0.93333334, 0, 1)
TextEdit/colors/font_color = Color(0.43137255, 0.6862745, 0, 1)
TextEdit/colors/font_outline_color = Color(0, 0, 0, 0)
TextEdit/colors/font_readonly_color = Color(0.8745098, 0.8745098, 0.8745098, 0.77254903)

View File

@@ -1,42 +1,42 @@
extends Node 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 gameNight = 0
var stars = 0 var stars = 0
var nightStarted: bool = false
var nightCompleted: bool = false
var currentPlayerState: playerState = playerState.eState_Menu var cameras
var locations
var cameraHelper
var game
func _ready() -> void: func _ready() -> void:
nightStarted = true cameras = loadJSON("res://Data/cameras.json")
locations = loadJSON("res://Data/locations.json")
cameraHelper = hCamera.new()
cameraHelper.setup(cameras)
game = cGame.new()
begin_game()
func begin_game():
game._setup()
game.nightStarted = true
func loadJSON(path: String) -> Dictionary:
var file = FileAccess.open(path, FileAccess.READ)
if not file:
push_error("Failed to open JSON: %s" % path)
return {}
var text = file.get_as_text()
file.close()
var data = JSON.parse_string(text)
if typeof(data) != TYPE_DICTIONARY:
push_error("JSON did not return a dictionary: %s" % path)
return {}
return data
func _input(event: InputEvent) -> void: func _input(event: InputEvent) -> void:
if event is InputEventKey: if event is InputEventKey:

BIN
map.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 217 KiB

40
map.png.import Normal file
View File

@@ -0,0 +1,40 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://cv2cadqcahubl"
path="res://.godot/imported/map.png-9eea34967fae34f4388f4a32a16da936.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://map.png"
dest_files=["res://.godot/imported/map.png-9eea34967fae34f4388f4a32a16da936.ctex"]
[params]
compress/mode=0
compress/high_quality=false
compress/lossy_quality=0.7
compress/uastc_level=0
compress/rdo_quality_loss=0.0
compress/hdr_compression=1
compress/normal_map=0
compress/channel_pack=0
mipmaps/generate=false
mipmaps/limit=-1
roughness/mode=0
roughness/src_normal=""
process/channel_remap/red=0
process/channel_remap/green=1
process/channel_remap/blue=2
process/channel_remap/alpha=3
process/fix_alpha_border=true
process/premult_alpha=false
process/normal_map_invert_y=false
process/hdr_as_srgb=false
process/hdr_clamp_exposure=false
process/size_limit=0
detect_3d/compress_to=1