Initial Commit
This commit is contained in:
2
Scripts/Characters/NPC/npcAkers.gd
Normal file
2
Scripts/Characters/NPC/npcAkers.gd
Normal file
@@ -0,0 +1,2 @@
|
||||
class_name npcAkers
|
||||
extends cCharacter
|
||||
1
Scripts/Characters/NPC/npcAkers.gd.uid
Normal file
1
Scripts/Characters/NPC/npcAkers.gd.uid
Normal file
@@ -0,0 +1 @@
|
||||
uid://bfo4bx2r2j3cw
|
||||
39
Scripts/Characters/NPC/npcConstruct.gd
Normal file
39
Scripts/Characters/NPC/npcConstruct.gd
Normal 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
|
||||
11
Scripts/Characters/NPC/npcFlesher.gd
Normal file
11
Scripts/Characters/NPC/npcFlesher.gd
Normal 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
|
||||
}
|
||||
1
Scripts/Characters/NPC/npcFlesher.gd.uid
Normal file
1
Scripts/Characters/NPC/npcFlesher.gd.uid
Normal file
@@ -0,0 +1 @@
|
||||
uid://d3y7qtu4ox1dv
|
||||
2
Scripts/Characters/NPC/npcYoshida.gd
Normal file
2
Scripts/Characters/NPC/npcYoshida.gd
Normal file
@@ -0,0 +1,2 @@
|
||||
class_name npcYoshida
|
||||
extends cCharacter
|
||||
1
Scripts/Characters/NPC/npcYoshida.gd.uid
Normal file
1
Scripts/Characters/NPC/npcYoshida.gd.uid
Normal file
@@ -0,0 +1 @@
|
||||
uid://dguqfb6ddsehj
|
||||
@@ -1,30 +1,32 @@
|
||||
class_name cCharacter
|
||||
extends Node
|
||||
|
||||
const Map = preload("res://Scripts/Levels/lsOffice.gd")
|
||||
|
||||
# --- Parameters ---
|
||||
@export_range(0, 20) var ai_level := 10
|
||||
|
||||
@export var min_interval := 8
|
||||
@export var max_interval := 12
|
||||
|
||||
@export var reset_after_climax := true
|
||||
@export var character_name := "template"
|
||||
|
||||
# --- Constants ---
|
||||
const MAX_STATE := 6
|
||||
const DEBUG := true
|
||||
|
||||
# --- Runtime ---
|
||||
var state: int = 0
|
||||
var current_location: int = Global.LocationID.POWER_STATION
|
||||
var current_room: int = -1
|
||||
var move_timer := 0.0
|
||||
var stunted: bool = false
|
||||
|
||||
func get_room_presence(room_id):
|
||||
if current_location != room_id:
|
||||
return -1
|
||||
return state
|
||||
func move_to(room_id: int):
|
||||
if current_room != -1:
|
||||
Global.rooms[current_room].remove_enemy(self)
|
||||
|
||||
current_room = room_id
|
||||
Global.rooms[current_room].add_enemy(self)
|
||||
|
||||
func _init():
|
||||
_ready()
|
||||
|
||||
func _ready() -> void:
|
||||
randomize()
|
||||
@@ -47,31 +49,12 @@ func try_move(delta: float) -> bool:
|
||||
var roll := randi_range(1, 20)
|
||||
|
||||
if DEBUG:
|
||||
print(name, " | AI:", ai_level, " | Roll:", roll)
|
||||
print(character_name, " | AI:", ai_level, " | Roll:", roll)
|
||||
|
||||
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:
|
||||
if try_move(delta):
|
||||
if(stunted):
|
||||
stunted = false
|
||||
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
|
||||
|
||||
@@ -1,7 +1,8 @@
|
||||
extends Node2D
|
||||
|
||||
@export var target: Node
|
||||
@export var night_manager: NightManager
|
||||
|
||||
var night_manager = Global.game.night
|
||||
|
||||
func _process(_delta: float) -> void:
|
||||
queue_redraw()
|
||||
|
||||
@@ -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
|
||||
27
Scripts/Gameplay/CommandLine/Commands/cam.gd
Normal file
27
Scripts/Gameplay/CommandLine/Commands/cam.gd
Normal 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)
|
||||
1
Scripts/Gameplay/CommandLine/Commands/cam.gd.uid
Normal file
1
Scripts/Gameplay/CommandLine/Commands/cam.gd.uid
Normal file
@@ -0,0 +1 @@
|
||||
uid://ooovsrvdoq2a
|
||||
18
Scripts/Gameplay/CommandLine/Commands/help.gd
Normal file
18
Scripts/Gameplay/CommandLine/Commands/help.gd
Normal 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])
|
||||
1
Scripts/Gameplay/CommandLine/Commands/help.gd.uid
Normal file
1
Scripts/Gameplay/CommandLine/Commands/help.gd.uid
Normal file
@@ -0,0 +1 @@
|
||||
uid://mbcxt6233xib
|
||||
6
Scripts/Gameplay/CommandLine/Commands/say.gd
Normal file
6
Scripts/Gameplay/CommandLine/Commands/say.gd
Normal 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)
|
||||
1
Scripts/Gameplay/CommandLine/Commands/say.gd.uid
Normal file
1
Scripts/Gameplay/CommandLine/Commands/say.gd.uid
Normal file
@@ -0,0 +1 @@
|
||||
uid://dx43e03pno5sw
|
||||
58
Scripts/Gameplay/CommandLine/cCommandLine.gd
Normal file
58
Scripts/Gameplay/CommandLine/cCommandLine.gd
Normal 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
|
||||
1
Scripts/Gameplay/CommandLine/cCommandLine.gd.uid
Normal file
1
Scripts/Gameplay/CommandLine/cCommandLine.gd.uid
Normal file
@@ -0,0 +1 @@
|
||||
uid://dmp22gu6t0fw2
|
||||
21
Scripts/Helper/hCamera.gd
Normal file
21
Scripts/Helper/hCamera.gd
Normal 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")
|
||||
1
Scripts/Helper/hCamera.gd.uid
Normal file
1
Scripts/Helper/hCamera.gd.uid
Normal file
@@ -0,0 +1 @@
|
||||
uid://boy5lbwt24ugk
|
||||
@@ -1,14 +1,8 @@
|
||||
extends Room
|
||||
extends cRoom
|
||||
class_name HallWayL
|
||||
|
||||
func _ready():
|
||||
render_map = {
|
||||
"": 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
|
||||
pass
|
||||
|
||||
func _process(_delta):
|
||||
super._process(_delta)
|
||||
|
||||
@@ -1,17 +1,8 @@
|
||||
extends Room
|
||||
extends cRoom
|
||||
class_name PowerRoom
|
||||
|
||||
func _ready():
|
||||
render_map = {
|
||||
"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
|
||||
pass
|
||||
|
||||
func _process(_delta):
|
||||
super._process(_delta)
|
||||
|
||||
@@ -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.
|
||||
@@ -1 +0,0 @@
|
||||
uid://vunrx4ig88oq
|
||||
@@ -1,6 +1,6 @@
|
||||
extends Node
|
||||
|
||||
var scene_office = "res://Levels/officeA.tscn"
|
||||
var scene_office = "res://Levels/test.tscn"
|
||||
func _ready() -> void:
|
||||
pass
|
||||
|
||||
|
||||
@@ -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)
|
||||
@@ -1 +0,0 @@
|
||||
uid://cxj3fa512gs6r
|
||||
@@ -1,10 +1,10 @@
|
||||
class_name NightManager
|
||||
class_name cNight
|
||||
extends Node
|
||||
|
||||
signal hour_changed(new_hour)
|
||||
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 end_hour := 6
|
||||
|
||||
@@ -1,55 +1,17 @@
|
||||
extends Node
|
||||
class_name Room
|
||||
class_name cRoom
|
||||
extends Resource
|
||||
|
||||
#@export var visual: TextureRect
|
||||
var id: int
|
||||
var name: String
|
||||
var connections: Array = []
|
||||
var enemies: Array = []
|
||||
|
||||
# One entry per valid combination
|
||||
# Key = sorted list of enemy IDs + their pose index
|
||||
#@export var render_map: Dictionary
|
||||
func add_enemy(enemy):
|
||||
if enemy not in enemies:
|
||||
enemies.append(enemy)
|
||||
|
||||
@export var enemies: Array[cCharacter] # all AI that *could* appear here
|
||||
@export var room_id: Global.LocationID
|
||||
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):
|
||||
var key := _build_render_key()
|
||||
if key == null: texture = render_map[""]
|
||||
func remove_enemy(enemy):
|
||||
enemies.erase(enemy)
|
||||
|
||||
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)
|
||||
func _process(_delta):
|
||||
pass
|
||||
|
||||
41
Scripts/cGame.gd
Normal file
41
Scripts/cGame.gd
Normal 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
1
Scripts/cGame.gd.uid
Normal file
@@ -0,0 +1 @@
|
||||
uid://cs03e4evkbyy4
|
||||
13
Scripts/cPlayer.gd
Normal file
13
Scripts/cPlayer.gd
Normal 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
1
Scripts/cPlayer.gd.uid
Normal file
@@ -0,0 +1 @@
|
||||
uid://cw6j5qyjwk6cq
|
||||
Reference in New Issue
Block a user