Compare commits
2 Commits
881f610faa
...
main
| Author | SHA1 | Date | |
|---|---|---|---|
| 7cd34cb07e | |||
| 5fb4a96159 |
BIN
Assets/Aseprite Files/Game Icon.aseprite
Normal file
BIN
Assets/Aseprite Files/Game Icon.aseprite
Normal file
Binary file not shown.
BIN
Assets/Spritesheets/Icons/UI/64x64.png
Normal file
BIN
Assets/Spritesheets/Icons/UI/64x64.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 1.1 MiB |
40
Assets/Spritesheets/Icons/UI/64x64.png.import
Normal file
40
Assets/Spritesheets/Icons/UI/64x64.png.import
Normal file
@@ -0,0 +1,40 @@
|
|||||||
|
[remap]
|
||||||
|
|
||||||
|
importer="texture"
|
||||||
|
type="CompressedTexture2D"
|
||||||
|
uid="uid://bo1utikr0r2q1"
|
||||||
|
path="res://.godot/imported/64x64.png-129f36e07b18bd0408477af73ef87a83.ctex"
|
||||||
|
metadata={
|
||||||
|
"vram_texture": false
|
||||||
|
}
|
||||||
|
|
||||||
|
[deps]
|
||||||
|
|
||||||
|
source_file="res://Assets/Spritesheets/Icons/UI/64x64.png"
|
||||||
|
dest_files=["res://.godot/imported/64x64.png-129f36e07b18bd0408477af73ef87a83.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
|
||||||
28
Debug/Unit Testing/Scripts/base_test_runner.gd
Normal file
28
Debug/Unit Testing/Scripts/base_test_runner.gd
Normal file
@@ -0,0 +1,28 @@
|
|||||||
|
extends Node
|
||||||
|
class_name BaseTestRunner
|
||||||
|
|
||||||
|
|
||||||
|
func _ready() -> void:
|
||||||
|
var methods := self.get_method_list()
|
||||||
|
for method in methods:
|
||||||
|
var method_name: String = method["name"]
|
||||||
|
if method_name.left(5).to_lower() != "test_":
|
||||||
|
continue
|
||||||
|
|
||||||
|
var return_dict: Dictionary = method["return"]
|
||||||
|
var return_type: int = return_dict["type"]
|
||||||
|
|
||||||
|
if return_type != 1:
|
||||||
|
print_rich("[color=yellow]Skipping Unit Test Method '%s'. Reason: Return type is not bool[/color]" % method_name)
|
||||||
|
continue
|
||||||
|
|
||||||
|
var args: Array = method["args"]
|
||||||
|
if not args.is_empty():
|
||||||
|
print_rich("[color=yellow]Skipping Unit Test Method '%s', Reason: Method requires arguments.[/color]" % method_name)
|
||||||
|
continue
|
||||||
|
|
||||||
|
var result: bool = call(method_name)
|
||||||
|
if result:
|
||||||
|
print_rich("[color=green]%s: Success![/color]" % method_name)
|
||||||
|
else:
|
||||||
|
print_rich("[color=red]%s: Failure...[/color]" % method_name)
|
||||||
1
Debug/Unit Testing/Scripts/base_test_runner.gd.uid
Normal file
1
Debug/Unit Testing/Scripts/base_test_runner.gd.uid
Normal file
@@ -0,0 +1 @@
|
|||||||
|
uid://bsewsmjxlup47
|
||||||
3
Debug/Unit Testing/Scripts/base_test_runner.tscn
Normal file
3
Debug/Unit Testing/Scripts/base_test_runner.tscn
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
[gd_scene format=3 uid="uid://rl2o7alqg7w4"]
|
||||||
|
|
||||||
|
[node name="BaseTestRunner" type="Node" unique_id=1916529975]
|
||||||
14
Debug/Unit Testing/Scripts/json_parsing_tests.gd
Normal file
14
Debug/Unit Testing/Scripts/json_parsing_tests.gd
Normal file
@@ -0,0 +1,14 @@
|
|||||||
|
extends BaseTestRunner
|
||||||
|
|
||||||
|
|
||||||
|
func Test_1() -> bool:
|
||||||
|
var json_string = "{\"Key\": false}"
|
||||||
|
var json = JSON.new()
|
||||||
|
var parse_result := json.parse(json_string)
|
||||||
|
if parse_result != OK:
|
||||||
|
return false
|
||||||
|
return true
|
||||||
|
|
||||||
|
|
||||||
|
func Test_2() -> String:
|
||||||
|
return ''
|
||||||
1
Debug/Unit Testing/Scripts/json_parsing_tests.gd.uid
Normal file
1
Debug/Unit Testing/Scripts/json_parsing_tests.gd.uid
Normal file
@@ -0,0 +1 @@
|
|||||||
|
uid://xrexdmk7d1qx
|
||||||
6
Debug/Unit Testing/json_parsing_tests.tscn
Normal file
6
Debug/Unit Testing/json_parsing_tests.tscn
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
[gd_scene format=3 uid="uid://c23ct3b1nmih7"]
|
||||||
|
|
||||||
|
[ext_resource type="Script" uid="uid://xrexdmk7d1qx" path="res://Debug/Unit Testing/Scripts/json_parsing_tests.gd" id="1_beu12"]
|
||||||
|
|
||||||
|
[node name="JsonParsingTests" type="Node" unique_id=2014332517]
|
||||||
|
script = ExtResource("1_beu12")
|
||||||
@@ -5,6 +5,10 @@ enum States {
|
|||||||
PECKING
|
PECKING
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@export var minimum_pecking_schedule_gap := 8.0
|
||||||
|
@export var maximum_pecking_schedule_gap := 25.0
|
||||||
|
@export var should_log_pecking_schedule := false
|
||||||
|
|
||||||
@onready var animated_sprite_2d: AnimatedSprite2D = $AnimatedSprite2D
|
@onready var animated_sprite_2d: AnimatedSprite2D = $AnimatedSprite2D
|
||||||
|
|
||||||
var current_state := States.IDLE
|
var current_state := States.IDLE
|
||||||
@@ -23,11 +27,12 @@ func _process(delta: float) -> void:
|
|||||||
animated_sprite_2d.play("pecking")
|
animated_sprite_2d.play("pecking")
|
||||||
await animated_sprite_2d.animation_finished
|
await animated_sprite_2d.animation_finished
|
||||||
animated_sprite_2d.play("idle")
|
animated_sprite_2d.play("idle")
|
||||||
pecking_sched = randf_range(8.0, 25.0)
|
pecking_sched = randf_range(minimum_pecking_schedule_gap, maximum_pecking_schedule_gap)
|
||||||
pecking_timer = 0
|
pecking_timer = 0
|
||||||
current_state = States.IDLE
|
current_state = States.IDLE
|
||||||
_print_sched()
|
_print_sched()
|
||||||
|
|
||||||
|
|
||||||
func _print_sched() -> void:
|
func _print_sched() -> void:
|
||||||
print("%s Pecking Schedule: %f" % [name, pecking_sched])
|
if should_log_pecking_schedule:
|
||||||
|
print("%s Pecking Schedule: %f" % [name, pecking_sched])
|
||||||
|
|||||||
@@ -3,35 +3,36 @@ extends BaseState
|
|||||||
signal PlayerBeganDrawingBow
|
signal PlayerBeganDrawingBow
|
||||||
|
|
||||||
@export var strafing_speed := 35
|
@export var strafing_speed := 35
|
||||||
@export var movement_componenent: MovementComponent
|
|
||||||
@export var body: CharacterBody2D
|
@export var body: CharacterBody2D
|
||||||
|
|
||||||
var used_item_action: String
|
var _used_item_action: String
|
||||||
var animation_finished := false
|
var _animation_finished := false
|
||||||
|
var _movement_componenent: MovementComponent
|
||||||
|
|
||||||
func GetStateEnum() -> PlayerStateMachine.States:
|
func GetStateEnum() -> PlayerStateMachine.States:
|
||||||
return PlayerStateMachine.States.DRAWING_BOW
|
return PlayerStateMachine.States.DRAWING_BOW
|
||||||
|
|
||||||
|
|
||||||
func Enter(extra_parameters: Dictionary) -> void:
|
func Enter(extra_parameters: Dictionary) -> void:
|
||||||
animation_finished = false
|
_animation_finished = false
|
||||||
used_item_action = extra_parameters.action_name
|
_used_item_action = extra_parameters.action_name
|
||||||
|
_movement_componenent = ComponentUtils.GetMovementComponent(body)
|
||||||
PlayerBeganDrawingBow.emit()
|
PlayerBeganDrawingBow.emit()
|
||||||
|
|
||||||
|
|
||||||
func Update(_delta: float) -> void:
|
func Update(_delta: float) -> void:
|
||||||
if !animation_finished:
|
if !_animation_finished:
|
||||||
return
|
return
|
||||||
|
|
||||||
if !Input.is_action_pressed(used_item_action):
|
if !Input.is_action_pressed(_used_item_action):
|
||||||
state_machine.QueueStateChange(PlayerStateMachine.States.FIRING_ARROW)
|
state_machine.QueueStateChange(PlayerStateMachine.States.FIRING_ARROW)
|
||||||
return
|
return
|
||||||
|
|
||||||
var movement_vector := movement_componenent.movement_vector
|
var movement_vector := _movement_componenent.movement_vector
|
||||||
if movement_vector != Vector2.ZERO:
|
if movement_vector != Vector2.ZERO:
|
||||||
body.velocity = movement_vector * strafing_speed
|
body.velocity = movement_vector * strafing_speed
|
||||||
body.move_and_slide()
|
body.move_and_slide()
|
||||||
|
|
||||||
|
|
||||||
func OnDrawingBowAnimationFinished() -> void:
|
func OnDrawingBowAnimationFinished() -> void:
|
||||||
animation_finished = true
|
_animation_finished = true
|
||||||
|
|||||||
@@ -1,10 +1,11 @@
|
|||||||
extends BaseState
|
extends BaseState
|
||||||
class_name PlayerIdleState
|
class_name PlayerIdleState
|
||||||
|
|
||||||
@export var movement_component: MovementComponent
|
|
||||||
|
|
||||||
signal PlayerBecameIdle
|
signal PlayerBecameIdle
|
||||||
|
|
||||||
|
@export var player: PlayerCharacter
|
||||||
|
|
||||||
|
var _movement_component: MovementComponent
|
||||||
var _sit_queued := false
|
var _sit_queued := false
|
||||||
var _sit_queue_pos: Vector2
|
var _sit_queue_pos: Vector2
|
||||||
var _sit_queue_dir: Enums.Directions
|
var _sit_queue_dir: Enums.Directions
|
||||||
@@ -15,6 +16,10 @@ func GetStateEnum() -> PlayerStateMachine.States:
|
|||||||
|
|
||||||
|
|
||||||
func Enter(_extra_parameters: Dictionary) -> void:
|
func Enter(_extra_parameters: Dictionary) -> void:
|
||||||
|
_movement_component = ComponentUtils.GetMovementComponent(player)
|
||||||
|
if not _movement_component:
|
||||||
|
print_rich("[color=yellow]Warning: Player does not have a movement component...[/color]")
|
||||||
|
|
||||||
PlayerBecameIdle.emit()
|
PlayerBecameIdle.emit()
|
||||||
|
|
||||||
|
|
||||||
@@ -30,7 +35,7 @@ func Update(_delta: float) -> void:
|
|||||||
_sit_queued = false
|
_sit_queued = false
|
||||||
return
|
return
|
||||||
|
|
||||||
if movement_component.movement_vector != Vector2.ZERO:
|
if _movement_component and _movement_component.movement_vector != Vector2.ZERO:
|
||||||
state_machine.QueueStateChange(PlayerStateMachine.States.WALKING)
|
state_machine.QueueStateChange(PlayerStateMachine.States.WALKING)
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -3,24 +3,27 @@ extends BaseState
|
|||||||
signal StartedWalking
|
signal StartedWalking
|
||||||
|
|
||||||
@export var walking_speed := 100
|
@export var walking_speed := 100
|
||||||
@export var movement_component: MovementComponent
|
|
||||||
@export var direction_component: FacingDirectionComponent
|
@export var direction_component: FacingDirectionComponent
|
||||||
@export var body: CharacterBody2D
|
@export var body: CharacterBody2D
|
||||||
|
|
||||||
|
var _movement_component: MovementComponent
|
||||||
|
|
||||||
func GetStateEnum() -> PlayerStateMachine.States:
|
func GetStateEnum() -> PlayerStateMachine.States:
|
||||||
return PlayerStateMachine.States.WALKING
|
return PlayerStateMachine.States.WALKING
|
||||||
|
|
||||||
|
|
||||||
func Enter(_extra_parameters: Dictionary) -> void:
|
func Enter(_extra_parameters: Dictionary) -> void:
|
||||||
|
_movement_component = ComponentUtils.GetMovementComponent(body)
|
||||||
StartedWalking.emit()
|
StartedWalking.emit()
|
||||||
|
|
||||||
|
|
||||||
func Update(_delta: float) -> void:
|
func Update(_delta: float) -> void:
|
||||||
if movement_component.movement_vector == Vector2.ZERO:
|
var movement_vector := _movement_component.movement_vector
|
||||||
|
|
||||||
|
if movement_vector == Vector2.ZERO:
|
||||||
state_machine.QueueStateChange(PlayerStateMachine.States.IDLE)
|
state_machine.QueueStateChange(PlayerStateMachine.States.IDLE)
|
||||||
return
|
return
|
||||||
|
|
||||||
var movement_vector := movement_component.movement_vector
|
|
||||||
body.velocity = movement_vector * walking_speed
|
body.velocity = movement_vector * walking_speed
|
||||||
body.move_and_slide()
|
body.move_and_slide()
|
||||||
|
|
||||||
|
|||||||
@@ -3,9 +3,6 @@ class_name MovementComponent
|
|||||||
|
|
||||||
signal MovementInput(movement_vector: Vector2)
|
signal MovementInput(movement_vector: Vector2)
|
||||||
|
|
||||||
# Dynamic Exports
|
|
||||||
@export var body: CharacterBody2D
|
|
||||||
|
|
||||||
var movement_vector: Vector2
|
var movement_vector: Vector2
|
||||||
|
|
||||||
func _physics_process(_delta: float) -> void:
|
func _physics_process(_delta: float) -> void:
|
||||||
|
|||||||
@@ -4,7 +4,6 @@
|
|||||||
[ext_resource type="PackedScene" uid="uid://c2ydbmmvnfca6" path="res://Entities/Characters/Player/state_machine.tscn" id="1_lyjr2"]
|
[ext_resource type="PackedScene" uid="uid://c2ydbmmvnfca6" path="res://Entities/Characters/Player/state_machine.tscn" id="1_lyjr2"]
|
||||||
[ext_resource type="Script" uid="uid://dacvayqstkvws" path="res://Entities/Characters/Player/Scripts/player.gd" id="1_qqvsf"]
|
[ext_resource type="Script" uid="uid://dacvayqstkvws" path="res://Entities/Characters/Player/Scripts/player.gd" id="1_qqvsf"]
|
||||||
[ext_resource type="Script" uid="uid://b0l02v61if6k8" path="res://Scripts/Components/facing_direction_component.gd" id="1_siygm"]
|
[ext_resource type="Script" uid="uid://b0l02v61if6k8" path="res://Scripts/Components/facing_direction_component.gd" id="1_siygm"]
|
||||||
[ext_resource type="Script" uid="uid://dwclkwbig1uii" path="res://Entities/Characters/Player/Scripts/movement_component.gd" id="4_apx8m"]
|
|
||||||
[ext_resource type="Script" uid="uid://dkmc1t43gomdb" path="res://Entities/Characters/Player/Scripts/States/idle_state.gd" id="4_dxcao"]
|
[ext_resource type="Script" uid="uid://dkmc1t43gomdb" path="res://Entities/Characters/Player/Scripts/States/idle_state.gd" id="4_dxcao"]
|
||||||
[ext_resource type="Script" uid="uid://ckn7gmtc23b8l" path="res://Entities/Characters/Player/Scripts/States/using_item_a_state.gd" id="5_1mdwi"]
|
[ext_resource type="Script" uid="uid://ckn7gmtc23b8l" path="res://Entities/Characters/Player/Scripts/States/using_item_a_state.gd" id="5_1mdwi"]
|
||||||
[ext_resource type="Script" uid="uid://bwmmah30t3m0u" path="res://Entities/Characters/Player/Scripts/States/walking_state.gd" id="5_cscr0"]
|
[ext_resource type="Script" uid="uid://bwmmah30t3m0u" path="res://Entities/Characters/Player/Scripts/States/walking_state.gd" id="5_cscr0"]
|
||||||
@@ -40,24 +39,19 @@ shape = SubResource("RectangleShape2D_apx8m")
|
|||||||
[node name="FacingDirectionComponent" type="Node" parent="Components" unique_id=408127032]
|
[node name="FacingDirectionComponent" type="Node" parent="Components" unique_id=408127032]
|
||||||
script = ExtResource("1_siygm")
|
script = ExtResource("1_siygm")
|
||||||
|
|
||||||
[node name="MovementComponent" type="Node" parent="Components" unique_id=1773880772 node_paths=PackedStringArray("body")]
|
|
||||||
script = ExtResource("4_apx8m")
|
|
||||||
body = NodePath("../..")
|
|
||||||
|
|
||||||
[node name="State Machine" parent="." unique_id=732559774 node_paths=PackedStringArray("states_container", "current_state") instance=ExtResource("1_lyjr2")]
|
[node name="State Machine" parent="." unique_id=732559774 node_paths=PackedStringArray("states_container", "current_state") instance=ExtResource("1_lyjr2")]
|
||||||
states_container = NodePath("States")
|
states_container = NodePath("States")
|
||||||
current_state = NodePath("States/Idle State")
|
current_state = NodePath("States/Idle State")
|
||||||
|
|
||||||
[node name="States" type="Node" parent="State Machine" unique_id=1171587216]
|
[node name="States" type="Node" parent="State Machine" unique_id=1171587216]
|
||||||
|
|
||||||
[node name="Idle State" type="Node" parent="State Machine/States" unique_id=2017409248 node_paths=PackedStringArray("movement_component", "state_machine")]
|
[node name="Idle State" type="Node" parent="State Machine/States" unique_id=2017409248 node_paths=PackedStringArray("player", "state_machine")]
|
||||||
script = ExtResource("4_dxcao")
|
script = ExtResource("4_dxcao")
|
||||||
movement_component = NodePath("../../../Components/MovementComponent")
|
player = NodePath("../../..")
|
||||||
state_machine = NodePath("../..")
|
state_machine = NodePath("../..")
|
||||||
|
|
||||||
[node name="Walking State" type="Node" parent="State Machine/States" unique_id=1661048365 node_paths=PackedStringArray("movement_component", "direction_component", "body", "state_machine")]
|
[node name="Walking State" type="Node" parent="State Machine/States" unique_id=1661048365 node_paths=PackedStringArray("direction_component", "body", "state_machine")]
|
||||||
script = ExtResource("5_cscr0")
|
script = ExtResource("5_cscr0")
|
||||||
movement_component = NodePath("../../../Components/MovementComponent")
|
|
||||||
direction_component = NodePath("../../../Components/FacingDirectionComponent")
|
direction_component = NodePath("../../../Components/FacingDirectionComponent")
|
||||||
body = NodePath("../../..")
|
body = NodePath("../../..")
|
||||||
state_machine = NodePath("../..")
|
state_machine = NodePath("../..")
|
||||||
@@ -68,9 +62,8 @@ body = NodePath("../../..")
|
|||||||
direction_component = NodePath("../../../Components/FacingDirectionComponent")
|
direction_component = NodePath("../../../Components/FacingDirectionComponent")
|
||||||
state_machine = NodePath("../..")
|
state_machine = NodePath("../..")
|
||||||
|
|
||||||
[node name="Drawing Bow State" type="Node" parent="State Machine/States" unique_id=317681716 node_paths=PackedStringArray("movement_componenent", "body", "state_machine")]
|
[node name="Drawing Bow State" type="Node" parent="State Machine/States" unique_id=317681716 node_paths=PackedStringArray("body", "state_machine")]
|
||||||
script = ExtResource("7_cscr0")
|
script = ExtResource("7_cscr0")
|
||||||
movement_componenent = NodePath("../../../Components/MovementComponent")
|
|
||||||
body = NodePath("../../..")
|
body = NodePath("../../..")
|
||||||
state_machine = NodePath("../..")
|
state_machine = NodePath("../..")
|
||||||
|
|
||||||
|
|||||||
@@ -0,0 +1,6 @@
|
|||||||
|
[gd_scene format=3 uid="uid://nbkisxm2oekn"]
|
||||||
|
|
||||||
|
[ext_resource type="Script" uid="uid://dwclkwbig1uii" path="res://Entities/Characters/Player/Scripts/movement_component.gd" id="1_b2nib"]
|
||||||
|
|
||||||
|
[node name="Movement Component" type="Node" unique_id=737644583]
|
||||||
|
script = ExtResource("1_b2nib")
|
||||||
@@ -1,6 +1,7 @@
|
|||||||
extends StaticBody2D
|
extends StaticBody2D
|
||||||
class_name BaseChest
|
class_name BaseChest
|
||||||
|
|
||||||
|
signal ChestOpened
|
||||||
signal OpeningAnimationStarted
|
signal OpeningAnimationStarted
|
||||||
|
|
||||||
@export var is_open := false
|
@export var is_open := false
|
||||||
@@ -8,7 +9,12 @@ signal OpeningAnimationStarted
|
|||||||
# Public Methods
|
# Public Methods
|
||||||
func Open() -> void:
|
func Open() -> void:
|
||||||
is_open = true
|
is_open = true
|
||||||
|
ChestOpened.emit()
|
||||||
|
|
||||||
|
|
||||||
func OpenAlreadyOpened() -> void:
|
func OpenAlreadyOpened() -> void:
|
||||||
pass
|
pass
|
||||||
|
|
||||||
|
|
||||||
|
func SetOpenedFromLoad() -> void:
|
||||||
|
is_open = true
|
||||||
|
|||||||
@@ -27,6 +27,11 @@ func OpenAlreadyOpened() -> void:
|
|||||||
already_opened_message_dialogue_trigger.Trigger()
|
already_opened_message_dialogue_trigger.Trigger()
|
||||||
|
|
||||||
|
|
||||||
|
func SetOpenedFromLoad() -> void:
|
||||||
|
super.SetOpenedFromLoad()
|
||||||
|
chest_01_sprite.play("opened")
|
||||||
|
|
||||||
|
|
||||||
# Private Methods
|
# Private Methods
|
||||||
func _ready() -> void:
|
func _ready() -> void:
|
||||||
if is_open:
|
if is_open:
|
||||||
|
|||||||
@@ -1,5 +1,7 @@
|
|||||||
extends StaticBody2D
|
extends StaticBody2D
|
||||||
|
|
||||||
|
signal Opened
|
||||||
|
|
||||||
@onready var sprite: AnimatedSprite2D = $AnimatedSprite2D
|
@onready var sprite: AnimatedSprite2D = $AnimatedSprite2D
|
||||||
@onready var collision_shape_2d: CollisionShape2D = $CollisionShape2D
|
@onready var collision_shape_2d: CollisionShape2D = $CollisionShape2D
|
||||||
|
|
||||||
@@ -15,3 +17,5 @@ func OpenGate() -> void:
|
|||||||
|
|
||||||
collision_shape_2d.set_deferred("disabled", true)
|
collision_shape_2d.set_deferred("disabled", true)
|
||||||
sprite.play("open")
|
sprite.play("open")
|
||||||
|
|
||||||
|
Opened.emit()
|
||||||
|
|||||||
@@ -395,6 +395,6 @@ shape = SubResource("RectangleShape2D_5ttkm")
|
|||||||
y_sort_enabled = true
|
y_sort_enabled = true
|
||||||
position = Vector2(0, 15)
|
position = Vector2(0, 15)
|
||||||
sprite_frames = SubResource("SpriteFrames_pki7h")
|
sprite_frames = SubResource("SpriteFrames_pki7h")
|
||||||
animation = &"closed"
|
animation = &"open"
|
||||||
autoplay = "closed"
|
autoplay = "closed"
|
||||||
offset = Vector2(0, -15)
|
offset = Vector2(0, -15)
|
||||||
|
|||||||
@@ -4,6 +4,9 @@ extends Node2D
|
|||||||
@export var spawn_markers: Node2D
|
@export var spawn_markers: Node2D
|
||||||
@export var destination_markers: Node2D
|
@export var destination_markers: Node2D
|
||||||
|
|
||||||
|
# Debug
|
||||||
|
@export var should_log_schedule := false
|
||||||
|
|
||||||
@export_range(0.0, 60.0) var minimum_schedule_gap := 20.0
|
@export_range(0.0, 60.0) var minimum_schedule_gap := 20.0
|
||||||
@export_range(1.0, 61.0) var maximum_schedule_gap := 60.0
|
@export_range(1.0, 61.0) var maximum_schedule_gap := 60.0
|
||||||
|
|
||||||
@@ -25,7 +28,8 @@ func _ready() -> void:
|
|||||||
# At spawn, we might want to spawn some leaves sooner...
|
# At spawn, we might want to spawn some leaves sooner...
|
||||||
_spawn_schedule -= randf_range(0.0, _spawn_schedule)
|
_spawn_schedule -= randf_range(0.0, _spawn_schedule)
|
||||||
_spawn_schedule = max(0, _spawn_schedule)
|
_spawn_schedule = max(0, _spawn_schedule)
|
||||||
print("%s - Leaf Spawn Schedule: %f" % [get_parent().name, _spawn_schedule])
|
|
||||||
|
_log_schedule()
|
||||||
|
|
||||||
|
|
||||||
func _process(delta: float) -> void:
|
func _process(delta: float) -> void:
|
||||||
@@ -33,6 +37,7 @@ func _process(delta: float) -> void:
|
|||||||
if _spawn_timer >= _spawn_schedule:
|
if _spawn_timer >= _spawn_schedule:
|
||||||
_spawn_timer = 0.0
|
_spawn_timer = 0.0
|
||||||
_set_random_spawn_schedule()
|
_set_random_spawn_schedule()
|
||||||
|
_log_schedule()
|
||||||
|
|
||||||
var spawn := _get_random_spawn_point()
|
var spawn := _get_random_spawn_point()
|
||||||
var destination := _get_random_destination_point()
|
var destination := _get_random_destination_point()
|
||||||
@@ -76,3 +81,8 @@ func _get_random_destination_point() -> Vector2:
|
|||||||
var offset := Vector2(randf_range(-5.0, 5.0), randf_range(-5.0, 5.0))
|
var offset := Vector2(randf_range(-5.0, 5.0), randf_range(-5.0, 5.0))
|
||||||
|
|
||||||
return marker.position + offset
|
return marker.position + offset
|
||||||
|
|
||||||
|
|
||||||
|
func _log_schedule() -> void:
|
||||||
|
if should_log_schedule:
|
||||||
|
print("%s - Leaf Spawn Schedule: %f" % [get_parent().name, _spawn_schedule])
|
||||||
|
|||||||
BIN
Game Icon.png
Normal file
BIN
Game Icon.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 16 KiB |
40
Game Icon.png.import
Normal file
40
Game Icon.png.import
Normal file
@@ -0,0 +1,40 @@
|
|||||||
|
[remap]
|
||||||
|
|
||||||
|
importer="texture"
|
||||||
|
type="CompressedTexture2D"
|
||||||
|
uid="uid://ckbsqf4p5xu44"
|
||||||
|
path="res://.godot/imported/Game Icon.png-1ecac6caff9b7691e845293f1a955d2a.ctex"
|
||||||
|
metadata={
|
||||||
|
"vram_texture": false
|
||||||
|
}
|
||||||
|
|
||||||
|
[deps]
|
||||||
|
|
||||||
|
source_file="res://Game Icon.png"
|
||||||
|
dest_files=["res://.godot/imported/Game Icon.png-1ecac6caff9b7691e845293f1a955d2a.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
|
||||||
8
Global Managers/component_utils.gd
Normal file
8
Global Managers/component_utils.gd
Normal file
@@ -0,0 +1,8 @@
|
|||||||
|
extends Node
|
||||||
|
|
||||||
|
# Public Methods
|
||||||
|
func GetMovementComponent(container: Node) -> MovementComponent:
|
||||||
|
for node in container.get_children():
|
||||||
|
if node is MovementComponent:
|
||||||
|
return node
|
||||||
|
return null
|
||||||
1
Global Managers/component_utils.gd.uid
Normal file
1
Global Managers/component_utils.gd.uid
Normal file
@@ -0,0 +1 @@
|
|||||||
|
uid://cf5j2r4gpceng
|
||||||
@@ -1,10 +1,14 @@
|
|||||||
extends Node
|
extends Node
|
||||||
|
|
||||||
|
const ERROR_404_MAP = preload("uid://durt8y2ovs6me")
|
||||||
|
const TITLE_SCREEN = preload("uid://be4nw563yydcr")
|
||||||
const HOME_01 = preload("uid://laxewy7irxno")
|
const HOME_01 = preload("uid://laxewy7irxno")
|
||||||
const PATH_TO_DUNGEON_01 = preload("uid://b07m0k40dh042")
|
const PATH_TO_DUNGEON_01 = preload("uid://b07m0k40dh042")
|
||||||
const SHOP = preload("uid://bwt0ijoq4qmhn")
|
const SHOP = preload("uid://bwt0ijoq4qmhn")
|
||||||
|
|
||||||
@onready var mapping := {
|
@onready var mapping := {
|
||||||
|
Enums.MapIds.ERROR_404: ERROR_404_MAP,
|
||||||
|
Enums.MapIds.TITLE_SCREEN: TITLE_SCREEN,
|
||||||
Enums.MapIds.SHOP_01: SHOP,
|
Enums.MapIds.SHOP_01: SHOP,
|
||||||
Enums.MapIds.PATH_TO_FOREST_DUNGEON_01: PATH_TO_DUNGEON_01,
|
Enums.MapIds.PATH_TO_FOREST_DUNGEON_01: PATH_TO_DUNGEON_01,
|
||||||
Enums.MapIds.PATH_TO_FOREST_HOME_01: HOME_01
|
Enums.MapIds.PATH_TO_FOREST_HOME_01: HOME_01
|
||||||
|
|||||||
@@ -1 +1,3 @@
|
|||||||
extends CanvasLayer
|
extends CanvasLayer
|
||||||
|
|
||||||
|
const MAP_UI = preload("uid://ce6ix6ca6js5f")
|
||||||
|
|||||||
@@ -1,10 +1,26 @@
|
|||||||
extends Node2D
|
extends Node2D
|
||||||
|
|
||||||
#@export var initial_map: PackedScene
|
enum StartOptions {
|
||||||
#
|
TitleScreen,
|
||||||
#@onready var world: Node2D = $World
|
InitialMap
|
||||||
#
|
}
|
||||||
## Called when the node enters the scene tree for the first time.
|
|
||||||
#func _ready() -> void:
|
@export var starting_scene := StartOptions.TitleScreen
|
||||||
#var map := initial_map.instantiate()
|
|
||||||
#world.add_child(map)
|
@onready var map_transitioner: Node = $"Map Transitioner"
|
||||||
|
@onready var map_ui: Control = $"Gui/Map UI"
|
||||||
|
|
||||||
|
# Private Methods
|
||||||
|
func _ready() -> void:
|
||||||
|
match starting_scene:
|
||||||
|
StartOptions.TitleScreen:
|
||||||
|
map_transitioner.call_deferred("InstantiateTitleScreen")
|
||||||
|
StartOptions.InitialMap:
|
||||||
|
map_transitioner.call_deferred("InstantiateInitialMap")
|
||||||
|
|
||||||
|
|
||||||
|
func _on_map_changed(map_id: Enums.MapIds) -> void:
|
||||||
|
if map_id != Enums.MapIds.TITLE_SCREEN:
|
||||||
|
map_ui.set_deferred("visible", true)
|
||||||
|
else:
|
||||||
|
map_ui.set_deferred("visible", false)
|
||||||
|
|||||||
@@ -1,22 +1,45 @@
|
|||||||
extends Node
|
extends Node
|
||||||
|
|
||||||
|
signal GameStarted
|
||||||
signal MapChanged(map_id: Enums.MapIds)
|
signal MapChanged(map_id: Enums.MapIds)
|
||||||
|
|
||||||
@export var initial_map_id: Enums.MapIds
|
@export var initial_map_id: Enums.MapIds
|
||||||
|
|
||||||
@onready var world: Node2D = $"../World"
|
@onready var world: Node2D = $"../World"
|
||||||
|
|
||||||
# Private Methods
|
# Public Methods
|
||||||
func _ready() -> void:
|
func InstantiateTitleScreen() -> void:
|
||||||
|
var map_scene := MapLoader.GetMap(Enums.MapIds.TITLE_SCREEN)
|
||||||
|
var map := map_scene.instantiate()
|
||||||
|
world.add_child(map)
|
||||||
|
|
||||||
|
if !map.is_node_ready():
|
||||||
|
await map.ready
|
||||||
|
|
||||||
|
map.connect("GameStarted", _on_title_screen_game_started_clicked)
|
||||||
|
|
||||||
|
_connect_loading_zone_transporters()
|
||||||
|
MapChanged.emit(Enums.MapIds.TITLE_SCREEN)
|
||||||
|
|
||||||
|
|
||||||
|
func InstantiateInitialMap() -> void:
|
||||||
var map_scene := MapLoader.GetMap(initial_map_id)
|
var map_scene := MapLoader.GetMap(initial_map_id)
|
||||||
var map := map_scene.instantiate()
|
var map := map_scene.instantiate()
|
||||||
world.add_child(map)
|
world.add_child(map)
|
||||||
await map.ready
|
|
||||||
|
if !map.is_node_ready():
|
||||||
|
await map.ready
|
||||||
|
|
||||||
_connect_loading_zone_transporters()
|
_connect_loading_zone_transporters()
|
||||||
MapChanged.emit(initial_map_id)
|
MapChanged.emit(initial_map_id)
|
||||||
|
|
||||||
|
|
||||||
|
# Private Methods
|
||||||
|
func _on_title_screen_game_started_clicked() -> void:
|
||||||
|
GameStarted.emit()
|
||||||
|
_on_map_transition_queued(initial_map_id, "")
|
||||||
|
|
||||||
|
|
||||||
func _on_map_transition_queued(map_id: Enums.MapIds, marker_name: String) -> void:
|
func _on_map_transition_queued(map_id: Enums.MapIds, marker_name: String) -> void:
|
||||||
print("Map Transition Queued: %s" % [Enums.MapIds.keys()[map_id]])
|
print("Map Transition Queued: %s" % [Enums.MapIds.keys()[map_id]])
|
||||||
var map_scene := MapLoader.GetMap(map_id)
|
var map_scene := MapLoader.GetMap(map_id)
|
||||||
|
|||||||
6
Main/Scripts/persistence_loader.gd
Normal file
6
Main/Scripts/persistence_loader.gd
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
extends Node
|
||||||
|
|
||||||
|
# Public Methods
|
||||||
|
func OnGameStarted() -> void:
|
||||||
|
print("Loading from disk")
|
||||||
|
PersistenceManager.LoadFromDisk(PersistenceManager.DEFAULT_SAVE_FILE_PATH)
|
||||||
1
Main/Scripts/persistence_loader.gd.uid
Normal file
1
Main/Scripts/persistence_loader.gd.uid
Normal file
@@ -0,0 +1 @@
|
|||||||
|
uid://bkvsdwn7swt1p
|
||||||
@@ -5,18 +5,24 @@
|
|||||||
[ext_resource type="Script" uid="uid://c4w8hney4mesw" path="res://Main/Scripts/gui.gd" id="3_8gbba"]
|
[ext_resource type="Script" uid="uid://c4w8hney4mesw" path="res://Main/Scripts/gui.gd" id="3_8gbba"]
|
||||||
[ext_resource type="Script" uid="uid://dr7ljodtof1k5" path="res://Main/Scripts/map_transitioner.gd" id="3_kry3j"]
|
[ext_resource type="Script" uid="uid://dr7ljodtof1k5" path="res://Main/Scripts/map_transitioner.gd" id="3_kry3j"]
|
||||||
[ext_resource type="Script" uid="uid://cluyhxrc3pdb" path="res://Scripts/dialogue_trigger_connector.gd" id="4_6bp64"]
|
[ext_resource type="Script" uid="uid://cluyhxrc3pdb" path="res://Scripts/dialogue_trigger_connector.gd" id="4_6bp64"]
|
||||||
|
[ext_resource type="Script" uid="uid://bkvsdwn7swt1p" path="res://Main/Scripts/persistence_loader.gd" id="4_ib3t1"]
|
||||||
[ext_resource type="PackedScene" uid="uid://cxc4x4yp7l3hg" path="res://UI/dialogue_box.tscn" id="6_21xkr"]
|
[ext_resource type="PackedScene" uid="uid://cxc4x4yp7l3hg" path="res://UI/dialogue_box.tscn" id="6_21xkr"]
|
||||||
|
[ext_resource type="PackedScene" uid="uid://ce6ix6ca6js5f" path="res://UI/Screens/map_ui.tscn" id="8_f6fdm"]
|
||||||
|
|
||||||
[node name="Main" type="Node2D" unique_id=1457826519]
|
[node name="Main" type="Node2D" unique_id=1457826519]
|
||||||
script = ExtResource("1_jjgbg")
|
script = ExtResource("1_jjgbg")
|
||||||
|
|
||||||
[node name="Map Transitioner" type="Node" parent="." unique_id=1528505665]
|
[node name="Map Transitioner" type="Node" parent="." unique_id=1528505665]
|
||||||
script = ExtResource("3_kry3j")
|
script = ExtResource("3_kry3j")
|
||||||
|
initial_map_id = 3
|
||||||
|
|
||||||
[node name="Dialogue Trigger Connector" type="Node" parent="." unique_id=1187622540 node_paths=PackedStringArray("dialogue_box")]
|
[node name="Dialogue Trigger Connector" type="Node" parent="." unique_id=1187622540 node_paths=PackedStringArray("dialogue_box")]
|
||||||
script = ExtResource("4_6bp64")
|
script = ExtResource("4_6bp64")
|
||||||
dialogue_box = NodePath("../Gui/Dialogue Box")
|
dialogue_box = NodePath("../Gui/Dialogue Box")
|
||||||
|
|
||||||
|
[node name="Persistence Loader" type="Node" parent="." unique_id=523510879]
|
||||||
|
script = ExtResource("4_ib3t1")
|
||||||
|
|
||||||
[node name="World" type="Node2D" parent="." unique_id=578440549]
|
[node name="World" type="Node2D" parent="." unique_id=578440549]
|
||||||
script = ExtResource("2_bo1nx")
|
script = ExtResource("2_bo1nx")
|
||||||
|
|
||||||
@@ -26,5 +32,10 @@ script = ExtResource("3_8gbba")
|
|||||||
[node name="Dialogue Box" parent="Gui" unique_id=586562815 instance=ExtResource("6_21xkr")]
|
[node name="Dialogue Box" parent="Gui" unique_id=586562815 instance=ExtResource("6_21xkr")]
|
||||||
visible = false
|
visible = false
|
||||||
|
|
||||||
|
[node name="Map UI" parent="Gui" unique_id=98184404 instance=ExtResource("8_f6fdm")]
|
||||||
|
visible = false
|
||||||
|
|
||||||
|
[connection signal="GameStarted" from="Map Transitioner" to="Persistence Loader" method="OnGameStarted"]
|
||||||
|
[connection signal="MapChanged" from="Map Transitioner" to="." method="_on_map_changed"]
|
||||||
[connection signal="MapChanged" from="Map Transitioner" to="Dialogue Trigger Connector" method="_on_map_changed"]
|
[connection signal="MapChanged" from="Map Transitioner" to="Dialogue Trigger Connector" method="_on_map_changed"]
|
||||||
[connection signal="DialogueTriggered" from="Dialogue Trigger Connector" to="Gui/Dialogue Box" method="OnDialogueTriggered"]
|
[connection signal="DialogueTriggered" from="Dialogue Trigger Connector" to="Gui/Dialogue Box" method="OnDialogueTriggered"]
|
||||||
|
|||||||
31
Maps/Error/error_404_map.tscn
Normal file
31
Maps/Error/error_404_map.tscn
Normal file
File diff suppressed because one or more lines are too long
@@ -11,6 +11,7 @@
|
|||||||
[ext_resource type="PackedScene" uid="uid://b60nr4wfvijpf" path="res://Entities/Map Objects/Dialogue/dialogue_trigger.tscn" id="5_msu6a"]
|
[ext_resource type="PackedScene" uid="uid://b60nr4wfvijpf" path="res://Entities/Map Objects/Dialogue/dialogue_trigger.tscn" id="5_msu6a"]
|
||||||
[ext_resource type="Texture2D" uid="uid://bm5ewxv51potl" path="res://Assets/Spritesheets/NPCs/Miner_Mike.png" id="6_x3y8m"]
|
[ext_resource type="Texture2D" uid="uid://bm5ewxv51potl" path="res://Assets/Spritesheets/NPCs/Miner_Mike.png" id="6_x3y8m"]
|
||||||
[ext_resource type="Texture2D" uid="uid://bqvnkdyhfa1yq" path="res://Maps/Forest Dungeon Entrance/Interiors/Home_01_Overlay_01.png" id="11_6xfm6"]
|
[ext_resource type="Texture2D" uid="uid://bqvnkdyhfa1yq" path="res://Maps/Forest Dungeon Entrance/Interiors/Home_01_Overlay_01.png" id="11_6xfm6"]
|
||||||
|
[ext_resource type="PackedScene" uid="uid://nbkisxm2oekn" path="res://Entities/Characters/Utility/Components/movement_component.tscn" id="11_fqvwb"]
|
||||||
|
|
||||||
[sub_resource type="RectangleShape2D" id="RectangleShape2D_7kg22"]
|
[sub_resource type="RectangleShape2D" id="RectangleShape2D_7kg22"]
|
||||||
size = Vector2(32, 8)
|
size = Vector2(32, 8)
|
||||||
@@ -125,6 +126,7 @@ position = Vector2(80, 188)
|
|||||||
shape = SubResource("RectangleShape2D_7kg22")
|
shape = SubResource("RectangleShape2D_7kg22")
|
||||||
|
|
||||||
[node name="Loading Zone Transporter" parent="Loading Zones/Collision Loading Zone" unique_id=1690817663 instance=ExtResource("3_7kg22")]
|
[node name="Loading Zone Transporter" parent="Loading Zones/Collision Loading Zone" unique_id=1690817663 instance=ExtResource("3_7kg22")]
|
||||||
|
destination_map_id = 2
|
||||||
destination_marker_name = "Home 01 Entrance"
|
destination_marker_name = "Home 01 Entrance"
|
||||||
|
|
||||||
[node name="Spawn Markers" type="Node2D" parent="." unique_id=1756787676]
|
[node name="Spawn Markers" type="Node2D" parent="." unique_id=1756787676]
|
||||||
@@ -160,6 +162,8 @@ zoom = Vector2(3, 3)
|
|||||||
[node name="Player" parent="." unique_id=1502234578 instance=ExtResource("2_lky26")]
|
[node name="Player" parent="." unique_id=1502234578 instance=ExtResource("2_lky26")]
|
||||||
position = Vector2(108, 139)
|
position = Vector2(108, 139)
|
||||||
|
|
||||||
|
[node name="Movement Component" parent="Player" unique_id=737644583 instance=ExtResource("11_fqvwb")]
|
||||||
|
|
||||||
[node name="Overlay" type="Sprite2D" parent="." unique_id=455840170]
|
[node name="Overlay" type="Sprite2D" parent="." unique_id=455840170]
|
||||||
position = Vector2(124, 217)
|
position = Vector2(124, 217)
|
||||||
scale = Vector2(0.25, 0.25)
|
scale = Vector2(0.25, 0.25)
|
||||||
|
|||||||
@@ -11,6 +11,8 @@
|
|||||||
[ext_resource type="PackedScene" uid="uid://byp273amg5ji8" path="res://Entities/Map Objects/Chests/Item Chests/item_chest_01 (Wooden).tscn" id="5_bnsbe"]
|
[ext_resource type="PackedScene" uid="uid://byp273amg5ji8" path="res://Entities/Map Objects/Chests/Item Chests/item_chest_01 (Wooden).tscn" id="5_bnsbe"]
|
||||||
[ext_resource type="Texture2D" uid="uid://bf6llktwqhs8l" path="res://Assets/Sprites/Door Fade.png" id="5_jett5"]
|
[ext_resource type="Texture2D" uid="uid://bf6llktwqhs8l" path="res://Assets/Sprites/Door Fade.png" id="5_jett5"]
|
||||||
[ext_resource type="PackedScene" uid="uid://did853bh5xeic" path="res://Maps/Connectors/spawn_marker_connector.tscn" id="5_lphfo"]
|
[ext_resource type="PackedScene" uid="uid://did853bh5xeic" path="res://Maps/Connectors/spawn_marker_connector.tscn" id="5_lphfo"]
|
||||||
|
[ext_resource type="PackedScene" uid="uid://w4mh31se58f4" path="res://Persistence/Connectors/chest_persistence_connector.tscn" id="6_l5trr"]
|
||||||
|
[ext_resource type="PackedScene" uid="uid://c5ymu08jotbfp" path="res://Persistence/Connectors/gate_persistence_connector.tscn" id="7_0w1de"]
|
||||||
[ext_resource type="PackedScene" uid="uid://be6xfndyj4ckx" path="res://Entities/Map Objects/Trees/tree_02.tscn" id="7_ycf72"]
|
[ext_resource type="PackedScene" uid="uid://be6xfndyj4ckx" path="res://Entities/Map Objects/Trees/tree_02.tscn" id="7_ycf72"]
|
||||||
[ext_resource type="PackedScene" uid="uid://cc3qat6un2323" path="res://Entities/Map Objects/Trees/tree_01.tscn" id="8_yab5j"]
|
[ext_resource type="PackedScene" uid="uid://cc3qat6un2323" path="res://Entities/Map Objects/Trees/tree_01.tscn" id="8_yab5j"]
|
||||||
[ext_resource type="PackedScene" uid="uid://bcx1d8kvp7o0h" path="res://Entities/Map Objects/Trees/tree_03.tscn" id="9_lwurn"]
|
[ext_resource type="PackedScene" uid="uid://bcx1d8kvp7o0h" path="res://Entities/Map Objects/Trees/tree_03.tscn" id="9_lwurn"]
|
||||||
@@ -25,7 +27,8 @@
|
|||||||
[ext_resource type="PackedScene" uid="uid://coaf2ndwb6h61" path="res://Entities/Map Objects/Decorative/Signs/wooden_sign_02.tscn" id="19_jtncl"]
|
[ext_resource type="PackedScene" uid="uid://coaf2ndwb6h61" path="res://Entities/Map Objects/Decorative/Signs/wooden_sign_02.tscn" id="19_jtncl"]
|
||||||
[ext_resource type="PackedScene" uid="uid://cla2d3gii8qda" path="res://Entities/Map Objects/Loading Zone/interactive_loading_zone.tscn" id="20_c5vrl"]
|
[ext_resource type="PackedScene" uid="uid://cla2d3gii8qda" path="res://Entities/Map Objects/Loading Zone/interactive_loading_zone.tscn" id="20_c5vrl"]
|
||||||
[ext_resource type="PackedScene" uid="uid://b60nr4wfvijpf" path="res://Entities/Map Objects/Dialogue/dialogue_trigger.tscn" id="20_x6da4"]
|
[ext_resource type="PackedScene" uid="uid://b60nr4wfvijpf" path="res://Entities/Map Objects/Dialogue/dialogue_trigger.tscn" id="20_x6da4"]
|
||||||
[ext_resource type="PackedScene" uid="uid://c7rjjlamkqhnw" path="res://Debug/under_construction_block.tscn" id="26_4lnhp"]
|
[ext_resource type="PackedScene" uid="uid://c7rjjlamkqhnw" path="res://Debug/Utility Objects/under_construction_block.tscn" id="26_4lnhp"]
|
||||||
|
[ext_resource type="PackedScene" uid="uid://nbkisxm2oekn" path="res://Entities/Characters/Utility/Components/movement_component.tscn" id="28_mf3dv"]
|
||||||
|
|
||||||
[sub_resource type="RectangleShape2D" id="RectangleShape2D_lwurn"]
|
[sub_resource type="RectangleShape2D" id="RectangleShape2D_lwurn"]
|
||||||
size = Vector2(768, 494)
|
size = Vector2(768, 494)
|
||||||
@@ -63,25 +66,33 @@ size = Vector2(10, 7)
|
|||||||
[node name="Map 01" type="Node2D" unique_id=411453136]
|
[node name="Map 01" type="Node2D" unique_id=411453136]
|
||||||
y_sort_enabled = true
|
y_sort_enabled = true
|
||||||
|
|
||||||
[node name="Connectors" type="Node" parent="." unique_id=1365901208]
|
[node name="Map Connectors" type="Node" parent="." unique_id=1365901208]
|
||||||
|
|
||||||
[node name="Chest Interaction Connector" parent="Connectors" unique_id=625804018 node_paths=PackedStringArray("player") instance=ExtResource("1_jtncl")]
|
[node name="Chest Interaction Connector" parent="Map Connectors" unique_id=625804018 node_paths=PackedStringArray("player") instance=ExtResource("1_jtncl")]
|
||||||
player = NodePath("../../Player")
|
player = NodePath("../../Player")
|
||||||
|
|
||||||
[node name="Arrow Spawner" parent="Connectors" unique_id=627092886 node_paths=PackedStringArray("player", "arrow_parent") instance=ExtResource("2_jtncl")]
|
[node name="Arrow Spawner" parent="Map Connectors" unique_id=627092886 node_paths=PackedStringArray("player", "arrow_parent") instance=ExtResource("2_jtncl")]
|
||||||
player = NodePath("../../Player")
|
player = NodePath("../../Player")
|
||||||
arrow_parent = NodePath("../../Objects/Projectiles")
|
arrow_parent = NodePath("../../Objects/Projectiles")
|
||||||
|
|
||||||
[node name="Bench Interaction Connector" parent="Connectors" unique_id=541204437 node_paths=PackedStringArray("player") instance=ExtResource("3_x6da4")]
|
[node name="Bench Interaction Connector" parent="Map Connectors" unique_id=541204437 node_paths=PackedStringArray("player") instance=ExtResource("3_x6da4")]
|
||||||
player = NodePath("../../Player")
|
player = NodePath("../../Player")
|
||||||
|
|
||||||
[node name="Interactive Loading Zone Connector" parent="Connectors" unique_id=833475826 node_paths=PackedStringArray("player") instance=ExtResource("4_4lnhp")]
|
[node name="Interactive Loading Zone Connector" parent="Map Connectors" unique_id=833475826 node_paths=PackedStringArray("player") instance=ExtResource("4_4lnhp")]
|
||||||
player = NodePath("../../Player")
|
player = NodePath("../../Player")
|
||||||
|
|
||||||
[node name="Spawn Marker Connector" parent="Connectors" unique_id=807187299 node_paths=PackedStringArray("player", "markers") instance=ExtResource("5_lphfo")]
|
[node name="Spawn Marker Connector" parent="Map Connectors" unique_id=807187299 node_paths=PackedStringArray("player", "markers") instance=ExtResource("5_lphfo")]
|
||||||
player = NodePath("../../Player")
|
player = NodePath("../../Player")
|
||||||
markers = NodePath("../../Spawn Markers")
|
markers = NodePath("../../Spawn Markers")
|
||||||
|
|
||||||
|
[node name="Persistence Connectors" type="Node" parent="." unique_id=1245900932]
|
||||||
|
|
||||||
|
[node name="Chest Persistence Connector" parent="Persistence Connectors" unique_id=281805027 instance=ExtResource("6_l5trr")]
|
||||||
|
chests = Array[NodePath]([NodePath("../../Objects/Chests/Item Chest 01 - 1"), NodePath("../../Objects/Chests/Item Chest 01 - 2"), NodePath("../../Objects/Chests/Item Chest 01 - 3")])
|
||||||
|
|
||||||
|
[node name="GatePersistenceConnector" parent="Persistence Connectors" unique_id=1082904286 instance=ExtResource("7_0w1de")]
|
||||||
|
gates = Array[NodePath]([NodePath("../../Objects/Spike Gate"), NodePath("../../Objects/Spike Gate2")])
|
||||||
|
|
||||||
[node name="Camera Limit Connector" type="Area2D" parent="." unique_id=1290795384 node_paths=PackedStringArray("camera_to_limit")]
|
[node name="Camera Limit Connector" type="Area2D" parent="." unique_id=1290795384 node_paths=PackedStringArray("camera_to_limit")]
|
||||||
collision_layer = 0
|
collision_layer = 0
|
||||||
collision_mask = 0
|
collision_mask = 0
|
||||||
@@ -331,7 +342,7 @@ position = Vector2(-1, -0.5)
|
|||||||
shape = SubResource("RectangleShape2D_xrhbk")
|
shape = SubResource("RectangleShape2D_xrhbk")
|
||||||
|
|
||||||
[node name="Loading Zone Transporter" parent="Loading Zones/Shop Door" unique_id=1690817663 instance=ExtResource("19_c5vrl")]
|
[node name="Loading Zone Transporter" parent="Loading Zones/Shop Door" unique_id=1690817663 instance=ExtResource("19_c5vrl")]
|
||||||
destination_map_id = 1
|
destination_map_id = 3
|
||||||
destination_marker_name = "Entrance"
|
destination_marker_name = "Entrance"
|
||||||
|
|
||||||
[node name="Spawn Markers" type="Node2D" parent="." unique_id=1420428815]
|
[node name="Spawn Markers" type="Node2D" parent="." unique_id=1420428815]
|
||||||
@@ -340,7 +351,9 @@ destination_marker_name = "Entrance"
|
|||||||
position = Vector2(278, 474)
|
position = Vector2(278, 474)
|
||||||
|
|
||||||
[node name="Player" parent="." unique_id=1502234578 instance=ExtResource("4_4igim")]
|
[node name="Player" parent="." unique_id=1502234578 instance=ExtResource("4_4igim")]
|
||||||
position = Vector2(89, 450)
|
position = Vector2(656, 498)
|
||||||
|
|
||||||
|
[node name="Movement Component" parent="Player" unique_id=737644583 instance=ExtResource("28_mf3dv")]
|
||||||
|
|
||||||
[node name="Camera2D" type="Camera2D" parent="Player" unique_id=1115720225]
|
[node name="Camera2D" type="Camera2D" parent="Player" unique_id=1115720225]
|
||||||
position = Vector2(0, 1)
|
position = Vector2(0, 1)
|
||||||
@@ -385,7 +398,7 @@ position = Vector2(760, 312)
|
|||||||
[node name="Under Construction Block12" parent="Debug" unique_id=1005752992 instance=ExtResource("26_4lnhp")]
|
[node name="Under Construction Block12" parent="Debug" unique_id=1005752992 instance=ExtResource("26_4lnhp")]
|
||||||
position = Vector2(760, 328)
|
position = Vector2(760, 328)
|
||||||
|
|
||||||
[connection signal="SitOnBenchTriggered" from="Connectors/Bench Interaction Connector" to="Player" method="OnSitOnFurnitureTriggered"]
|
[connection signal="SitOnBenchTriggered" from="Map Connectors/Bench Interaction Connector" to="Player" method="OnSitOnFurnitureTriggered"]
|
||||||
[connection signal="TargetHit" from="Objects/ArrowTarget" to="Objects/Spike Gate" method="OpenGate"]
|
[connection signal="TargetHit" from="Objects/ArrowTarget" to="Objects/Spike Gate" method="OpenGate"]
|
||||||
[connection signal="TargetHit" from="Objects/ArrowTarget" to="Objects/Spike Gate2" method="OpenGate"]
|
[connection signal="TargetHit" from="Objects/ArrowTarget" to="Objects/Spike Gate2" method="OpenGate"]
|
||||||
[connection signal="PressurePlateTripped" from="Objects/PressurePlate" to="Objects/Spike Gate" method="OpenGate"]
|
[connection signal="PressurePlateTripped" from="Objects/PressurePlate" to="Objects/Spike Gate" method="OpenGate"]
|
||||||
|
|||||||
7
Maps/Live Menus/Scripts/title_screen.gd
Normal file
7
Maps/Live Menus/Scripts/title_screen.gd
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
extends Node2D
|
||||||
|
|
||||||
|
signal GameStarted
|
||||||
|
|
||||||
|
# Private Methods
|
||||||
|
func _on_start_game_button_pressed() -> void:
|
||||||
|
GameStarted.emit()
|
||||||
1
Maps/Live Menus/Scripts/title_screen.gd.uid
Normal file
1
Maps/Live Menus/Scripts/title_screen.gd.uid
Normal file
@@ -0,0 +1 @@
|
|||||||
|
uid://qv5i4xr6pldc
|
||||||
95
Maps/Live Menus/title_screen.tscn
Normal file
95
Maps/Live Menus/title_screen.tscn
Normal file
File diff suppressed because one or more lines are too long
@@ -0,0 +1,20 @@
|
|||||||
|
extends Node
|
||||||
|
|
||||||
|
@export var chests: Array[NodePath]
|
||||||
|
|
||||||
|
# Private Methods
|
||||||
|
func _ready() -> void:
|
||||||
|
for relative_node_path in chests:
|
||||||
|
var chest: BaseChest = get_node(relative_node_path)
|
||||||
|
var node_path := chest.get_path()
|
||||||
|
chest.ChestOpened.connect(func(): _on_chest_opened(chest))
|
||||||
|
|
||||||
|
if PersistenceManager.HasData(node_path):
|
||||||
|
var chest_opened: bool = PersistenceManager.GetData(node_path)
|
||||||
|
if chest_opened:
|
||||||
|
chest.call_deferred("SetOpenedFromLoad")
|
||||||
|
|
||||||
|
|
||||||
|
func _on_chest_opened(chest: BaseChest) -> void:
|
||||||
|
var node_path := chest.get_path()
|
||||||
|
PersistenceManager.UpdateData(node_path, true)
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
uid://75g2fysjrqji
|
||||||
39
Persistence/Connectors/Scripts/gate_persistence_connector.gd
Normal file
39
Persistence/Connectors/Scripts/gate_persistence_connector.gd
Normal file
@@ -0,0 +1,39 @@
|
|||||||
|
extends Node
|
||||||
|
|
||||||
|
@export var gates: Array[NodePath]
|
||||||
|
|
||||||
|
# Private Methods
|
||||||
|
func _ready() -> void:
|
||||||
|
for node_path in gates:
|
||||||
|
_handle_spike_gate(node_path)
|
||||||
|
|
||||||
|
|
||||||
|
func _handle_spike_gate(node_path: NodePath) -> bool:
|
||||||
|
var node := get_node(node_path)
|
||||||
|
node_path = node.get_path()
|
||||||
|
if not node.name.begins_with("Spike Gate"):
|
||||||
|
return false
|
||||||
|
|
||||||
|
# Connect Signal
|
||||||
|
node.connect("Opened", func(): _on_spike_gate_opened(node))
|
||||||
|
|
||||||
|
if not PersistenceManager.HasData(node_path):
|
||||||
|
return true
|
||||||
|
|
||||||
|
var is_open: bool = PersistenceManager.GetData(node_path)
|
||||||
|
if not is_open:
|
||||||
|
return true
|
||||||
|
|
||||||
|
var collision_shape: CollisionShape2D = node.get_node("CollisionShape2D")
|
||||||
|
var animated_sprite: AnimatedSprite2D = node.get_node("AnimatedSprite2D")
|
||||||
|
|
||||||
|
node.set_deferred("is_open", true)
|
||||||
|
collision_shape.set_deferred("disabled", true)
|
||||||
|
animated_sprite.call_deferred("play", "open")
|
||||||
|
|
||||||
|
return true
|
||||||
|
|
||||||
|
|
||||||
|
func _on_spike_gate_opened(node: Node) -> void:
|
||||||
|
var path := node.get_path()
|
||||||
|
PersistenceManager.UpdateData(path, true)
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
uid://brsiegtrne15y
|
||||||
6
Persistence/Connectors/chest_persistence_connector.tscn
Normal file
6
Persistence/Connectors/chest_persistence_connector.tscn
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
[gd_scene format=3 uid="uid://w4mh31se58f4"]
|
||||||
|
|
||||||
|
[ext_resource type="Script" uid="uid://75g2fysjrqji" path="res://Persistence/Connectors/Scripts/chest_persistence_connector.gd" id="1_hytou"]
|
||||||
|
|
||||||
|
[node name="Chest Persistence Connector" type="Node" unique_id=281805027]
|
||||||
|
script = ExtResource("1_hytou")
|
||||||
6
Persistence/Connectors/gate_persistence_connector.tscn
Normal file
6
Persistence/Connectors/gate_persistence_connector.tscn
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
[gd_scene format=3 uid="uid://c5ymu08jotbfp"]
|
||||||
|
|
||||||
|
[ext_resource type="Script" uid="uid://brsiegtrne15y" path="res://Persistence/Connectors/Scripts/gate_persistence_connector.gd" id="1_0smsr"]
|
||||||
|
|
||||||
|
[node name="GatePersistenceConnector" type="Node" unique_id=1082904286]
|
||||||
|
script = ExtResource("1_0smsr")
|
||||||
66
Persistence/persistence_manager.gd
Normal file
66
Persistence/persistence_manager.gd
Normal file
@@ -0,0 +1,66 @@
|
|||||||
|
extends Node
|
||||||
|
|
||||||
|
const DEFAULT_SAVE_FILE_PATH = "user://savegame.save"
|
||||||
|
|
||||||
|
var _save_file_path: String
|
||||||
|
var _save_dictionary: Dictionary = {}
|
||||||
|
|
||||||
|
# Public Methods
|
||||||
|
func UpdateData(key: String, value: Variant) -> void:
|
||||||
|
_save_dictionary[key] = value
|
||||||
|
|
||||||
|
|
||||||
|
func UpdateNode(node_path: NodePath, value: Variant) -> void:
|
||||||
|
UpdateData(str(node_path), value)
|
||||||
|
|
||||||
|
|
||||||
|
func GetData(key: String) -> Variant:
|
||||||
|
if not _save_dictionary.has(key):
|
||||||
|
return null
|
||||||
|
return _save_dictionary[key]
|
||||||
|
|
||||||
|
|
||||||
|
func GetNode(node_path: NodePath) -> Variant:
|
||||||
|
var key := str(node_path)
|
||||||
|
return GetData(key)
|
||||||
|
|
||||||
|
|
||||||
|
func HasData(node_path: NodePath) -> bool:
|
||||||
|
return _save_dictionary.has(node_path)
|
||||||
|
|
||||||
|
|
||||||
|
func SaveToDisk() -> void:
|
||||||
|
if !_save_file_path:
|
||||||
|
return
|
||||||
|
|
||||||
|
var save_file := FileAccess.open(_save_file_path, FileAccess.WRITE)
|
||||||
|
var json := JSON.stringify(_save_dictionary)
|
||||||
|
|
||||||
|
save_file.store_line(json)
|
||||||
|
|
||||||
|
|
||||||
|
func LoadFromDisk(save_file_path: String) -> void:
|
||||||
|
_save_file_path = save_file_path
|
||||||
|
|
||||||
|
if not FileAccess.file_exists(save_file_path):
|
||||||
|
print_rich("[color=yellow]Save file at path %s does not exist, creating new save file...[/color]" % save_file_path)
|
||||||
|
return
|
||||||
|
|
||||||
|
var save_file := FileAccess.open(save_file_path, FileAccess.READ)
|
||||||
|
print("Loading save file from path: %s" % save_file.get_path_absolute())
|
||||||
|
|
||||||
|
if save_file.get_position() >= save_file.get_length():
|
||||||
|
print("Save file was empty...")
|
||||||
|
return
|
||||||
|
|
||||||
|
var line := save_file.get_line()
|
||||||
|
var json = JSON.new()
|
||||||
|
var parse_result := json.parse(line)
|
||||||
|
if parse_result != OK:
|
||||||
|
print("Parsing result when loading file: [%s] in %s at line %d" % [json.get_error_message(), line, json.get_error_line()])
|
||||||
|
return
|
||||||
|
|
||||||
|
print("JSON data parsed: [%d]" % typeof(json.data))
|
||||||
|
|
||||||
|
var data_dict: Dictionary = json.data
|
||||||
|
_save_dictionary = data_dict
|
||||||
1
Persistence/persistence_manager.gd.uid
Normal file
1
Persistence/persistence_manager.gd.uid
Normal file
@@ -0,0 +1 @@
|
|||||||
|
uid://dl2kg1qu0ymi7
|
||||||
@@ -782,6 +782,72 @@ texture = ExtResource("8_8d5h8")
|
|||||||
1:1/animation_frame_6/duration = 0.3
|
1:1/animation_frame_6/duration = 0.3
|
||||||
1:1/animation_frame_7/duration = 0.3
|
1:1/animation_frame_7/duration = 0.3
|
||||||
1:1/0 = 0
|
1:1/0 = 0
|
||||||
|
0:3/animation_columns = 8
|
||||||
|
0:3/animation_separation = Vector2i(2, 0)
|
||||||
|
0:3/animation_frame_0/duration = 0.3
|
||||||
|
0:3/animation_frame_1/duration = 0.3
|
||||||
|
0:3/animation_frame_2/duration = 0.3
|
||||||
|
0:3/animation_frame_3/duration = 0.3
|
||||||
|
0:3/animation_frame_4/duration = 0.3
|
||||||
|
0:3/animation_frame_5/duration = 0.3
|
||||||
|
0:3/animation_frame_6/duration = 0.3
|
||||||
|
0:3/animation_frame_7/duration = 0.3
|
||||||
|
0:3/0 = 0
|
||||||
|
0:4/animation_columns = 8
|
||||||
|
0:4/animation_separation = Vector2i(2, 0)
|
||||||
|
0:4/animation_frame_0/duration = 0.3
|
||||||
|
0:4/animation_frame_1/duration = 0.3
|
||||||
|
0:4/animation_frame_2/duration = 0.3
|
||||||
|
0:4/animation_frame_3/duration = 0.3
|
||||||
|
0:4/animation_frame_4/duration = 0.3
|
||||||
|
0:4/animation_frame_5/duration = 0.3
|
||||||
|
0:4/animation_frame_6/duration = 0.3
|
||||||
|
0:4/animation_frame_7/duration = 0.3
|
||||||
|
0:4/0 = 0
|
||||||
|
1:4/animation_columns = 8
|
||||||
|
1:4/animation_separation = Vector2i(2, 0)
|
||||||
|
1:4/animation_frame_0/duration = 0.3
|
||||||
|
1:4/animation_frame_1/duration = 0.3
|
||||||
|
1:4/animation_frame_2/duration = 0.3
|
||||||
|
1:4/animation_frame_3/duration = 0.3
|
||||||
|
1:4/animation_frame_4/duration = 0.3
|
||||||
|
1:4/animation_frame_5/duration = 0.3
|
||||||
|
1:4/animation_frame_6/duration = 0.3
|
||||||
|
1:4/animation_frame_7/duration = 0.3
|
||||||
|
1:4/0 = 0
|
||||||
|
1:3/animation_columns = 8
|
||||||
|
1:3/animation_separation = Vector2i(2, 0)
|
||||||
|
1:3/animation_frame_0/duration = 0.3
|
||||||
|
1:3/animation_frame_1/duration = 0.3
|
||||||
|
1:3/animation_frame_2/duration = 0.3
|
||||||
|
1:3/animation_frame_3/duration = 0.3
|
||||||
|
1:3/animation_frame_4/duration = 0.3
|
||||||
|
1:3/animation_frame_5/duration = 0.3
|
||||||
|
1:3/animation_frame_6/duration = 0.3
|
||||||
|
1:3/animation_frame_7/duration = 0.3
|
||||||
|
1:3/0 = 0
|
||||||
|
2:3/animation_columns = 8
|
||||||
|
2:3/animation_separation = Vector2i(2, 0)
|
||||||
|
2:3/animation_frame_0/duration = 0.3
|
||||||
|
2:3/animation_frame_1/duration = 0.3
|
||||||
|
2:3/animation_frame_2/duration = 0.3
|
||||||
|
2:3/animation_frame_3/duration = 0.3
|
||||||
|
2:3/animation_frame_4/duration = 0.3
|
||||||
|
2:3/animation_frame_5/duration = 0.3
|
||||||
|
2:3/animation_frame_6/duration = 0.3
|
||||||
|
2:3/animation_frame_7/duration = 0.3
|
||||||
|
2:3/0 = 0
|
||||||
|
2:4/animation_columns = 8
|
||||||
|
2:4/animation_separation = Vector2i(2, 0)
|
||||||
|
2:4/animation_frame_0/duration = 0.3
|
||||||
|
2:4/animation_frame_1/duration = 0.3
|
||||||
|
2:4/animation_frame_2/duration = 0.3
|
||||||
|
2:4/animation_frame_3/duration = 0.3
|
||||||
|
2:4/animation_frame_4/duration = 0.3
|
||||||
|
2:4/animation_frame_5/duration = 0.3
|
||||||
|
2:4/animation_frame_6/duration = 0.3
|
||||||
|
2:4/animation_frame_7/duration = 0.3
|
||||||
|
2:4/0 = 0
|
||||||
|
|
||||||
[resource]
|
[resource]
|
||||||
physics_layer_0/collision_layer = 1
|
physics_layer_0/collision_layer = 1
|
||||||
|
|||||||
@@ -17,6 +17,8 @@ enum Items {
|
|||||||
}
|
}
|
||||||
|
|
||||||
enum MapIds {
|
enum MapIds {
|
||||||
|
ERROR_404,
|
||||||
|
TITLE_SCREEN,
|
||||||
PATH_TO_FOREST_DUNGEON_01,
|
PATH_TO_FOREST_DUNGEON_01,
|
||||||
PATH_TO_FOREST_HOME_01,
|
PATH_TO_FOREST_HOME_01,
|
||||||
SHOP_01
|
SHOP_01
|
||||||
|
|||||||
5
UI/Screens/Scripts/map_ui.gd
Normal file
5
UI/Screens/Scripts/map_ui.gd
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
extends Control
|
||||||
|
|
||||||
|
# Private Methods
|
||||||
|
func _on_save_button_pressed() -> void:
|
||||||
|
PersistenceManager.SaveToDisk()
|
||||||
1
UI/Screens/Scripts/map_ui.gd.uid
Normal file
1
UI/Screens/Scripts/map_ui.gd.uid
Normal file
@@ -0,0 +1 @@
|
|||||||
|
uid://dudh233xe7s0b
|
||||||
33
UI/Screens/map_ui.tscn
Normal file
33
UI/Screens/map_ui.tscn
Normal file
@@ -0,0 +1,33 @@
|
|||||||
|
[gd_scene format=3 uid="uid://ce6ix6ca6js5f"]
|
||||||
|
|
||||||
|
[ext_resource type="Texture2D" uid="uid://bo1utikr0r2q1" path="res://Assets/Spritesheets/Icons/UI/64x64.png" id="1_j6kbw"]
|
||||||
|
[ext_resource type="Script" uid="uid://dudh233xe7s0b" path="res://UI/Screens/Scripts/map_ui.gd" id="1_xiqit"]
|
||||||
|
|
||||||
|
[sub_resource type="AtlasTexture" id="AtlasTexture_xiqit"]
|
||||||
|
atlas = ExtResource("1_j6kbw")
|
||||||
|
region = Rect2(576, 0, 64, 64)
|
||||||
|
|
||||||
|
[node name="Map UI" type="Control" unique_id=98184404]
|
||||||
|
layout_mode = 3
|
||||||
|
anchors_preset = 15
|
||||||
|
anchor_right = 1.0
|
||||||
|
anchor_bottom = 1.0
|
||||||
|
grow_horizontal = 2
|
||||||
|
grow_vertical = 2
|
||||||
|
script = ExtResource("1_xiqit")
|
||||||
|
|
||||||
|
[node name="Save Button" type="Button" parent="." unique_id=241739999]
|
||||||
|
layout_mode = 1
|
||||||
|
anchors_preset = 3
|
||||||
|
anchor_left = 1.0
|
||||||
|
anchor_top = 1.0
|
||||||
|
anchor_right = 1.0
|
||||||
|
anchor_bottom = 1.0
|
||||||
|
offset_left = -112.0
|
||||||
|
offset_top = -72.0
|
||||||
|
grow_horizontal = 0
|
||||||
|
grow_vertical = 0
|
||||||
|
text = "Save"
|
||||||
|
icon = SubResource("AtlasTexture_xiqit")
|
||||||
|
|
||||||
|
[connection signal="pressed" from="Save Button" to="." method="_on_save_button_pressed"]
|
||||||
@@ -11,10 +11,10 @@ config_version=5
|
|||||||
[application]
|
[application]
|
||||||
|
|
||||||
config/name="Archipelago Game"
|
config/name="Archipelago Game"
|
||||||
config/version="beta-1.3"
|
config/version="beta-1.5"
|
||||||
run/main_scene="uid://dqgxg3i307lvr"
|
run/main_scene="uid://dqgxg3i307lvr"
|
||||||
config/features=PackedStringArray("4.6", "Forward Plus")
|
config/features=PackedStringArray("4.6", "Forward Plus")
|
||||||
config/icon="res://icon.svg"
|
config/icon="uid://ckbsqf4p5xu44"
|
||||||
|
|
||||||
[autoload]
|
[autoload]
|
||||||
|
|
||||||
@@ -23,6 +23,8 @@ GameManager="*uid://cb4tuxriixfqs"
|
|||||||
GroupUtils="*uid://bk7o4drbfh24p"
|
GroupUtils="*uid://bk7o4drbfh24p"
|
||||||
MapLoader="*uid://c4jogxtdi3m13"
|
MapLoader="*uid://c4jogxtdi3m13"
|
||||||
InputManager="*uid://dnbg1dpjcq6vk"
|
InputManager="*uid://dnbg1dpjcq6vk"
|
||||||
|
PersistenceManager="*uid://dl2kg1qu0ymi7"
|
||||||
|
ComponentUtils="*uid://cf5j2r4gpceng"
|
||||||
|
|
||||||
[dotnet]
|
[dotnet]
|
||||||
|
|
||||||
@@ -37,6 +39,7 @@ folder_colors={
|
|||||||
"res://Global Managers/": "red",
|
"res://Global Managers/": "red",
|
||||||
"res://Main/": "gray",
|
"res://Main/": "gray",
|
||||||
"res://Maps/": "green",
|
"res://Maps/": "green",
|
||||||
|
"res://Persistence/": "blue",
|
||||||
"res://Resources/": "orange",
|
"res://Resources/": "orange",
|
||||||
"res://Scripts/": "red",
|
"res://Scripts/": "red",
|
||||||
"res://UI/": "yellow"
|
"res://UI/": "yellow"
|
||||||
|
|||||||
Reference in New Issue
Block a user