Compare commits
No commits in common. "61f8cbb62a6a93bf2604b3ec847930885ea06336" and "93aa31c38eba7f368538319d5547324316a2fb66" have entirely different histories.
61f8cbb62a
...
93aa31c38e
|
|
@ -1,9 +0,0 @@
|
|||
[gd_scene load_steps=2 format=3 uid="uid://bgxnvmxg2jsx2"]
|
||||
|
||||
[ext_resource type="PackedScene" uid="uid://b4ojkr2fq8xjm" path="res://_ui/main_menu/main_menu.tscn" id="1_fcou6"]
|
||||
|
||||
[node name="GameEntry" type="Node"]
|
||||
|
||||
[node name="CanvasLayer" type="CanvasLayer" parent="."]
|
||||
|
||||
[node name="MainMenu" parent="CanvasLayer" instance=ExtResource("1_fcou6")]
|
||||
|
|
@ -1,7 +1,21 @@
|
|||
extends Node2D
|
||||
|
||||
@onready var act_manager: ActManager = $ReedScene/ActManager
|
||||
|
||||
var s := 1
|
||||
|
||||
func _unhandled_input(event: InputEvent) -> void:
|
||||
if event.is_action("ui_down"):
|
||||
Engine.time_scale = .1
|
||||
if act_manager == null:
|
||||
return
|
||||
|
||||
if event.is_action_pressed("ui_right"):
|
||||
s = clampi(s+1,0,2)
|
||||
act_manager.switch_act_with_id(s)
|
||||
|
||||
elif event.is_action_pressed("ui_left"):
|
||||
s = clampi(s-1,0,2)
|
||||
act_manager.switch_act_with_id(s)
|
||||
elif event.is_action_pressed("ui_up"):
|
||||
act_manager.switch_act_with_id(3)
|
||||
elif event.is_action_pressed("ui_down"):
|
||||
act_manager.switch_act_with_id(4)
|
||||
|
|
|
|||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
|
@ -1,47 +0,0 @@
|
|||
[gd_scene load_steps=12 format=3 uid="uid://bj2318o3y68x2"]
|
||||
|
||||
[ext_resource type="Script" uid="uid://ds6jy3s0hhmwt" path="res://_game/DemoScript.gd" id="1_2tycc"]
|
||||
[ext_resource type="PackedScene" uid="uid://cvqehvdjpoar4" path="res://_player/player_controller.tscn" id="2_gslp7"]
|
||||
[ext_resource type="PackedScene" uid="uid://gwhff4qaouxy" path="res://_player/Avatar.tscn" id="3_6jw57"]
|
||||
[ext_resource type="PackedScene" uid="uid://bt55vmoc83l6g" path="res://_game/scenes/l_1_s_1.tscn" id="4_6jw57"]
|
||||
[ext_resource type="PackedScene" uid="uid://c6and5mqr3wv1" path="res://_game/scenes/l_1_s_2.tscn" id="5_2t6pm"]
|
||||
[ext_resource type="PackedScene" uid="uid://0sivr6aig7gm" path="res://_game/scenes/l_1_s_3.tscn" id="6_xkd7q"]
|
||||
[ext_resource type="Script" uid="uid://5e157vdk6175" path="res://addons/reedscene/scene/ReedScene.gd" id="6_xotud"]
|
||||
[ext_resource type="Script" uid="uid://bh066o84byplh" path="res://addons/reedscene/scene/ReedSceneID.gd" id="7_2tycc"]
|
||||
[ext_resource type="Script" uid="uid://dn0ksjoswquf5" path="res://addons/reedscene/scene/SceneManager.gd" id="8_3ihdv"]
|
||||
[ext_resource type="Script" uid="uid://dsgl7lbyjsiif" path="res://addons/reedscene/act/ActManager.gd" id="9_hc6q0"]
|
||||
[ext_resource type="Script" uid="uid://pxjf5vst08eo" path="res://addons/reedscene/prop/PropManager.gd" id="10_mwuv1"]
|
||||
|
||||
[node name="Game" type="Node2D"]
|
||||
script = ExtResource("1_2tycc")
|
||||
|
||||
[node name="PlayerController" parent="." node_paths=PackedStringArray("auto_controlled_avatar") instance=ExtResource("2_gslp7")]
|
||||
auto_controlled_avatar = NodePath("../Avatar")
|
||||
|
||||
[node name="Avatar" parent="." instance=ExtResource("3_6jw57")]
|
||||
position = Vector2(283, 253)
|
||||
collision_mask = 4
|
||||
|
||||
[node name="l1_s1" parent="." instance=ExtResource("4_6jw57")]
|
||||
|
||||
[node name="l1_s2" parent="." instance=ExtResource("5_2t6pm")]
|
||||
debug_log = true
|
||||
|
||||
[node name="l1_s3" parent="." instance=ExtResource("6_xkd7q")]
|
||||
debug_log = true
|
||||
|
||||
[node name="ReedScene" type="Node2D" parent="."]
|
||||
script = ExtResource("6_xotud")
|
||||
metadata/_custom_type_script = "uid://5e157vdk6175"
|
||||
|
||||
[node name="[Invalid!]" type="Node" parent="ReedScene"]
|
||||
script = ExtResource("7_2tycc")
|
||||
|
||||
[node name="SceneManager" type="Node" parent="ReedScene"]
|
||||
script = ExtResource("8_3ihdv")
|
||||
|
||||
[node name="ActManager" type="Node" parent="ReedScene"]
|
||||
script = ExtResource("9_hc6q0")
|
||||
|
||||
[node name="Props" type="Node2D" parent="ReedScene"]
|
||||
script = ExtResource("10_mwuv1")
|
||||
|
|
@ -1,47 +0,0 @@
|
|||
[gd_scene load_steps=12 format=3 uid="uid://bj2318o3y68x2"]
|
||||
|
||||
[ext_resource type="Script" uid="uid://ds6jy3s0hhmwt" path="res://_game/DemoScript.gd" id="1_2tycc"]
|
||||
[ext_resource type="PackedScene" uid="uid://cvqehvdjpoar4" path="res://_player/player_controller.tscn" id="2_gslp7"]
|
||||
[ext_resource type="PackedScene" uid="uid://gwhff4qaouxy" path="res://_player/Avatar.tscn" id="3_6jw57"]
|
||||
[ext_resource type="PackedScene" uid="uid://bt55vmoc83l6g" path="res://_game/scenes/l_1_s_1.tscn" id="4_6jw57"]
|
||||
[ext_resource type="PackedScene" uid="uid://c6and5mqr3wv1" path="res://_game/scenes/l_1_s_2.tscn" id="5_2t6pm"]
|
||||
[ext_resource type="PackedScene" uid="uid://0sivr6aig7gm" path="res://_game/scenes/l_1_s_3.tscn" id="6_xkd7q"]
|
||||
[ext_resource type="Script" uid="uid://5e157vdk6175" path="res://addons/reedscene/scene/ReedScene.gd" id="6_xotud"]
|
||||
[ext_resource type="Script" uid="uid://bh066o84byplh" path="res://addons/reedscene/scene/ReedSceneID.gd" id="7_2tycc"]
|
||||
[ext_resource type="Script" uid="uid://dn0ksjoswquf5" path="res://addons/reedscene/scene/SceneManager.gd" id="8_3ihdv"]
|
||||
[ext_resource type="Script" uid="uid://dsgl7lbyjsiif" path="res://addons/reedscene/act/ActManager.gd" id="9_hc6q0"]
|
||||
[ext_resource type="Script" uid="uid://pxjf5vst08eo" path="res://addons/reedscene/prop/PropManager.gd" id="10_mwuv1"]
|
||||
|
||||
[node name="Game" type="Node2D"]
|
||||
script = ExtResource("1_2tycc")
|
||||
|
||||
[node name="PlayerController" parent="." node_paths=PackedStringArray("auto_controlled_avatar") instance=ExtResource("2_gslp7")]
|
||||
auto_controlled_avatar = NodePath("../Avatar")
|
||||
|
||||
[node name="Avatar" parent="." instance=ExtResource("3_6jw57")]
|
||||
position = Vector2(283, 253)
|
||||
collision_mask = 4
|
||||
|
||||
[node name="l1_s1" parent="." instance=ExtResource("4_6jw57")]
|
||||
|
||||
[node name="l1_s2" parent="." instance=ExtResource("5_2t6pm")]
|
||||
debug_log = true
|
||||
|
||||
[node name="l1_s3" parent="." instance=ExtResource("6_xkd7q")]
|
||||
debug_log = true
|
||||
|
||||
[node name="ReedScene" type="Node2D" parent="."]
|
||||
script = ExtResource("6_xotud")
|
||||
metadata/_custom_type_script = "uid://5e157vdk6175"
|
||||
|
||||
[node name="[Invalid!]" type="Node" parent="ReedScene"]
|
||||
script = ExtResource("7_2tycc")
|
||||
|
||||
[node name="SceneManager" type="Node" parent="ReedScene"]
|
||||
script = ExtResource("8_3ihdv")
|
||||
|
||||
[node name="ActManager" type="Node" parent="ReedScene"]
|
||||
script = ExtResource("9_hc6q0")
|
||||
|
||||
[node name="Props" type="Node2D" parent="ReedScene"]
|
||||
script = ExtResource("10_mwuv1")
|
||||
|
|
@ -1,47 +0,0 @@
|
|||
[gd_scene load_steps=12 format=3 uid="uid://bj2318o3y68x2"]
|
||||
|
||||
[ext_resource type="Script" uid="uid://ds6jy3s0hhmwt" path="res://_game/DemoScript.gd" id="1_2tycc"]
|
||||
[ext_resource type="PackedScene" uid="uid://cvqehvdjpoar4" path="res://_player/player_controller.tscn" id="2_gslp7"]
|
||||
[ext_resource type="PackedScene" uid="uid://gwhff4qaouxy" path="res://_player/Avatar.tscn" id="3_6jw57"]
|
||||
[ext_resource type="PackedScene" uid="uid://bt55vmoc83l6g" path="res://_game/scenes/l_1_s_1.tscn" id="4_6jw57"]
|
||||
[ext_resource type="PackedScene" uid="uid://c6and5mqr3wv1" path="res://_game/scenes/l_1_s_2.tscn" id="5_2t6pm"]
|
||||
[ext_resource type="PackedScene" uid="uid://0sivr6aig7gm" path="res://_game/scenes/l_1_s_3.tscn" id="6_xkd7q"]
|
||||
[ext_resource type="Script" uid="uid://5e157vdk6175" path="res://addons/reedscene/scene/ReedScene.gd" id="6_xotud"]
|
||||
[ext_resource type="Script" uid="uid://bh066o84byplh" path="res://addons/reedscene/scene/ReedSceneID.gd" id="7_2tycc"]
|
||||
[ext_resource type="Script" uid="uid://dn0ksjoswquf5" path="res://addons/reedscene/scene/SceneManager.gd" id="8_3ihdv"]
|
||||
[ext_resource type="Script" uid="uid://dsgl7lbyjsiif" path="res://addons/reedscene/act/ActManager.gd" id="9_hc6q0"]
|
||||
[ext_resource type="Script" uid="uid://pxjf5vst08eo" path="res://addons/reedscene/prop/PropManager.gd" id="10_mwuv1"]
|
||||
|
||||
[node name="Game" type="Node2D"]
|
||||
script = ExtResource("1_2tycc")
|
||||
|
||||
[node name="PlayerController" parent="." node_paths=PackedStringArray("auto_controlled_avatar") instance=ExtResource("2_gslp7")]
|
||||
auto_controlled_avatar = NodePath("../Avatar")
|
||||
|
||||
[node name="Avatar" parent="." instance=ExtResource("3_6jw57")]
|
||||
position = Vector2(283, 253)
|
||||
collision_mask = 4
|
||||
|
||||
[node name="l1_s1" parent="." instance=ExtResource("4_6jw57")]
|
||||
|
||||
[node name="l1_s2" parent="." instance=ExtResource("5_2t6pm")]
|
||||
debug_log = true
|
||||
|
||||
[node name="l1_s3" parent="." instance=ExtResource("6_xkd7q")]
|
||||
debug_log = true
|
||||
|
||||
[node name="ReedScene" type="Node2D" parent="."]
|
||||
script = ExtResource("6_xotud")
|
||||
metadata/_custom_type_script = "uid://5e157vdk6175"
|
||||
|
||||
[node name="[Invalid!]" type="Node" parent="ReedScene"]
|
||||
script = ExtResource("7_2tycc")
|
||||
|
||||
[node name="SceneManager" type="Node" parent="ReedScene"]
|
||||
script = ExtResource("8_3ihdv")
|
||||
|
||||
[node name="ActManager" type="Node" parent="ReedScene"]
|
||||
script = ExtResource("9_hc6q0")
|
||||
|
||||
[node name="Props" type="Node2D" parent="ReedScene"]
|
||||
script = ExtResource("10_mwuv1")
|
||||
|
|
@ -1,47 +0,0 @@
|
|||
[gd_scene load_steps=12 format=3 uid="uid://bj2318o3y68x2"]
|
||||
|
||||
[ext_resource type="Script" uid="uid://ds6jy3s0hhmwt" path="res://_game/DemoScript.gd" id="1_2tycc"]
|
||||
[ext_resource type="PackedScene" uid="uid://cvqehvdjpoar4" path="res://_player/player_controller.tscn" id="2_gslp7"]
|
||||
[ext_resource type="PackedScene" uid="uid://gwhff4qaouxy" path="res://_player/Avatar.tscn" id="3_6jw57"]
|
||||
[ext_resource type="PackedScene" uid="uid://bt55vmoc83l6g" path="res://_game/scenes/l_1_s_1.tscn" id="4_6jw57"]
|
||||
[ext_resource type="PackedScene" uid="uid://c6and5mqr3wv1" path="res://_game/scenes/l_1_s_2.tscn" id="5_2t6pm"]
|
||||
[ext_resource type="PackedScene" uid="uid://0sivr6aig7gm" path="res://_game/scenes/l_1_s_3.tscn" id="6_xkd7q"]
|
||||
[ext_resource type="Script" uid="uid://5e157vdk6175" path="res://addons/reedscene/scene/ReedScene.gd" id="6_xotud"]
|
||||
[ext_resource type="Script" uid="uid://bh066o84byplh" path="res://addons/reedscene/scene/ReedSceneID.gd" id="7_2tycc"]
|
||||
[ext_resource type="Script" uid="uid://dn0ksjoswquf5" path="res://addons/reedscene/scene/SceneManager.gd" id="8_3ihdv"]
|
||||
[ext_resource type="Script" uid="uid://dsgl7lbyjsiif" path="res://addons/reedscene/act/ActManager.gd" id="9_hc6q0"]
|
||||
[ext_resource type="Script" uid="uid://pxjf5vst08eo" path="res://addons/reedscene/prop/PropManager.gd" id="10_mwuv1"]
|
||||
|
||||
[node name="Game" type="Node2D"]
|
||||
script = ExtResource("1_2tycc")
|
||||
|
||||
[node name="PlayerController" parent="." node_paths=PackedStringArray("auto_controlled_avatar") instance=ExtResource("2_gslp7")]
|
||||
auto_controlled_avatar = NodePath("../Avatar")
|
||||
|
||||
[node name="Avatar" parent="." instance=ExtResource("3_6jw57")]
|
||||
position = Vector2(283, 253)
|
||||
collision_mask = 4
|
||||
|
||||
[node name="l1_s1" parent="." instance=ExtResource("4_6jw57")]
|
||||
|
||||
[node name="l1_s2" parent="." instance=ExtResource("5_2t6pm")]
|
||||
debug_log = true
|
||||
|
||||
[node name="l1_s3" parent="." instance=ExtResource("6_xkd7q")]
|
||||
debug_log = true
|
||||
|
||||
[node name="ReedScene" type="Node2D" parent="."]
|
||||
script = ExtResource("6_xotud")
|
||||
metadata/_custom_type_script = "uid://5e157vdk6175"
|
||||
|
||||
[node name="[Invalid!]" type="Node" parent="ReedScene"]
|
||||
script = ExtResource("7_2tycc")
|
||||
|
||||
[node name="SceneManager" type="Node" parent="ReedScene"]
|
||||
script = ExtResource("8_3ihdv")
|
||||
|
||||
[node name="ActManager" type="Node" parent="ReedScene"]
|
||||
script = ExtResource("9_hc6q0")
|
||||
|
||||
[node name="Props" type="Node2D" parent="ReedScene"]
|
||||
script = ExtResource("10_mwuv1")
|
||||
|
|
@ -1,47 +0,0 @@
|
|||
[gd_scene load_steps=12 format=3 uid="uid://bj2318o3y68x2"]
|
||||
|
||||
[ext_resource type="Script" uid="uid://ds6jy3s0hhmwt" path="res://_game/DemoScript.gd" id="1_2tycc"]
|
||||
[ext_resource type="PackedScene" uid="uid://cvqehvdjpoar4" path="res://_player/player_controller.tscn" id="2_gslp7"]
|
||||
[ext_resource type="PackedScene" uid="uid://gwhff4qaouxy" path="res://_player/Avatar.tscn" id="3_6jw57"]
|
||||
[ext_resource type="PackedScene" uid="uid://bt55vmoc83l6g" path="res://_game/scenes/l_1_s_1.tscn" id="4_6jw57"]
|
||||
[ext_resource type="PackedScene" uid="uid://c6and5mqr3wv1" path="res://_game/scenes/l_1_s_2.tscn" id="5_2t6pm"]
|
||||
[ext_resource type="PackedScene" uid="uid://0sivr6aig7gm" path="res://_game/scenes/l_1_s_3.tscn" id="6_xkd7q"]
|
||||
[ext_resource type="Script" uid="uid://5e157vdk6175" path="res://addons/reedscene/scene/ReedScene.gd" id="6_xotud"]
|
||||
[ext_resource type="Script" uid="uid://bh066o84byplh" path="res://addons/reedscene/scene/ReedSceneID.gd" id="7_2tycc"]
|
||||
[ext_resource type="Script" uid="uid://dn0ksjoswquf5" path="res://addons/reedscene/scene/SceneManager.gd" id="8_3ihdv"]
|
||||
[ext_resource type="Script" uid="uid://dsgl7lbyjsiif" path="res://addons/reedscene/act/ActManager.gd" id="9_hc6q0"]
|
||||
[ext_resource type="Script" uid="uid://pxjf5vst08eo" path="res://addons/reedscene/prop/PropManager.gd" id="10_mwuv1"]
|
||||
|
||||
[node name="Game" type="Node2D"]
|
||||
script = ExtResource("1_2tycc")
|
||||
|
||||
[node name="PlayerController" parent="." node_paths=PackedStringArray("auto_controlled_avatar") instance=ExtResource("2_gslp7")]
|
||||
auto_controlled_avatar = NodePath("../Avatar")
|
||||
|
||||
[node name="Avatar" parent="." instance=ExtResource("3_6jw57")]
|
||||
position = Vector2(283, 253)
|
||||
collision_mask = 4
|
||||
|
||||
[node name="l1_s1" parent="." instance=ExtResource("4_6jw57")]
|
||||
|
||||
[node name="l1_s2" parent="." instance=ExtResource("5_2t6pm")]
|
||||
debug_log = true
|
||||
|
||||
[node name="l1_s3" parent="." instance=ExtResource("6_xkd7q")]
|
||||
debug_log = true
|
||||
|
||||
[node name="ReedScene" type="Node2D" parent="."]
|
||||
script = ExtResource("6_xotud")
|
||||
metadata/_custom_type_script = "uid://5e157vdk6175"
|
||||
|
||||
[node name="[Invalid!]" type="Node" parent="ReedScene"]
|
||||
script = ExtResource("7_2tycc")
|
||||
|
||||
[node name="SceneManager" type="Node" parent="ReedScene"]
|
||||
script = ExtResource("8_3ihdv")
|
||||
|
||||
[node name="ActManager" type="Node" parent="ReedScene"]
|
||||
script = ExtResource("9_hc6q0")
|
||||
|
||||
[node name="Props" type="Node2D" parent="ReedScene"]
|
||||
script = ExtResource("10_mwuv1")
|
||||
|
|
@ -1,47 +0,0 @@
|
|||
[gd_scene load_steps=12 format=3 uid="uid://bj2318o3y68x2"]
|
||||
|
||||
[ext_resource type="Script" uid="uid://ds6jy3s0hhmwt" path="res://_game/DemoScript.gd" id="1_2tycc"]
|
||||
[ext_resource type="PackedScene" uid="uid://cvqehvdjpoar4" path="res://_player/player_controller.tscn" id="2_gslp7"]
|
||||
[ext_resource type="PackedScene" uid="uid://gwhff4qaouxy" path="res://_player/Avatar.tscn" id="3_6jw57"]
|
||||
[ext_resource type="PackedScene" uid="uid://bt55vmoc83l6g" path="res://_game/scenes/l_1_s_1.tscn" id="4_6jw57"]
|
||||
[ext_resource type="PackedScene" uid="uid://c6and5mqr3wv1" path="res://_game/scenes/l_1_s_2.tscn" id="5_2t6pm"]
|
||||
[ext_resource type="PackedScene" uid="uid://0sivr6aig7gm" path="res://_game/scenes/l_1_s_3.tscn" id="6_xkd7q"]
|
||||
[ext_resource type="Script" uid="uid://5e157vdk6175" path="res://addons/reedscene/scene/ReedScene.gd" id="6_xotud"]
|
||||
[ext_resource type="Script" uid="uid://bh066o84byplh" path="res://addons/reedscene/scene/ReedSceneID.gd" id="7_2tycc"]
|
||||
[ext_resource type="Script" uid="uid://dn0ksjoswquf5" path="res://addons/reedscene/scene/SceneManager.gd" id="8_3ihdv"]
|
||||
[ext_resource type="Script" uid="uid://dsgl7lbyjsiif" path="res://addons/reedscene/act/ActManager.gd" id="9_hc6q0"]
|
||||
[ext_resource type="Script" uid="uid://pxjf5vst08eo" path="res://addons/reedscene/prop/PropManager.gd" id="10_mwuv1"]
|
||||
|
||||
[node name="Game" type="Node2D"]
|
||||
script = ExtResource("1_2tycc")
|
||||
|
||||
[node name="PlayerController" parent="." node_paths=PackedStringArray("auto_controlled_avatar") instance=ExtResource("2_gslp7")]
|
||||
auto_controlled_avatar = NodePath("../Avatar")
|
||||
|
||||
[node name="Avatar" parent="." instance=ExtResource("3_6jw57")]
|
||||
position = Vector2(283, 253)
|
||||
collision_mask = 4
|
||||
|
||||
[node name="l1_s1" parent="." instance=ExtResource("4_6jw57")]
|
||||
|
||||
[node name="l1_s2" parent="." instance=ExtResource("5_2t6pm")]
|
||||
debug_log = true
|
||||
|
||||
[node name="l1_s3" parent="." instance=ExtResource("6_xkd7q")]
|
||||
debug_log = true
|
||||
|
||||
[node name="ReedScene" type="Node2D" parent="."]
|
||||
script = ExtResource("6_xotud")
|
||||
metadata/_custom_type_script = "uid://5e157vdk6175"
|
||||
|
||||
[node name="[Invalid!]" type="Node" parent="ReedScene"]
|
||||
script = ExtResource("7_2tycc")
|
||||
|
||||
[node name="SceneManager" type="Node" parent="ReedScene"]
|
||||
script = ExtResource("8_3ihdv")
|
||||
|
||||
[node name="ActManager" type="Node" parent="ReedScene"]
|
||||
script = ExtResource("9_hc6q0")
|
||||
|
||||
[node name="Props" type="Node2D" parent="ReedScene"]
|
||||
script = ExtResource("10_mwuv1")
|
||||
File diff suppressed because one or more lines are too long
|
|
@ -1,7 +0,0 @@
|
|||
extends SceneManager
|
||||
|
||||
|
||||
|
||||
func _on_player_trigger_volumn_player_entered(body: CharacterBody2D) -> void:
|
||||
_act_manager.switch_act_with_id(1)
|
||||
$"../../ReedScene/ActManager".switch_act_with_id(0)
|
||||
|
|
@ -1 +0,0 @@
|
|||
uid://d3600a4hjp6y6
|
||||
|
|
@ -1,4 +0,0 @@
|
|||
extends Node2D
|
||||
|
||||
func _ready() -> void:
|
||||
CameraSystem.register_player_camera(self)
|
||||
|
|
@ -1 +0,0 @@
|
|||
uid://crgac4manhoud
|
||||
|
|
@ -1,231 +0,0 @@
|
|||
[gd_scene load_steps=32 format=4 uid="uid://bt55vmoc83l6g"]
|
||||
|
||||
[ext_resource type="Script" uid="uid://5e157vdk6175" path="res://addons/reedscene/scene/ReedScene.gd" id="1_wiqi4"]
|
||||
[ext_resource type="Script" uid="uid://bh066o84byplh" path="res://addons/reedscene/scene/ReedSceneID.gd" id="2_1t0dx"]
|
||||
[ext_resource type="Script" uid="uid://43ula8nd3yl7" path="res://_game/scenes/scripts/s_l1_s1.gd" id="3_1t0dx"]
|
||||
[ext_resource type="Script" uid="uid://dsgl7lbyjsiif" path="res://addons/reedscene/act/ActManager.gd" id="4_a224g"]
|
||||
[ext_resource type="Script" uid="uid://fxpk2ot6otfh" path="res://addons/reedscene/act/Act.gd" id="5_a224g"]
|
||||
[ext_resource type="Script" uid="uid://pxjf5vst08eo" path="res://addons/reedscene/prop/PropManager.gd" id="5_fyfyw"]
|
||||
[ext_resource type="PackedScene" uid="uid://b5nx4dntm0gyn" path="res://_props/door_manager/event_trigger_door.tscn" id="6_8hwae"]
|
||||
[ext_resource type="Script" uid="uid://baqgorvlumyju" path="res://addons/reedscene/act/SingleAct.gd" id="6_fyfyw"]
|
||||
[ext_resource type="Script" uid="uid://b4menkyub4ce7" path="res://addons/reedscene/prop/PropComponent.gd" id="7_s6kod"]
|
||||
[ext_resource type="Script" uid="uid://di41kt2tj34c2" path="res://addons/reedscene/prop/StateManager.gd" id="8_1dh04"]
|
||||
[ext_resource type="Script" uid="uid://7lml6d1t5xtq" path="res://addons/reedscene/prop/PropState.gd" id="9_648qh"]
|
||||
[ext_resource type="PackedScene" uid="uid://1l06de041i40" path="res://_levels/l_level_1.tscn" id="10_25twt"]
|
||||
[ext_resource type="PackedScene" uid="uid://c3mievyfhx6ni" path="res://_props/coin/coin.tscn" id="11_1t0dx"]
|
||||
[ext_resource type="Script" uid="uid://cdvgq0xqdbagk" path="res://addons/reedscene/prop/ReedPropEffect.gd" id="12_fyfyw"]
|
||||
[ext_resource type="Script" uid="uid://jeybblac0kg2" path="res://addons/reedscene/prop/ReedTransition.gd" id="13_8hwae"]
|
||||
[ext_resource type="PackedScene" uid="uid://mi4omkkocmc0" path="res://_props/_prefabs/camera/scene_static_camera.tscn" id="14_s6kod"]
|
||||
|
||||
[sub_resource type="Resource" id="Resource_s6kod"]
|
||||
script = ExtResource("6_fyfyw")
|
||||
|
||||
[sub_resource type="Resource" id="Resource_1dh04"]
|
||||
script = ExtResource("6_fyfyw")
|
||||
|
||||
[sub_resource type="Resource" id="Resource_spdfw"]
|
||||
script = ExtResource("6_fyfyw")
|
||||
state_id = 1
|
||||
|
||||
[sub_resource type="Resource" id="Resource_ykqcq"]
|
||||
script = ExtResource("5_a224g")
|
||||
prop_state_map = Dictionary[int, ExtResource("6_fyfyw")]({
|
||||
0: SubResource("Resource_s6kod"),
|
||||
1: SubResource("Resource_1dh04"),
|
||||
2: SubResource("Resource_spdfw")
|
||||
})
|
||||
|
||||
[sub_resource type="Resource" id="Resource_gu0l6"]
|
||||
script = ExtResource("6_fyfyw")
|
||||
state_id = 1
|
||||
use_trans = true
|
||||
metadata/_custom_type_script = "uid://baqgorvlumyju"
|
||||
|
||||
[sub_resource type="Resource" id="Resource_648qh"]
|
||||
script = ExtResource("5_a224g")
|
||||
prop_state_map = Dictionary[int, ExtResource("6_fyfyw")]({
|
||||
0: SubResource("Resource_gu0l6")
|
||||
})
|
||||
|
||||
[sub_resource type="Resource" id="Resource_onwc0"]
|
||||
script = ExtResource("6_fyfyw")
|
||||
use_trans = true
|
||||
metadata/_custom_type_script = "uid://baqgorvlumyju"
|
||||
|
||||
[sub_resource type="Resource" id="Resource_7tspm"]
|
||||
script = ExtResource("6_fyfyw")
|
||||
state_id = 1
|
||||
use_trans = true
|
||||
metadata/_custom_type_script = "uid://baqgorvlumyju"
|
||||
|
||||
[sub_resource type="Resource" id="Resource_jh33u"]
|
||||
script = ExtResource("5_a224g")
|
||||
prop_state_map = Dictionary[int, ExtResource("6_fyfyw")]({
|
||||
0: SubResource("Resource_onwc0"),
|
||||
1: SubResource("Resource_7tspm")
|
||||
})
|
||||
|
||||
[sub_resource type="Resource" id="Resource_fyfyw"]
|
||||
script = ExtResource("12_fyfyw")
|
||||
effect_type = 1
|
||||
value = null
|
||||
func_name = &"reset_door_state_id"
|
||||
func_args = [0]
|
||||
metadata/_custom_type_script = "uid://cdvgq0xqdbagk"
|
||||
|
||||
[sub_resource type="Resource" id="Resource_bco80"]
|
||||
script = ExtResource("12_fyfyw")
|
||||
effect_type = 1
|
||||
value = null
|
||||
func_name = &"door_close"
|
||||
metadata/_custom_type_script = "uid://cdvgq0xqdbagk"
|
||||
|
||||
[sub_resource type="Resource" id="Resource_22pon"]
|
||||
script = ExtResource("12_fyfyw")
|
||||
effect_type = 1
|
||||
value = null
|
||||
func_name = &"reset_door_state_id"
|
||||
func_args = [1]
|
||||
metadata/_custom_type_script = "uid://cdvgq0xqdbagk"
|
||||
|
||||
[sub_resource type="Resource" id="Resource_25twt"]
|
||||
script = ExtResource("12_fyfyw")
|
||||
effect_type = 1
|
||||
value = null
|
||||
func_name = &"door_open"
|
||||
metadata/_custom_type_script = "uid://cdvgq0xqdbagk"
|
||||
|
||||
[sub_resource type="Resource" id="Resource_rlswc"]
|
||||
script = ExtResource("12_fyfyw")
|
||||
target_type = 1
|
||||
child_node_name = &"Tool"
|
||||
effect_type = 1
|
||||
value = null
|
||||
func_name = &"release_self_priority"
|
||||
metadata/_custom_type_script = "uid://cdvgq0xqdbagk"
|
||||
|
||||
[sub_resource type="Resource" id="Resource_1vufk"]
|
||||
script = ExtResource("12_fyfyw")
|
||||
target_type = 1
|
||||
child_node_name = &"Tool"
|
||||
effect_type = 1
|
||||
value = null
|
||||
func_name = &"hold_self_priority"
|
||||
metadata/_custom_type_script = "uid://cdvgq0xqdbagk"
|
||||
|
||||
[node name="l1_s1" type="Node2D"]
|
||||
script = ExtResource("1_wiqi4")
|
||||
debug_log = true
|
||||
metadata/_custom_type_script = "uid://5e157vdk6175"
|
||||
|
||||
[node name="[ID_ 9900001]" type="Node" parent="."]
|
||||
script = ExtResource("2_1t0dx")
|
||||
scene_id = 9900001
|
||||
|
||||
[node name="SceneManager" type="Node" parent="."]
|
||||
script = ExtResource("3_1t0dx")
|
||||
|
||||
[node name="ActManager" type="Node" parent="."]
|
||||
script = ExtResource("4_a224g")
|
||||
prop_state_map = Dictionary[int, ExtResource("5_a224g")]({
|
||||
0: SubResource("Resource_ykqcq"),
|
||||
1: SubResource("Resource_648qh"),
|
||||
2: SubResource("Resource_jh33u")
|
||||
})
|
||||
|
||||
[node name="Props" type="Node2D" parent="."]
|
||||
script = ExtResource("5_fyfyw")
|
||||
|
||||
[node name="EventTriggerDoor" parent="Props" instance=ExtResource("6_8hwae")]
|
||||
position = Vector2(656, 268)
|
||||
|
||||
[node name="[Prop_0000]" type="Node" parent="Props/EventTriggerDoor"]
|
||||
script = ExtResource("7_s6kod")
|
||||
prop_id = 0
|
||||
|
||||
[node name="States" type="Node" parent="Props/EventTriggerDoor/[Prop_0000]"]
|
||||
script = ExtResource("8_1dh04")
|
||||
|
||||
[node name="[ID_0] Close" type="Node" parent="Props/EventTriggerDoor/[Prop_0000]/States"]
|
||||
script = ExtResource("9_648qh")
|
||||
state_id = 0
|
||||
effects = Array[ExtResource("12_fyfyw")]([SubResource("Resource_fyfyw")])
|
||||
|
||||
[node name="From1" type="Node" parent="Props/EventTriggerDoor/[Prop_0000]/States/[ID_0] Close"]
|
||||
script = ExtResource("13_8hwae")
|
||||
from_state_id = 1
|
||||
effects = Array[ExtResource("12_fyfyw")]([SubResource("Resource_bco80")])
|
||||
metadata/_custom_type_script = "uid://jeybblac0kg2"
|
||||
|
||||
[node name="[ID_1] Open" type="Node" parent="Props/EventTriggerDoor/[Prop_0000]/States"]
|
||||
script = ExtResource("9_648qh")
|
||||
state_id = 1
|
||||
effects = Array[ExtResource("12_fyfyw")]([SubResource("Resource_22pon")])
|
||||
|
||||
[node name="From0" type="Node" parent="Props/EventTriggerDoor/[Prop_0000]/States/[ID_1] Open"]
|
||||
script = ExtResource("13_8hwae")
|
||||
from_state_id = 0
|
||||
effects = Array[ExtResource("12_fyfyw")]([SubResource("Resource_25twt")])
|
||||
metadata/_custom_type_script = "uid://jeybblac0kg2"
|
||||
|
||||
[node name="EventTriggerDoor2" parent="Props" instance=ExtResource("6_8hwae")]
|
||||
position = Vector2(15, 270)
|
||||
|
||||
[node name="[Prop_0001]" type="Node" parent="Props/EventTriggerDoor2"]
|
||||
script = ExtResource("7_s6kod")
|
||||
prop_id = 1
|
||||
|
||||
[node name="States" type="Node" parent="Props/EventTriggerDoor2/[Prop_0001]"]
|
||||
script = ExtResource("8_1dh04")
|
||||
|
||||
[node name="[ID_0] Close" type="Node" parent="Props/EventTriggerDoor2/[Prop_0001]/States"]
|
||||
script = ExtResource("9_648qh")
|
||||
state_id = 0
|
||||
effects = Array[ExtResource("12_fyfyw")]([SubResource("Resource_fyfyw")])
|
||||
|
||||
[node name="From1" type="Node" parent="Props/EventTriggerDoor2/[Prop_0001]/States/[ID_0] Close"]
|
||||
script = ExtResource("13_8hwae")
|
||||
from_state_id = 1
|
||||
effects = Array[ExtResource("12_fyfyw")]([SubResource("Resource_bco80")])
|
||||
metadata/_custom_type_script = "uid://jeybblac0kg2"
|
||||
|
||||
[node name="[ID_1] Open" type="Node" parent="Props/EventTriggerDoor2/[Prop_0001]/States"]
|
||||
script = ExtResource("9_648qh")
|
||||
state_id = 1
|
||||
effects = Array[ExtResource("12_fyfyw")]([SubResource("Resource_22pon")])
|
||||
|
||||
[node name="From0" type="Node" parent="Props/EventTriggerDoor2/[Prop_0001]/States/[ID_1] Open"]
|
||||
script = ExtResource("13_8hwae")
|
||||
from_state_id = 0
|
||||
effects = Array[ExtResource("12_fyfyw")]([SubResource("Resource_25twt")])
|
||||
metadata/_custom_type_script = "uid://jeybblac0kg2"
|
||||
|
||||
[node name="SceneStaticCamera" parent="Props" instance=ExtResource("14_s6kod")]
|
||||
position = Vector2(334, 183)
|
||||
tween_on_load = false
|
||||
draw_limits = true
|
||||
|
||||
[node name="[Prop_0002]" type="Node" parent="Props/SceneStaticCamera"]
|
||||
script = ExtResource("7_s6kod")
|
||||
prop_id = 2
|
||||
|
||||
[node name="States" type="Node" parent="Props/SceneStaticCamera/[Prop_0002]"]
|
||||
script = ExtResource("8_1dh04")
|
||||
|
||||
[node name="[ID_0] Disable" type="Node" parent="Props/SceneStaticCamera/[Prop_0002]/States"]
|
||||
script = ExtResource("9_648qh")
|
||||
state_id = 0
|
||||
effects = Array[ExtResource("12_fyfyw")]([SubResource("Resource_rlswc")])
|
||||
|
||||
[node name="[ID_1] Enable" type="Node" parent="Props/SceneStaticCamera/[Prop_0002]/States"]
|
||||
script = ExtResource("9_648qh")
|
||||
state_id = 1
|
||||
effects = Array[ExtResource("12_fyfyw")]([SubResource("Resource_1vufk")])
|
||||
|
||||
[node name="l1_s1_tile" parent="." groups=["GRAPABLE"] instance=ExtResource("10_25twt")]
|
||||
tile_map_data = PackedByteArray("AAAAAAQAAAAAAAAAAAAAAAUAAAAAAAAAAAAAAAYAAAAAAAAAAAAAAAcAAAAAAAAAAAAAAAgAAAAAAAAAAAAAAAkAAAAAAAAAAAAAAAoAAAAAAAAAAAAAAAsAAAAAAAAAAAAAAAwAAAAAAAAAAAAAABQAAAAAAAAAAAAAABUAAAAAAAAAAAAAABYAAAAAAAAAAAABAAQAAAAAAAAAAAABAAUAAAAAAAAAAAABAAYAAAAAAAAAAAABAAcAAAAAAAAAAAABAAgAAAAAAAAAAAABAAkAAAAAAAAAAAABAAoAAAAAAAAAAAABAAsAAAAAAAAAAAABAAwAAAAAAAAAAAABABQAAAAAAAAAAAABABUAAAAAAAAAAAABABYAAAAAAAAAAAACABQAAAAAAAAAAAACABUAAAAAAAAAAAACABYAAAAAAAAAAAADAAAAAAAAAAAAAAADAAEAAAAAAAAAAAADAAIAAAAAAAAAAAADABQAAAAAAAAAAAADABUAAAAAAAAAAAADABYAAAAAAAAAAAAEAAAAAAAAAAAAAAAEAAEAAAAAAAAAAAAEAAIAAAAAAAAAAAAEABQAAAAAAAAAAAAEABUAAAAAAAAAAAAEABYAAAAAAAAAAAAFAAAAAAAAAAAAAAAFAAEAAAAAAAAAAAAFAAIAAAAAAAAAAAAFABQAAAAAAAAAAAAFABUAAAAAAAAAAAAFABYAAAAAAAAAAAAGABQAAAAAAAAAAAAGABUAAAAAAAAAAAAGABYAAAAAAAAAAAAHABQAAAAAAAAAAAAHABUAAAAAAAAAAAAHABYAAAAAAAAAAAAIABQAAAAAAAAAAAAIABUAAAAAAAAAAAAIABYAAAAAAAAAAAAJABQAAAAAAAAAAAAJABUAAAAAAAAAAAAJABYAAAAAAAAAAAAKABQAAAAAAAAAAAAKABUAAAAAAAAAAAAKABYAAAAAAAAAAAALABQAAAAAAAAAAAALABUAAAAAAAAAAAALABYAAAAAAAAAAAAMABQAAAAAAAAAAAAMABUAAAAAAAAAAAAMABYAAAAAAAAAAAANABQAAAAAAAAAAAANABUAAAAAAAAAAAANABYAAAAAAAAAAAAOABQAAAAAAAAAAAAOABUAAAAAAAAAAAAOABYAAAAAAAAAAAAPABQAAAAAAAAAAAAPABUAAAAAAAAAAAAPABYAAAAAAAAAAAAQABQAAAAAAAAAAAAQABUAAAAAAAAAAAAQABYAAAAAAAAAAAARABQAAAAAAAAAAAARABUAAAAAAAAAAAARABYAAAAAAAAAAAASABQAAAAAAAAAAAASABUAAAAAAAAAAAASABYAAAAAAAAAAAATABQAAAAAAAAAAAATABUAAAAAAAAAAAATABYAAAAAAAAAAAAUABQAAAAAAAAAAAAUABUAAAAAAAAAAAAUABYAAAAAAAAAAAAVABQAAAAAAAAAAAAVABUAAAAAAAAAAAAVABYAAAAAAAAAAAAGAAAAAAAAAAAAAAAGAAEAAAAAAAAAAAAGAAIAAAAAAAAAAAAHAAAAAAAAAAAAAAAHAAEAAAAAAAAAAAAHAAIAAAAAAAAAAAAIAAAAAAAAAAAAAAAIAAEAAAAAAAAAAAAIAAIAAAAAAAAAAAAJAAAAAAAAAAAAAAAJAAEAAAAAAAAAAAAJAAIAAAAAAAAAAAAKAAAAAAAAAAAAAAAKAAEAAAAAAAAAAAAKAAIAAAAAAAAAAAALAAAAAAAAAAAAAAALAAEAAAAAAAAAAAALAAIAAAAAAAAAAAAMAAAAAAAAAAAAAAAMAAEAAAAAAAAAAAAMAAIAAAAAAAAAAAANAAAAAAAAAAAAAAANAAEAAAAAAAAAAAANAAIAAAAAAAAAAAAOAAAAAAAAAAAAAAAOAAEAAAAAAAAAAAAOAAIAAAAAAAAAAAAcABQAAAAAAAAAAAAcABUAAAAAAAAAAAAcABYAAAAAAAAAAAAdABQAAAAAAAAAAAAdABUAAAAAAAAAAAAdABYAAAAAAAAAAAAeABQAAAAAAAAAAAAeABUAAAAAAAAAAAAeABYAAAAAAAAAAAAfABQAAAAAAAAAAAAfABUAAAAAAAAAAAAfABYAAAAAAAAAAAAgABQAAAAAAAAAAAAgABUAAAAAAAAAAAAgABYAAAAAAAAAAAAhABQAAAAAAAAAAAAhABUAAAAAAAAAAAAhABYAAAAAAAAAAAAiABQAAAAAAAAAAAAiABUAAAAAAAAAAAAiABYAAAAAAAAAAAAjABQAAAAAAAAAAAAjABUAAAAAAAAAAAAjABYAAAAAAAAAAAAkABQAAAAAAAAAAAAkABUAAAAAAAAAAAAkABYAAAAAAAAAAAAlABQAAAAAAAAAAAAlABUAAAAAAAAAAAAlABYAAAAAAAAAAAAmABQAAAAAAAAAAAAmABUAAAAAAAAAAAAmABYAAAAAAAAAAAAnABQAAAAAAAAAAAAnABUAAAAAAAAAAAAnABYAAAAAAAAAAAAoABQAAAAAAAAAAAAoABUAAAAAAAAAAAAoABYAAAAAAAAAAAApABQAAAAAAAAAAAApABUAAAAAAAAAAAApABYAAAAAAAAAAAAWABQAAAAAAAAAAAAWABUAAAAAAAAAAAAWABYAAAAAAAAAAAAbABQAAAAAAAAAAAAbABUAAAAAAAAAAAAbABYAAAAAAAAAAAAXABQAAAAAAAAAAAAXABUAAAAAAAAAAAAXABYAAAAAAAAAAAAYABQAAAAAAAAAAAAYABUAAAAAAAAAAAAYABYAAAAAAAAAAAAZABQAAAAAAAAAAAAZABUAAAAAAAAAAAAZABYAAAAAAAAAAAAaABQAAAAAAAAAAAAaABUAAAAAAAAAAAAaABYAAAAAAAAAAAAPAAAAAAAAAAAAAAAPAAEAAAAAAAAAAAAPAAIAAAAAAAAAAAAQAAAAAAAAAAAAAAAQAAEAAAAAAAAAAAAQAAIAAAAAAAAAAAARAAAAAAAAAAAAAAARAAEAAAAAAAAAAAARAAIAAAAAAAAAAAASAAAAAAAAAAAAAAASAAEAAAAAAAAAAAASAAIAAAAAAAAAAAATAAAAAAAAAAAAAAATAAEAAAAAAAAAAAATAAIAAAAAAAAAAAAUAAAAAAAAAAAAAAAUAAEAAAAAAAAAAAAUAAIAAAAAAAAAAAAVAAAAAAAAAAAAAAAVAAEAAAAAAAAAAAAVAAIAAAAAAAAAAAAWAAAAAAAAAAAAAAAWAAEAAAAAAAAAAAAWAAIAAAAAAAAAAAAXAAAAAAAAAAAAAAAXAAEAAAAAAAAAAAAXAAIAAAAAAAAAAAAYAAAAAAAAAAAAAAAYAAEAAAAAAAAAAAAYAAIAAAAAAAAAAAAZAAAAAAAAAAAAAAAZAAEAAAAAAAAAAAAZAAIAAAAAAAAAAAAaAAAAAAAAAAAAAAAaAAEAAAAAAAAAAAAaAAIAAAAAAAAAAAAbAAAAAAAAAAAAAAAbAAEAAAAAAAAAAAAbAAIAAAAAAAAAAAAcAAAAAAAAAAAAAAAcAAEAAAAAAAAAAAAcAAIAAAAAAAAAAAAdAAAAAAAAAAAAAAAdAAEAAAAAAAAAAAAdAAIAAAAAAAAAAAAeAAAAAAAAAAAAAAAeAAEAAAAAAAAAAAAeAAIAAAAAAAAAAAAfAAAAAAAAAAAAAAAfAAEAAAAAAAAAAAAfAAIAAAAAAAAAAAAgAAAAAAAAAAAAAAAgAAEAAAAAAAAAAAAgAAIAAAAAAAAAAAAhAAAAAAAAAAAAAAAhAAEAAAAAAAAAAAAhAAIAAAAAAAAAAAAiAAAAAAAAAAAAAAAiAAEAAAAAAAAAAAAiAAIAAAAAAAAAAAAjAAAAAAAAAAAAAAAjAAEAAAAAAAAAAAAjAAIAAAAAAAAAAAAkAAAAAAAAAAAAAAAkAAEAAAAAAAAAAAAkAAIAAAAAAAAAAAAlAAAAAAAAAAAAAAAlAAEAAAAAAAAAAAAlAAIAAAAAAAAAAAAmAAAAAAAAAAAAAAAmAAEAAAAAAAAAAAAmAAIAAAAAAAAAAAAnAAAAAAAAAAAAAAAnAAEAAAAAAAAAAAAnAAIAAAAAAAAAAAAoAAAAAAAAAAAAAAAoAAEAAAAAAAAAAAAoAAIAAAAAAAAAAAApAAAAAAAAAAAAAAApAAEAAAAAAAAAAAApAAIAAAAAAAAAAAAoAAMAAAAAAAAAAAAoAAQAAAAAAAAAAAAoAAUAAAAAAAAAAAAoAAYAAAAAAAAAAAAoAAcAAAAAAAAAAAAoAAgAAAAAAAAAAAAoAAkAAAAAAAAAAAAoAAoAAAAAAAAAAAAoAAsAAAAAAAAAAAAoAAwAAAAAAAAAAAApAAMAAAAAAAAAAAApAAQAAAAAAAAAAAApAAUAAAAAAAAAAAApAAYAAAAAAAAAAAApAAcAAAAAAAAAAAApAAgAAAAAAAAAAAApAAkAAAAAAAAAAAApAAoAAAAAAAAAAAApAAsAAAAAAAAAAAApAAwAAAAAAAAAAAA=")
|
||||
|
||||
[node name="Coin" parent="." instance=ExtResource("11_1t0dx")]
|
||||
position = Vector2(596, 291)
|
||||
|
||||
[connection signal="collected" from="Coin" to="SceneManager" method="_on_coin_collected"]
|
||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
|
@ -1,24 +0,0 @@
|
|||
[gd_scene load_steps=6 format=3 uid="uid://jd5d3i4xqj2m"]
|
||||
|
||||
[ext_resource type="Script" uid="uid://5e157vdk6175" path="res://addons/reedscene/scene/ReedScene.gd" id="1_r4clk"]
|
||||
[ext_resource type="Script" uid="uid://bh066o84byplh" path="res://addons/reedscene/scene/ReedSceneID.gd" id="2_oqwc4"]
|
||||
[ext_resource type="Script" uid="uid://dn0ksjoswquf5" path="res://addons/reedscene/scene/SceneManager.gd" id="3_jbgha"]
|
||||
[ext_resource type="Script" uid="uid://dsgl7lbyjsiif" path="res://addons/reedscene/act/ActManager.gd" id="4_w6ro2"]
|
||||
[ext_resource type="Script" uid="uid://pxjf5vst08eo" path="res://addons/reedscene/prop/PropManager.gd" id="5_qmrnk"]
|
||||
|
||||
[node name="l1_s4" type="Node2D"]
|
||||
script = ExtResource("1_r4clk")
|
||||
metadata/_custom_type_script = "uid://5e157vdk6175"
|
||||
|
||||
[node name="[ID_ 9900004]" type="Node" parent="."]
|
||||
script = ExtResource("2_oqwc4")
|
||||
scene_id = 9900004
|
||||
|
||||
[node name="SceneManager" type="Node" parent="."]
|
||||
script = ExtResource("3_jbgha")
|
||||
|
||||
[node name="ActManager" type="Node" parent="."]
|
||||
script = ExtResource("4_w6ro2")
|
||||
|
||||
[node name="Props" type="Node2D" parent="."]
|
||||
script = ExtResource("5_qmrnk")
|
||||
|
|
@ -1,5 +0,0 @@
|
|||
extends SceneManager
|
||||
|
||||
|
||||
func _on_coin_collected(collector: Node2D) -> void:
|
||||
_act_manager.switch_act_with_id(1)
|
||||
|
|
@ -1 +0,0 @@
|
|||
uid://43ula8nd3yl7
|
||||
|
|
@ -1,16 +0,0 @@
|
|||
extends SceneManager
|
||||
|
||||
|
||||
func _on_coin_collected(collector: Node2D) -> void:
|
||||
_act_manager.switch_act_with_id(1)
|
||||
var l1_s1: ReedScene = ReedSceneRegistry.get_scene(9900001)
|
||||
if l1_s1:
|
||||
l1_s1.switch_act_by_id(2)
|
||||
|
||||
|
||||
func _on_player_trigger_volumn_player_entered(body: CharacterBody2D) -> void:
|
||||
_act_manager.switch_act_with_id(2)
|
||||
|
||||
|
||||
func _on_player_trigger_volumn_2_player_entered(body: CharacterBody2D) -> void:
|
||||
_act_manager.switch_act_with_id(3)
|
||||
|
|
@ -1 +0,0 @@
|
|||
uid://bna42bay8yt1m
|
||||
|
|
@ -1,5 +0,0 @@
|
|||
extends SceneManager
|
||||
|
||||
|
||||
func _on_coin_collected(collector: Node2D) -> void:
|
||||
_act_manager.switch_act_with_id(1)
|
||||
|
|
@ -1 +0,0 @@
|
|||
uid://c4gk6pcjk8no3
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
[gd_scene load_steps=43 format=3 uid="uid://gwhff4qaouxy"]
|
||||
[gd_scene load_steps=39 format=3 uid="uid://gwhff4qaouxy"]
|
||||
|
||||
[ext_resource type="Script" uid="uid://dq1g1qp66chwy" path="res://_player/avatar.gd" id="1_rkqpu"]
|
||||
[ext_resource type="Script" uid="uid://isu8onknb75o" path="res://_player/states/character_state_machine.gd" id="1_wvs5h"]
|
||||
|
|
@ -23,6 +23,7 @@
|
|||
[ext_resource type="Script" uid="uid://ca88urm45gx2c" path="res://_player/states/dead.gd" id="17_5r2pj"]
|
||||
[ext_resource type="Script" uid="uid://bqrel2r5hcmxk" path="res://_player/states/grapping.gd" id="19_u7cua"]
|
||||
[ext_resource type="PackedScene" uid="uid://blm8q46h3v2im" path="res://addons/reedcomponent/locomotion/wall_detector.tscn" id="20_air0b"]
|
||||
[ext_resource type="Script" uid="uid://bhexx6mj1xv3q" path="res://addons/phantom_camera/scripts/phantom_camera/phantom_camera_2d.gd" id="20_ogl63"]
|
||||
[ext_resource type="Script" uid="uid://8umksf8e80fw" path="res://addons/phantom_camera/scripts/resources/tween_resource.gd" id="21_5r2pj"]
|
||||
[ext_resource type="Script" uid="uid://bkkkyugppu7sl" path="res://addons/reedcomponent/grap_hook/spawn_hook_component.gd" id="21_p14kj"]
|
||||
[ext_resource type="Script" uid="uid://ta2r2bc1nrwe" path="res://addons/reedfx/vfx/VFXManager.gd" id="24_mwlgv"]
|
||||
|
|
@ -33,13 +34,6 @@
|
|||
[ext_resource type="Resource" uid="uid://do0bnwse614jw" path="res://_player/effect_binding/land_dust.tres" id="26_s5egm"]
|
||||
[ext_resource type="Script" uid="uid://bijoqygv6tncj" path="res://addons/reedcomponent/SingleComponentRemotor.gd" id="28_mxt3b"]
|
||||
[ext_resource type="Resource" uid="uid://bdad4yjv1q0uu" path="res://_player/effect_binding/jump_dust.tres" id="30_hquoe"]
|
||||
[ext_resource type="Script" uid="uid://bhd4nuiu23e7l" path="res://addons/phantom_camera/scripts/phantom_camera/phantom_camera_noise_emitter_2d.gd" id="32_ciuu3"]
|
||||
[ext_resource type="Script" uid="uid://bhexx6mj1xv3q" path="res://addons/phantom_camera/scripts/phantom_camera/phantom_camera_2d.gd" id="32_u7cua"]
|
||||
[ext_resource type="Script" uid="uid://bueehfgv5vnc0" path="res://_player/extra/camera_priority_locker.gd" id="34_1a1t3"]
|
||||
[ext_resource type="Resource" uid="uid://dy1hsviasxfu0" path="res://_shared/camera/camera_shake/base_noise.tres" id="34_01uoa"]
|
||||
|
||||
[sub_resource type="CircleShape2D" id="CircleShape2D_1a1t3"]
|
||||
radius = 3.0
|
||||
|
||||
[sub_resource type="RectangleShape2D" id="RectangleShape2D_qnulu"]
|
||||
size = Vector2(9, 23)
|
||||
|
|
@ -48,7 +42,7 @@ size = Vector2(9, 23)
|
|||
atlas = ExtResource("2_8nsdm")
|
||||
region = Rect2(9, 22, 13, 26)
|
||||
|
||||
[sub_resource type="Resource" id="Resource_1a1t3"]
|
||||
[sub_resource type="Resource" id="Resource_p14kj"]
|
||||
script = ExtResource("21_5r2pj")
|
||||
|
||||
[sub_resource type="RectangleShape2D" id="RectangleShape2D_ogl63"]
|
||||
|
|
@ -57,20 +51,9 @@ size = Vector2(10, 25)
|
|||
[node name="Avatar" type="CharacterBody2D" groups=["PLAYER"]]
|
||||
collision_layer = 2
|
||||
collision_mask = 0
|
||||
floor_snap_length = 4.0
|
||||
platform_wall_layers = 4
|
||||
script = ExtResource("1_rkqpu")
|
||||
|
||||
[node name="GroundCompanion" type="Area2D" parent="."]
|
||||
unique_name_in_owner = true
|
||||
position = Vector2(0, 11)
|
||||
collision_layer = 0
|
||||
collision_mask = 4
|
||||
|
||||
[node name="CollisionShape2D" type="CollisionShape2D" parent="GroundCompanion"]
|
||||
shape = SubResource("CircleShape2D_1a1t3")
|
||||
debug_color = Color(0, 0.6363917, 0.4093975, 0.41960785)
|
||||
|
||||
[node name="CollisionShape2D" type="CollisionShape2D" parent="."]
|
||||
shape = SubResource("RectangleShape2D_qnulu")
|
||||
|
||||
|
|
@ -112,7 +95,6 @@ script = ExtResource("8_d42ye")
|
|||
[node name="Fall" type="LimboState" parent="PlayerHSM/Normal/Airbone"]
|
||||
unique_name_in_owner = true
|
||||
script = ExtResource("9_iqoog")
|
||||
jump_grace_time = 0.16
|
||||
|
||||
[node name="Jump" type="LimboState" parent="PlayerHSM/Normal/Airbone"]
|
||||
unique_name_in_owner = true
|
||||
|
|
@ -162,19 +144,15 @@ dash_speed = 400.0
|
|||
end_dash_speed = 190.0
|
||||
climb_hop_velocity_x = 180.0
|
||||
climb_hop_velocity_y = 334.0
|
||||
jump_force = 460.0
|
||||
jump_hold_maxium_time = 0.125
|
||||
jump_horizontal_Boost = 265.0
|
||||
jump_horizontal_Boost_last_time = 0.3
|
||||
light_gravity_threshold = 135.0
|
||||
light_gravity_mult = 0.6
|
||||
jump_force = 270.0
|
||||
jump_horizontal_Boost = 235.0
|
||||
wall_jump_base_force_x = 260.0
|
||||
wall_jump_base_force_y = 220.0
|
||||
fall_maxium_speed = 430.0
|
||||
air_control_mult = 0.85
|
||||
run_accel = 1300.0
|
||||
run_reduce = 2400.0
|
||||
move_speed_max = 202.0
|
||||
run_accel = 2100.0
|
||||
run_reduce = 420.0
|
||||
move_speed_max = 192.0
|
||||
|
||||
[node name="WallDetector" parent="LocomotionComponent" instance=ExtResource("20_air0b")]
|
||||
unique_name_in_owner = true
|
||||
|
|
@ -182,11 +160,15 @@ unique_name_in_owner = true
|
|||
[node name="MidRayCast2D" parent="LocomotionComponent/WallDetector" index="1"]
|
||||
position = Vector2(0, 3)
|
||||
|
||||
[node name="SpawnHookComponet" type="Node" parent="."]
|
||||
[node name="SpawnHookComponet" type="Node" parent="." node_paths=PackedStringArray("binded_hook_ray_cast_2d")]
|
||||
script = ExtResource("21_p14kj")
|
||||
binded_hook_ray_cast_2d = NodePath("HookCheckRayer")
|
||||
binded_hook_move_input_property_name = &"m_input_intent_direction"
|
||||
metadata/_custom_type_script = "uid://bkkkyugppu7sl"
|
||||
|
||||
[node name="HookCheckRayer" type="RayCast2D" parent="SpawnHookComponet"]
|
||||
collision_mask = 4
|
||||
|
||||
[node name="ReedSFXMananger" type="Node" parent="."]
|
||||
script = ExtResource("24_x5g5e")
|
||||
bindings = Array[ExtResource("25_rjd7i")]([ExtResource("26_256x0")])
|
||||
|
|
@ -197,26 +179,12 @@ script = ExtResource("24_mwlgv")
|
|||
bindings = Array[ExtResource("25_s5egm")]([ExtResource("26_s5egm"), ExtResource("30_hquoe")])
|
||||
metadata/_custom_type_script = "uid://ta2r2bc1nrwe"
|
||||
|
||||
[node name="PhantomCameraNoiseEmitter2D" type="Node2D" parent="."]
|
||||
unique_name_in_owner = true
|
||||
script = ExtResource("32_ciuu3")
|
||||
noise = ExtResource("34_01uoa")
|
||||
duration = 0.2
|
||||
noise_emitter_layer = 0
|
||||
metadata/_custom_type_script = "uid://bhd4nuiu23e7l"
|
||||
|
||||
[node name="PhantomCamera2D" type="Node2D" parent="."]
|
||||
position = Vector2(50, -75)
|
||||
script = ExtResource("32_u7cua")
|
||||
tween_resource = SubResource("Resource_1a1t3")
|
||||
draw_limits = true
|
||||
noise = ExtResource("34_01uoa")
|
||||
script = ExtResource("20_ogl63")
|
||||
tween_resource = SubResource("Resource_p14kj")
|
||||
metadata/_custom_type_script = "uid://bhexx6mj1xv3q"
|
||||
|
||||
[node name="Locker" type="Node" parent="PhantomCamera2D" node_paths=PackedStringArray("target_camera")]
|
||||
script = ExtResource("34_1a1t3")
|
||||
target_camera = NodePath("..")
|
||||
|
||||
[node name="HitBox" type="Area2D" parent="."]
|
||||
unique_name_in_owner = true
|
||||
collision_layer = 0
|
||||
|
|
@ -229,6 +197,14 @@ debug_color = Color(0.95815283, 0, 0.5313341, 0.41960785)
|
|||
|
||||
[node name="RemotePositionSetting" type="Node2D" parent="."]
|
||||
|
||||
[node name="Remotor[HookCheckRayer]" type="RemoteTransform2D" parent="RemotePositionSetting"]
|
||||
remote_path = NodePath("../../SpawnHookComponet/HookCheckRayer")
|
||||
update_rotation = false
|
||||
update_scale = false
|
||||
script = ExtResource("28_mxt3b")
|
||||
observed_remote_path = NodePath("../../SpawnHookComponet/HookCheckRayer")
|
||||
metadata/_custom_type_script = "uid://bijoqygv6tncj"
|
||||
|
||||
[node name="Remotor[WallDetector]" type="RemoteTransform2D" parent="RemotePositionSetting"]
|
||||
remote_path = NodePath("../../LocomotionComponent/WallDetector")
|
||||
update_rotation = false
|
||||
|
|
|
|||
|
|
@ -7,11 +7,6 @@ class_name Player extends CharacterBody2D
|
|||
@onready var spawn_hook_comp: SpawnHookComponet = $SpawnHookComponet
|
||||
|
||||
@onready var foot_pos_marker: Marker2D = %FootPosMarker
|
||||
@onready var ground_companion: Area2D = %GroundCompanion
|
||||
|
||||
@onready var phantom_camera_noise_emitter_2d: PhantomCameraNoiseEmitter2D = %PhantomCameraNoiseEmitter2D
|
||||
|
||||
|
||||
|
||||
enum Direction{LEFT,RIGHT}
|
||||
var direction: Direction = Direction.RIGHT: set = _player_direction_changed
|
||||
|
|
@ -53,12 +48,6 @@ func _ready() -> void:
|
|||
func _draw() -> void:
|
||||
draw_string(ThemeDB.fallback_font,Vector2.ZERO,str(get_wall_normal()))
|
||||
|
||||
var x: float = clampf(abs(velocity.x),1,1000) * .2 * sign(velocity.x)
|
||||
var y: float = clampf(abs(velocity.y),1,1000) * .2 * sign(velocity.y)
|
||||
|
||||
draw_line(Vector2.ZERO,Vector2(x, 0),Color.RED,4)
|
||||
draw_line(Vector2.ZERO,Vector2(0, y),Color.GREEN,4)
|
||||
|
||||
func _process(delta: float) -> void:
|
||||
queue_redraw()
|
||||
|
||||
|
|
@ -69,9 +58,56 @@ func set_move_input(dir: Vector2) -> void:
|
|||
func get_move_input() -> Vector2:
|
||||
return m_input_intent_direction
|
||||
|
||||
## 更宽泛的floor检测
|
||||
func get_is_on_floor() -> bool:
|
||||
return self.is_on_floor() or ground_companion.has_overlapping_areas() or ground_companion.has_overlapping_bodies()
|
||||
#func _physics_process(delta: float) -> void:
|
||||
#
|
||||
###用於更新輸入的朝向
|
||||
#m_input_intent_direction = Input.get_vector(
|
||||
#"move_left",
|
||||
#"move_right",
|
||||
#"move_up",
|
||||
#"move_down"
|
||||
#)
|
||||
#
|
||||
#spawn_hook_comp.set_ray_direction(m_input_intent_direction)
|
||||
|
||||
#func _unhandled_input(event: InputEvent) -> void:
|
||||
#if event.is_echo():
|
||||
#return
|
||||
#
|
||||
##jump input
|
||||
#if event.is_action_pressed(&"jump"):
|
||||
#m_jump_press = true
|
||||
#_handle_jump_press()
|
||||
#
|
||||
#if event.is_action_released(&"jump"):
|
||||
#m_jump_press = false
|
||||
#_handle_jump_release()
|
||||
#
|
||||
##dash input
|
||||
#if event.is_action_pressed(&"dash"):
|
||||
#m_dash_press = true
|
||||
#_handle_dash_press()
|
||||
#
|
||||
#if event.is_action_released(&"dash"):
|
||||
#m_dash_press = false
|
||||
#
|
||||
##climb input
|
||||
#if event.is_action_pressed(&"climb"):
|
||||
#m_climb_press = true
|
||||
#_handle_climb_press()
|
||||
#
|
||||
#if event.is_action_released(&"climb"):
|
||||
#m_climb_press = false
|
||||
#_handle_climb_release()
|
||||
#
|
||||
##grap hook input
|
||||
#if event.is_action_pressed(&"grap_hook"):
|
||||
#m_grap_hook_press = true
|
||||
#_handle_grap_hook_press()
|
||||
#
|
||||
#if event.is_action_released(&"grap_hook"):
|
||||
#m_grap_hook_press = false
|
||||
#_handle_grap_hook_release()
|
||||
|
||||
#region 输入处理
|
||||
'''对于单次的输入触发动作,我们发送一个格式为
|
||||
|
|
@ -111,6 +147,38 @@ func release_grap_hook() -> void:
|
|||
hsm.dispatch(&"completed_grap_hook")
|
||||
#endregion
|
||||
|
||||
##处理 jump 单次输入
|
||||
#func _handle_jump_press() -> void:
|
||||
#if not m_jump_press:
|
||||
#return
|
||||
#
|
||||
#hsm.dispatch(&"trigger_jump")
|
||||
#
|
||||
#func _handle_jump_release() -> void:
|
||||
#hsm.dispatch(&"completed_jump")
|
||||
#
|
||||
###处理 Dash 单次输入
|
||||
#func _handle_dash_press() -> void:
|
||||
#if not m_dash_press:
|
||||
#return
|
||||
#hsm.dispatch(&"trigger_dash")
|
||||
#
|
||||
###处理 climb 输入
|
||||
#func _handle_climb_press() -> void:
|
||||
#if not m_climb_press:
|
||||
#return
|
||||
#hsm.dispatch(&"trigger_climb")
|
||||
#
|
||||
#func _handle_climb_release() -> void:
|
||||
#hsm.dispatch(&"completed_climb")
|
||||
#
|
||||
###处理 Grap Hook 输入
|
||||
#func _handle_grap_hook_press() -> void:
|
||||
#hsm.dispatch(&"trigger_grap_hook")
|
||||
#
|
||||
#func _handle_grap_hook_release() -> void:
|
||||
#hsm.dispatch(&"completed_grap_hook")
|
||||
|
||||
##玩家方向改变时更新
|
||||
func _handle_direction_changed(value: Direction):
|
||||
match value:
|
||||
|
|
|
|||
|
|
@ -1,30 +0,0 @@
|
|||
'''
|
||||
此脚本可以强制让一个相机的Priority锁定为1
|
||||
'''
|
||||
extends Node
|
||||
|
||||
@export var target_camera: PhantomCamera2D
|
||||
|
||||
var _p
|
||||
|
||||
func _ready() -> void:
|
||||
_p = target_camera
|
||||
if not _p:
|
||||
_p = get_parent() as PhantomCamera2D
|
||||
|
||||
if not _p:
|
||||
printerr("[CameraLocker]: No vaild Camera Founded")
|
||||
|
||||
var pcm = Engine.get_singleton("PhantomCameraManager")
|
||||
pcm.pcam_priority_changed.connect(_enforce)
|
||||
pcm.pcam_visibility_changed.connect(_enforce)
|
||||
|
||||
# 启动时先保证一次
|
||||
_enforce()
|
||||
|
||||
func _enforce(_pcam = null):
|
||||
if not is_instance_valid(_p):
|
||||
return
|
||||
|
||||
if _p.get_priority() != 1:
|
||||
_p.set_priority(1)
|
||||
|
|
@ -1 +0,0 @@
|
|||
uid://bueehfgv5vnc0
|
||||
|
|
@ -54,8 +54,8 @@ func _unhandled_input(event: InputEvent) -> void:
|
|||
elif event.is_action_released(&"jump"):
|
||||
_controlled_avatar.release_jump()
|
||||
|
||||
#if event.is_action_pressed(&"dash"):
|
||||
#_controlled_avatar.press_dash()
|
||||
if event.is_action_pressed(&"dash"):
|
||||
_controlled_avatar.press_dash()
|
||||
|
||||
if event.is_action_pressed(&"climb"):
|
||||
_controlled_avatar.press_climb()
|
||||
|
|
|
|||
|
|
@ -38,11 +38,8 @@ class_name CelesteLocomotionComponent extends JumpLocomotionComponent
|
|||
|
||||
#region Custom Move (拉扯移動)
|
||||
@export_category("Custom Move")
|
||||
##進行自定義運動時,移動的拉力
|
||||
@export var custom_move_force: float = 25.0
|
||||
##進行自定義運動時,移動的最大速度
|
||||
@export var custom_move_max_speed: float = 420.0
|
||||
##進行自定義運動時,如果于目標點小於此距離,則會解除自定義運動
|
||||
@export var custom_move_stop_distance: float = 4.0
|
||||
|
||||
var _custom_move_target_node: Node = null
|
||||
|
|
|
|||
|
|
@ -24,8 +24,6 @@ func _setup() -> void:
|
|||
self.add_event_handler(&"trigger_jump",_handler_trigger_jump)
|
||||
|
||||
func _enter() -> void:
|
||||
|
||||
## 进入时,只要want to jump == true,则会触发跳跃而不是fall
|
||||
var want_to_jump = blackboard.get_var(&"want_to_jump",false)
|
||||
|
||||
initial_state = root.fall_state
|
||||
|
|
@ -38,9 +36,8 @@ func _enter() -> void:
|
|||
func _update(delta: float) -> void:
|
||||
if auto_jump_timer > 0:
|
||||
auto_jump_timer -= delta
|
||||
print("允许自动跳")
|
||||
|
||||
if agent.get_is_on_floor() && agent.velocity.y >= 0:
|
||||
if agent.is_on_floor() && agent.velocity.y >= 0:
|
||||
#自动跳
|
||||
if auto_jump_timer > 0:
|
||||
auto_jump_timer = 0
|
||||
|
|
|
|||
|
|
@ -44,7 +44,6 @@ func _init_trans() -> void:
|
|||
self.add_transition(ANYSTATE,grap_hook_state,&"want_to_grap_hook",_has_move_input)
|
||||
self.add_transition(grap_hook_state,airbone_state,&"exit_on_ground")
|
||||
self.add_transition(grap_hook_state,ground_state,&"exit_on_air")
|
||||
self.add_transition(grap_hook_state,airbone_state,&"hook_to_jump")
|
||||
|
||||
|
||||
func _update(delta: float) -> void:
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
extends LimboState
|
||||
|
||||
##跳輸入缓存时间
|
||||
##土狼跳缓存时间
|
||||
@export var jump_grace_time: float = .14
|
||||
|
||||
var jump_grace_timer: float
|
||||
|
|
|
|||
|
|
@ -2,35 +2,13 @@ extends LimboHSM
|
|||
|
||||
@onready var root: Normal = %Normal
|
||||
|
||||
@export var jump_grace_time: float = .13
|
||||
|
||||
var _jump_grace_timer: float
|
||||
|
||||
func _setup() -> void:
|
||||
self.add_transition(
|
||||
root.hook_shooting_state,
|
||||
root.grapping_state,
|
||||
root.hook_shooting_state.EVENT_FINISHED,
|
||||
_can_enter_grapping_state
|
||||
)
|
||||
self.add_event_handler(&"trigger_jump",_handle_trigger_jump)
|
||||
self.add_transition(root.hook_shooting_state,root.grapping_state,root.hook_shooting_state.EVENT_FINISHED)
|
||||
|
||||
func _enter() -> void:
|
||||
_jump_grace_timer = 0
|
||||
get_root().blackboard.set_var(&"is_hooking",true) ##BB里锁住Dash状态
|
||||
|
||||
func _update(delta: float) -> void:
|
||||
if _jump_grace_timer > 0:
|
||||
_jump_grace_timer -= delta
|
||||
|
||||
func _exit() -> void:
|
||||
get_root().blackboard.set_var(&"is_hooking",false) ##BB里锁住Dash状态
|
||||
|
||||
agent.locomotion_comp.enable_movement()
|
||||
|
||||
func _handle_trigger_jump() -> bool:
|
||||
_jump_grace_timer = jump_grace_time
|
||||
return false
|
||||
|
||||
func _can_enter_grapping_state() -> bool:
|
||||
return agent.spawn_hook_comp.has_hook_anchor()
|
||||
|
|
|
|||
|
|
@ -1,44 +1,24 @@
|
|||
extends LimboState
|
||||
|
||||
@onready var root: Normal = %Normal
|
||||
|
||||
@export_category("Hook Pull Release")
|
||||
@export var release_distance: float = 12.0
|
||||
@export var release_dot_threshold: float = 0.0
|
||||
@export var min_pull_timer: float = 0.08
|
||||
@export var min_pull_time: float = 0.08
|
||||
|
||||
var _pull_timer := 0.0
|
||||
var _pull_time := 0.0
|
||||
var _anchor
|
||||
|
||||
var _tween: Tween
|
||||
|
||||
|
||||
func _setup() -> void:
|
||||
self.add_event_handler(&"trigger_jump",_handle_trigger_jump)
|
||||
|
||||
func _enter() -> void:
|
||||
var tween := get_tree().create_tween()
|
||||
tween.set_ignore_time_scale(true)
|
||||
|
||||
tween.tween_property(Engine, "time_scale", .15, .04)
|
||||
tween.tween_interval(.12)
|
||||
tween.tween_property(Engine, "time_scale", 1.0, .06)
|
||||
|
||||
agent.phantom_camera_noise_emitter_2d.emit()
|
||||
|
||||
if root.grap_hook_state._jump_grace_timer > 0:
|
||||
_hook_to_jump()
|
||||
|
||||
_pull_timer = 0.0
|
||||
_pull_time = 0.0
|
||||
_anchor = agent.spawn_hook_comp.get_current_hook_anchor()
|
||||
|
||||
if _anchor and is_instance_valid(_anchor):
|
||||
agent.locomotion_comp._custom_move_to(_anchor)
|
||||
|
||||
func _update(delta: float) -> void:
|
||||
_pull_timer += delta
|
||||
_pull_time += delta
|
||||
|
||||
if _pull_timer < min_pull_timer:
|
||||
if _pull_time < min_pull_time:
|
||||
return
|
||||
|
||||
if not _anchor or not is_instance_valid(_anchor):
|
||||
|
|
@ -66,16 +46,6 @@ func _exit() -> void:
|
|||
agent.locomotion_comp.stop_custom_move(false)
|
||||
_anchor = null
|
||||
|
||||
agent.spawn_hook_comp.release_cached_hook()
|
||||
|
||||
func _handle_trigger_jump() -> bool:
|
||||
_hook_to_jump()
|
||||
return false
|
||||
|
||||
func _hook_to_jump() -> void:
|
||||
get_root().blackboard.set_var(&"want_to_jump",true)
|
||||
self.dispatch(&"hook_to_jump")
|
||||
|
||||
func _force_release() -> void:
|
||||
agent.locomotion_comp.stop_custom_move(false)
|
||||
|
||||
|
|
|
|||
|
|
@ -19,7 +19,7 @@ func _update(delta: float) -> void:
|
|||
dispatch(self.EVENT_FINISHED)
|
||||
|
||||
func _handler_trigger_jump() -> bool:
|
||||
get_root().blackboard.set_var(&"want_to_jump",true)
|
||||
self.blackboard.set_var(&"want_to_jump",true)
|
||||
self.dispatch(self.EVENT_FINISHED)
|
||||
return true
|
||||
|
||||
|
|
|
|||
|
|
@ -24,25 +24,16 @@ func _exit() -> void:
|
|||
|
||||
func _handle_hook_input_completed() -> bool:
|
||||
agent.spawn_hook_comp.suspend_hook_stretching(false)
|
||||
|
||||
##如果鈎爪沒有找到任何錨點,則直接退出
|
||||
if not agent.spawn_hook_comp.has_hook_anchor():
|
||||
_exit_with_no_anchor()
|
||||
return true
|
||||
|
||||
func _handle_hook_stretching_end(reach_end: bool,Anchor:Node2D) -> void:
|
||||
|
||||
##如果鈎爪沒有找到任何錨點,則直接退出
|
||||
if not agent.spawn_hook_comp.has_hook_anchor():
|
||||
_exit_with_no_anchor()
|
||||
|
||||
self.dispatch(self.EVENT_FINISHED)
|
||||
|
||||
func _exit_with_no_anchor() -> void:
|
||||
if not Anchor:
|
||||
if agent.is_on_floor():
|
||||
self.dispatch(&"exit_on_ground")
|
||||
else:
|
||||
self.dispatch(&"exit_on_air")
|
||||
|
||||
agent.spawn_hook_comp.release_cached_hook()
|
||||
return
|
||||
|
||||
self.dispatch(self.EVENT_FINISHED)
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
extends LimboState
|
||||
|
||||
func _enter() -> void:
|
||||
agent.locomotion_comp.stop_movement(0.0) #用0唤起制动加速度
|
||||
return
|
||||
|
||||
func _update(delta: float) -> void:
|
||||
if agent.get_move_input().x != 0.0:
|
||||
|
|
|
|||
|
|
@ -2,8 +2,6 @@ extends LimboState
|
|||
|
||||
@onready var root: Normal = %Normal
|
||||
|
||||
##TODO:后续把JumpGrace在JumpState也写一下,或者直接写到AirBoneState,目前的JumpGrace由于只能在Fall触发,会卡手
|
||||
|
||||
func _setup() -> void:
|
||||
self.add_event_handler(&"completed_jump",_handler_completed_jump)
|
||||
|
||||
|
|
|
|||
|
|
@ -35,7 +35,7 @@ func _handle_move_input() -> void:
|
|||
var move_direction = agent.get_move_input().x as float
|
||||
if move_direction == 0.0:
|
||||
get_root().dispatch(self.EVENT_FINISHED)
|
||||
agent.locomotion_comp.stop_movement(0.0) #用0唤起制动加速度
|
||||
agent.locomotion_comp.add_movement_input(0.0) #用0唤起制动加速度
|
||||
return
|
||||
agent.locomotion_comp.add_movement_input(move_direction)
|
||||
|
||||
|
|
|
|||
|
|
@ -1,10 +0,0 @@
|
|||
[gd_resource type="Resource" script_class="ReedPropEffect" load_steps=2 format=3 uid="uid://bjjxh7g7iosla"]
|
||||
|
||||
[ext_resource type="Script" uid="uid://cdvgq0xqdbagk" path="res://addons/reedscene/prop/ReedPropEffect.gd" id="1_828o8"]
|
||||
|
||||
[resource]
|
||||
script = ExtResource("1_828o8")
|
||||
effect_type = 1
|
||||
value = null
|
||||
func_name = &"pop_camera"
|
||||
metadata/_custom_type_script = "uid://cdvgq0xqdbagk"
|
||||
|
|
@ -1,10 +0,0 @@
|
|||
[gd_resource type="Resource" script_class="ReedPropEffect" load_steps=2 format=3 uid="uid://458r8rf7x02p"]
|
||||
|
||||
[ext_resource type="Script" uid="uid://cdvgq0xqdbagk" path="res://addons/reedscene/prop/ReedPropEffect.gd" id="1_87nse"]
|
||||
|
||||
[resource]
|
||||
script = ExtResource("1_87nse")
|
||||
effect_type = 1
|
||||
value = null
|
||||
func_name = &"push_camera"
|
||||
metadata/_custom_type_script = "uid://cdvgq0xqdbagk"
|
||||
|
|
@ -1,25 +0,0 @@
|
|||
extends Node
|
||||
|
||||
@export var binded_camera: PhantomCamera2D
|
||||
|
||||
var _binded_cam: PhantomCamera2D
|
||||
|
||||
func _ready() -> void:
|
||||
_binded_cam = binded_camera
|
||||
if not _binded_cam:
|
||||
_binded_cam = get_parent() as PhantomCamera2D
|
||||
|
||||
if not _binded_cam:
|
||||
printerr("[CameraTool]: No Vaild Camera Founded")
|
||||
|
||||
## 将自己的priority设置为最高
|
||||
func hold_self_priority() -> void:
|
||||
var pcs = PhantomCameraManager.get_phantom_camera_2ds()
|
||||
for pc in pcs:
|
||||
pc.priority = -1
|
||||
|
||||
_binded_cam.priority = 100
|
||||
|
||||
## 将自己的priority设置为不可用
|
||||
func release_self_priority() -> void:
|
||||
_binded_cam.priority = -1
|
||||
|
|
@ -1 +0,0 @@
|
|||
uid://ce7d2tpunfaxe
|
||||
|
|
@ -1,18 +0,0 @@
|
|||
[gd_scene load_steps=5 format=3 uid="uid://mi4omkkocmc0"]
|
||||
|
||||
[ext_resource type="Script" uid="uid://bhexx6mj1xv3q" path="res://addons/phantom_camera/scripts/phantom_camera/phantom_camera_2d.gd" id="1_p2s6f"]
|
||||
[ext_resource type="Script" uid="uid://8umksf8e80fw" path="res://addons/phantom_camera/scripts/resources/tween_resource.gd" id="2_77rrp"]
|
||||
[ext_resource type="Script" uid="uid://ce7d2tpunfaxe" path="res://_props/_prefabs/camera/camera_tool.gd" id="3_77rrp"]
|
||||
|
||||
[sub_resource type="Resource" id="Resource_gofl0"]
|
||||
script = ExtResource("2_77rrp")
|
||||
|
||||
[node name="SceneStaticCamera" type="Node2D"]
|
||||
script = ExtResource("1_p2s6f")
|
||||
tween_resource = SubResource("Resource_gofl0")
|
||||
draw_limits = true
|
||||
metadata/_custom_type_script = "uid://bhexx6mj1xv3q"
|
||||
|
||||
[node name="Tool" type="Node" parent="." node_paths=PackedStringArray("binded_camera")]
|
||||
script = ExtResource("3_77rrp")
|
||||
binded_camera = NodePath("..")
|
||||
|
|
@ -1,19 +0,0 @@
|
|||
extends Area2D
|
||||
|
||||
signal collected(collector: Node2D)
|
||||
|
||||
func _ready() -> void:
|
||||
self.body_entered.connect(_on_collected)
|
||||
self.area_entered.connect(_on_collected)
|
||||
|
||||
func _on_collected(collection: Node2D) -> void:
|
||||
var collector := collection.owner
|
||||
if collector == null:
|
||||
return
|
||||
|
||||
## 如果收集者存在收集接口,那麽就把自己傳過去
|
||||
if collector.has_method("collect_item"):
|
||||
collector.collect_item(self)
|
||||
collected.emit(collector)
|
||||
|
||||
self.queue_free()
|
||||
|
|
@ -1 +0,0 @@
|
|||
uid://b7o5456qrwgbf
|
||||
|
|
@ -1,8 +0,0 @@
|
|||
[gd_scene load_steps=2 format=3 uid="uid://d20u8tfktepxg"]
|
||||
|
||||
[ext_resource type="Script" uid="uid://b7o5456qrwgbf" path="res://_props/_prefabs/collection/collection_prefab.gd" id="1_8ns1b"]
|
||||
|
||||
[node name="CollectionPrefab" type="Area2D"]
|
||||
collision_layer = 16
|
||||
collision_mask = 2
|
||||
script = ExtResource("1_8ns1b")
|
||||
|
|
@ -1,14 +1,12 @@
|
|||
[gd_scene load_steps=4 format=3 uid="uid://5ia817pm76x1"]
|
||||
|
||||
[ext_resource type="Script" uid="uid://byntg0bbp8nar" path="res://_props/_prefabs/door/door.gd" id="1_gt1uq"]
|
||||
[ext_resource type="Script" uid="uid://byntg0bbp8nar" path="res://_props/_prefabs/door.gd" id="1_gt1uq"]
|
||||
[ext_resource type="Texture2D" uid="uid://c673bap4b12fx" path="res://icon.svg" id="2_f05xd"]
|
||||
|
||||
[sub_resource type="RectangleShape2D" id="RectangleShape2D_g1m3x"]
|
||||
size = Vector2(20, 128)
|
||||
|
||||
[node name="Door" type="AnimatableBody2D" groups=["GRAPABLE"]]
|
||||
collision_layer = 4
|
||||
collision_mask = 0
|
||||
[node name="Door" type="AnimatableBody2D"]
|
||||
script = ExtResource("1_gt1uq")
|
||||
|
||||
[node name="Sprite2D" type="Sprite2D" parent="."]
|
||||
|
|
@ -1,5 +0,0 @@
|
|||
[gd_scene format=3 uid="uid://csdxpv8gefpec"]
|
||||
|
||||
[node name="MovablePlateform" type="AnimatableBody2D"]
|
||||
collision_layer = 4
|
||||
collision_mask = 0
|
||||
|
|
@ -1,11 +0,0 @@
|
|||
[gd_resource type="Resource" script_class="ReedPropEffect" load_steps=2 format=3 uid="uid://dd4df6yjkeifa"]
|
||||
|
||||
[ext_resource type="Script" uid="uid://cdvgq0xqdbagk" path="res://addons/reedscene/prop/ReedPropEffect.gd" id="1_bxu3h"]
|
||||
|
||||
[resource]
|
||||
script = ExtResource("1_bxu3h")
|
||||
effect_type = 1
|
||||
value = null
|
||||
func_name = &"set_defer"
|
||||
func_args = [&"monitoring", false]
|
||||
metadata/_custom_type_script = "uid://cdvgq0xqdbagk"
|
||||
|
|
@ -1,11 +0,0 @@
|
|||
[gd_resource type="Resource" script_class="ReedPropEffect" load_steps=2 format=3 uid="uid://b6iglvt36pm55"]
|
||||
|
||||
[ext_resource type="Script" uid="uid://cdvgq0xqdbagk" path="res://addons/reedscene/prop/ReedPropEffect.gd" id="1_3md03"]
|
||||
|
||||
[resource]
|
||||
script = ExtResource("1_3md03")
|
||||
effect_type = 1
|
||||
value = null
|
||||
func_name = &"set_defer"
|
||||
func_args = [&"monitoring", true]
|
||||
metadata/_custom_type_script = "uid://cdvgq0xqdbagk"
|
||||
|
|
@ -1,6 +1,6 @@
|
|||
[gd_scene load_steps=2 format=3 uid="uid://bonrls3iuhdqb"]
|
||||
|
||||
[ext_resource type="Script" uid="uid://c25ea2nypjah7" path="res://_props/_prefabs/player/player_trigger_volumn.gd" id="1_qrafk"]
|
||||
[ext_resource type="Script" uid="uid://c25ea2nypjah7" path="res://_props/_prefabs/player_trigger_volumn.gd" id="1_qrafk"]
|
||||
|
||||
[node name="PlayerTriggerVolumn" type="Area2D"]
|
||||
editor_description = "此类在检测到玩家时会发出signal,可以与其他的需要检测玩家的scene组合使用。
|
||||
|
|
@ -1,20 +0,0 @@
|
|||
[gd_scene load_steps=4 format=3 uid="uid://brxjxhoq2g2bb"]
|
||||
|
||||
[ext_resource type="PackedScene" uid="uid://csdxpv8gefpec" path="res://_props/_prefabs/movable_plateform.tscn" id="1_4q2e0"]
|
||||
[ext_resource type="Texture2D" uid="uid://c673bap4b12fx" path="res://icon.svg" id="2_687ql"]
|
||||
|
||||
[sub_resource type="RectangleShape2D" id="RectangleShape2D_687ql"]
|
||||
size = Vector2(126, 52)
|
||||
|
||||
[node name="AnimationMovePlateform" type="Node2D"]
|
||||
|
||||
[node name="MovablePlateform" parent="." instance=ExtResource("1_4q2e0")]
|
||||
|
||||
[node name="Sprite2D" type="Sprite2D" parent="MovablePlateform"]
|
||||
scale = Vector2(1, 0.421875)
|
||||
texture = ExtResource("2_687ql")
|
||||
|
||||
[node name="CollisionShape2D" type="CollisionShape2D" parent="MovablePlateform"]
|
||||
shape = SubResource("RectangleShape2D_687ql")
|
||||
|
||||
[node name="AnimationPlayer" type="AnimationPlayer" parent="."]
|
||||
|
|
@ -1,16 +0,0 @@
|
|||
[gd_scene load_steps=4 format=3 uid="uid://c3mievyfhx6ni"]
|
||||
|
||||
[ext_resource type="PackedScene" uid="uid://d20u8tfktepxg" path="res://_props/_prefabs/collection/collection_prefab.tscn" id="1_r0qyb"]
|
||||
[ext_resource type="Texture2D" uid="uid://c673bap4b12fx" path="res://icon.svg" id="2_igeyo"]
|
||||
|
||||
[sub_resource type="CircleShape2D" id="CircleShape2D_r0qyb"]
|
||||
radius = 23.0
|
||||
|
||||
[node name="Coin" instance=ExtResource("1_r0qyb")]
|
||||
|
||||
[node name="CollisionShape2D" type="CollisionShape2D" parent="." index="0"]
|
||||
shape = SubResource("CircleShape2D_r0qyb")
|
||||
|
||||
[node name="Sprite2D" type="Sprite2D" parent="." index="1"]
|
||||
scale = Vector2(0.33, 0.33)
|
||||
texture = ExtResource("2_igeyo")
|
||||
|
|
@ -1,6 +1,6 @@
|
|||
[gd_scene load_steps=3 format=3 uid="uid://b5nx4dntm0gyn"]
|
||||
|
||||
[ext_resource type="PackedScene" uid="uid://5ia817pm76x1" path="res://_props/_prefabs/door/door.tscn" id="1_3ghu3"]
|
||||
[ext_resource type="PackedScene" uid="uid://5ia817pm76x1" path="res://_props/_prefabs/door.tscn" id="1_3ghu3"]
|
||||
[ext_resource type="Script" uid="uid://cup8c7j4e6xpf" path="res://_props/door_manager/event_trigger_door.gd" id="1_iprsb"]
|
||||
|
||||
[node name="EventTriggerDoor" type="Node2D"]
|
||||
|
|
|
|||
|
|
@ -0,0 +1 @@
|
|||
uid://dm28i1f2r18b8
|
||||
|
|
@ -0,0 +1,7 @@
|
|||
extends ReedTransition
|
||||
|
||||
func execute(from: ReedPropState, to: ReedPropState, ctx: Dictionary) -> bool:
|
||||
super.execute(from,to,ctx)
|
||||
to._owner.call
|
||||
|
||||
|
||||
|
|
@ -0,0 +1 @@
|
|||
uid://csbvukpwc7g6p
|
||||
|
|
@ -1,6 +1,6 @@
|
|||
[gd_scene load_steps=7 format=3 uid="uid://knrcnoedxvm6"]
|
||||
|
||||
[ext_resource type="PackedScene" uid="uid://bonrls3iuhdqb" path="res://_props/_prefabs/player/player_trigger_volumn.tscn" id="1_mvp6g"]
|
||||
[ext_resource type="PackedScene" uid="uid://bonrls3iuhdqb" path="res://_props/_prefabs/player_trigger_volumn.tscn" id="1_mvp6g"]
|
||||
[ext_resource type="PackedScene" uid="uid://cmjwk4gr1nfns" path="res://_props/_prefabs/rock.tscn" id="1_nh18e"]
|
||||
[ext_resource type="Script" uid="uid://b8yl6l3tlam86" path="res://_props/trigger_fall_rock/trigger_fall_rock.gd" id="1_vv0hj"]
|
||||
[ext_resource type="Texture2D" uid="uid://c673bap4b12fx" path="res://icon.svg" id="2_xilvp"]
|
||||
|
|
|
|||
|
|
@ -1,15 +1,15 @@
|
|||
[gd_scene load_steps=3 format=3 uid="uid://b8pv5wtbo0y20"]
|
||||
|
||||
[ext_resource type="Script" uid="uid://04mchxkp161a" path="res://_shared/camera/CameraSystem.gd" id="1_xxnab"]
|
||||
[ext_resource type="Script" uid="uid://bd046eokvcnu2" path="res://addons/phantom_camera/scripts/phantom_camera_host/phantom_camera_host.gd" id="2_385ly"]
|
||||
[ext_resource type="Script" uid="uid://bd046eokvcnu2" path="res://addons/phantom_camera/scripts/phantom_camera_host/phantom_camera_host.gd" id="1_tvldw"]
|
||||
[ext_resource type="Script" uid="uid://lpenhftmjj4o" path="res://_shared/camera_system.gd" id="1_vo3bs"]
|
||||
|
||||
[node name="CameraSystem" type="Node"]
|
||||
script = ExtResource("1_xxnab")
|
||||
script = ExtResource("1_vo3bs")
|
||||
|
||||
[node name="Camera2D" type="Camera2D" parent="."]
|
||||
|
||||
[node name="PhantomCameraHost" type="Node" parent="Camera2D"]
|
||||
process_priority = 300
|
||||
process_physics_priority = 300
|
||||
script = ExtResource("2_385ly")
|
||||
script = ExtResource("1_tvldw")
|
||||
metadata/_custom_type_script = "uid://bd046eokvcnu2"
|
||||
|
|
@ -1,42 +0,0 @@
|
|||
@tool
|
||||
class_name CameraAnchor extends Node2D
|
||||
|
||||
## 该priority不会直接修改Anchor的priority
|
||||
@export var priority: int = 0
|
||||
@export var enabled: bool = true
|
||||
@export var blend_time: float = 0.3
|
||||
|
||||
@export var zoom: Vector2 = Vector2.ONE
|
||||
@export var offset: Vector2 = Vector2.ZERO
|
||||
|
||||
var _priority: int :
|
||||
set(value):
|
||||
if _priority != value:
|
||||
_priority = value
|
||||
on_priority_change.emit(_priority, self)
|
||||
|
||||
signal on_priority_change(_priority:int, anchor: CameraAnchor)
|
||||
|
||||
func _ready() -> void:
|
||||
if not Engine.is_editor_hint():
|
||||
_runtime_ready()
|
||||
|
||||
func _runtime_ready() -> void:
|
||||
_priority = priority
|
||||
|
||||
func push_camera() -> void:
|
||||
CameraSystem.reset_all_camera_priority()
|
||||
_priority = 1000
|
||||
|
||||
func pop_camera() -> void:
|
||||
_priority = 0
|
||||
|
||||
func _enter_tree() -> void:
|
||||
if Engine.is_editor_hint():
|
||||
return
|
||||
CameraSystem.register_anchor(self)
|
||||
|
||||
func _exit_tree() -> void:
|
||||
if Engine.is_editor_hint():
|
||||
return
|
||||
CameraSystem.unregister_anchor(self)
|
||||
|
|
@ -1 +0,0 @@
|
|||
uid://dyxrydokgy0qs
|
||||
|
|
@ -1,6 +0,0 @@
|
|||
[gd_scene load_steps=2 format=3 uid="uid://bflwr7cryd2l0"]
|
||||
|
||||
[ext_resource type="Script" uid="uid://dyxrydokgy0qs" path="res://_shared/camera/CameraAnchor.gd" id="1_dhu66"]
|
||||
|
||||
[node name="CameraAnchor" type="Node2D"]
|
||||
script = ExtResource("1_dhu66")
|
||||
|
|
@ -1,125 +0,0 @@
|
|||
'''全局的相机管理器
|
||||
|
||||
======= 外部调用函数 =======
|
||||
|
||||
'''
|
||||
extends Node
|
||||
|
||||
var _cached_player_camera: GlobalCamera
|
||||
var _cached_anchors: Array[CameraAnchor] = []
|
||||
var _current_anchor: CameraAnchor
|
||||
var _switch_tween: Tween
|
||||
|
||||
## 玩家关卡内静态相机
|
||||
const PLAYER_CAMERA_SCENE:= preload("res://_shared/camera/PlayerStaticCamera.tscn")
|
||||
|
||||
## 注册玩家相机
|
||||
func register_player_camera(owner: Node) -> GlobalCamera:
|
||||
if not _cached_player_camera:
|
||||
_cached_player_camera = PLAYER_CAMERA_SCENE.instantiate() as GlobalCamera
|
||||
|
||||
if _cached_player_camera:
|
||||
owner.add_child(_cached_player_camera)
|
||||
|
||||
return _cached_player_camera
|
||||
|
||||
## 外部获取玩家全局相机
|
||||
func get_cached_camera() -> GlobalCamera:
|
||||
return _cached_player_camera
|
||||
|
||||
|
||||
## 注册一个相机锚点
|
||||
func register_anchor(anchor: CameraAnchor) -> void:
|
||||
if anchor in _cached_anchors:
|
||||
return
|
||||
_cached_anchors.append(anchor)
|
||||
anchor.on_priority_change.connect(on_anchor_priority_changed)
|
||||
_sort_anchors()
|
||||
_try_auto_switch()
|
||||
|
||||
## 当相机锚点的权重改变时,向管理器触发事件
|
||||
func on_anchor_priority_changed(priority:int, anchor: CameraAnchor) -> void:
|
||||
if _current_anchor:
|
||||
if _current_anchor._priority < priority:
|
||||
_sort_anchors()
|
||||
_try_auto_switch()
|
||||
|
||||
## 注销一个相机锚点
|
||||
func unregister_anchor(anchor: CameraAnchor) -> void:
|
||||
_cached_anchors.erase(anchor)
|
||||
if _current_anchor == anchor:
|
||||
_current_anchor = null
|
||||
_try_auto_switch()
|
||||
|
||||
## 排序已有的锚点
|
||||
func _sort_anchors() -> void:
|
||||
_cached_anchors.sort_custom(func(a, b):
|
||||
return a._priority > b._priority
|
||||
)
|
||||
|
||||
## 尝试自切换
|
||||
func _try_auto_switch() -> void:
|
||||
for a in _cached_anchors:
|
||||
if a.enabled:
|
||||
switch_anchor(a)
|
||||
_current_anchor = a
|
||||
return
|
||||
|
||||
## 重置所有的Camera的_priority
|
||||
func reset_all_camera_priority() -> void:
|
||||
for a in _cached_anchors:
|
||||
a._priority = 0
|
||||
|
||||
## 切换相机
|
||||
func switch_anchor(target_anchor: CameraAnchor) -> void:
|
||||
if target_anchor == null:
|
||||
return
|
||||
if target_anchor == _current_anchor:
|
||||
return
|
||||
if not is_instance_valid(_cached_player_camera):
|
||||
return
|
||||
|
||||
# 中断旧 Tween
|
||||
if _switch_tween and _switch_tween.is_running():
|
||||
_switch_tween.kill()
|
||||
_switch_tween = null
|
||||
|
||||
var camera := _cached_player_camera
|
||||
var blend_time : float = max(target_anchor.blend_time, 0.001)
|
||||
|
||||
# 创建 Tween(关键:ignore time scale)
|
||||
_switch_tween = get_tree().create_tween()
|
||||
_switch_tween.set_ignore_time_scale(true)
|
||||
_switch_tween.set_trans(Tween.TRANS_SINE)
|
||||
_switch_tween.set_ease(Tween.EASE_OUT)
|
||||
|
||||
# ===== 位置 =====
|
||||
_switch_tween.tween_property(
|
||||
camera,
|
||||
"global_position",
|
||||
target_anchor.global_position,
|
||||
blend_time
|
||||
)
|
||||
|
||||
# ===== Zoom =====
|
||||
_switch_tween.tween_property(
|
||||
camera,
|
||||
"zoom",
|
||||
target_anchor.zoom,
|
||||
blend_time
|
||||
)
|
||||
|
||||
# ===== Offset =====
|
||||
_switch_tween.tween_property(
|
||||
camera,
|
||||
"offset",
|
||||
target_anchor.offset,
|
||||
blend_time
|
||||
)
|
||||
|
||||
# 完成回调
|
||||
_switch_tween.finished.connect(func():
|
||||
_current_anchor = target_anchor
|
||||
)
|
||||
|
||||
_current_anchor = target_anchor
|
||||
|
|
@ -1 +0,0 @@
|
|||
uid://04mchxkp161a
|
||||
|
|
@ -1,4 +0,0 @@
|
|||
class_name GlobalCamera extends Node2D
|
||||
|
||||
@onready var phantom_camera_2d: PhantomCamera2D = %PhantomCamera2D
|
||||
@onready var phantom_camera_noise_emitter_2d: PhantomCameraNoiseEmitter2D = %PhantomCameraNoiseEmitter2D
|
||||
|
|
@ -1 +0,0 @@
|
|||
uid://52tgslofxoi2
|
||||
|
|
@ -1,26 +0,0 @@
|
|||
[gd_scene load_steps=6 format=3 uid="uid://d1w8ftfhxycfy"]
|
||||
|
||||
[ext_resource type="Script" uid="uid://52tgslofxoi2" path="res://_shared/camera/GlobalCamera.gd" id="1_fixiw"]
|
||||
[ext_resource type="Script" uid="uid://bhexx6mj1xv3q" path="res://addons/phantom_camera/scripts/phantom_camera/phantom_camera_2d.gd" id="1_llsih"]
|
||||
[ext_resource type="Script" uid="uid://bhd4nuiu23e7l" path="res://addons/phantom_camera/scripts/phantom_camera/phantom_camera_noise_emitter_2d.gd" id="3_0bl5s"]
|
||||
[ext_resource type="Script" uid="uid://8umksf8e80fw" path="res://addons/phantom_camera/scripts/resources/tween_resource.gd" id="3_fixiw"]
|
||||
|
||||
[sub_resource type="Resource" id="Resource_pvk7k"]
|
||||
script = ExtResource("3_fixiw")
|
||||
|
||||
[node name="PlayerStaticCamera" type="Node2D"]
|
||||
script = ExtResource("1_fixiw")
|
||||
|
||||
[node name="PhantomCamera2D" type="Node2D" parent="."]
|
||||
unique_name_in_owner = true
|
||||
script = ExtResource("1_llsih")
|
||||
priority = 1000
|
||||
tween_resource = SubResource("Resource_pvk7k")
|
||||
tween_on_load = false
|
||||
draw_limits = true
|
||||
metadata/_custom_type_script = "uid://bhexx6mj1xv3q"
|
||||
|
||||
[node name="PhantomCameraNoiseEmitter2D" type="Node2D" parent="PhantomCamera2D"]
|
||||
unique_name_in_owner = true
|
||||
script = ExtResource("3_0bl5s")
|
||||
metadata/_custom_type_script = "uid://bhd4nuiu23e7l"
|
||||
|
|
@ -1,12 +0,0 @@
|
|||
[gd_resource type="Resource" script_class="PhantomCameraNoise2D" load_steps=2 format=3 uid="uid://dy1hsviasxfu0"]
|
||||
|
||||
[ext_resource type="Script" uid="uid://dimvdouy8g0sv" path="res://addons/phantom_camera/scripts/resources/phantom_camera_noise_2d.gd" id="1_oi7x7"]
|
||||
|
||||
[resource]
|
||||
script = ExtResource("1_oi7x7")
|
||||
amplitude = 8.0
|
||||
frequency = 15.0
|
||||
randomize_noise_seed = 1
|
||||
noise_seed = 896
|
||||
positional_multiplier_y = 2.0
|
||||
metadata/_custom_type_script = "uid://dimvdouy8g0sv"
|
||||
|
|
@ -0,0 +1,33 @@
|
|||
class_name CameraRoom extends Node2D
|
||||
|
||||
@onready var phantom_camera2d: PhantomCamera2D = $PhantomCamera2D
|
||||
@onready var default_start_point: Node2D = $PlayerStartPoint
|
||||
|
||||
@export var _room_id : int = -1
|
||||
|
||||
func _ready() -> void:
|
||||
#room_entrance.body_entered.connect(_handle_body_enter_room)
|
||||
RoomSystem.room_changed.connect(_handle_global_room_changed)
|
||||
|
||||
##绑定一个Room下面的room entrance到进入这个房间
|
||||
for r in self.get_children():
|
||||
if r is RoomEntrance:
|
||||
r.body_entered.connect(_handle_body_enter_room)
|
||||
r.init_room_entrance(self)
|
||||
|
||||
func _handle_body_enter_room(body: Node2D) -> void:
|
||||
if RoomSystem.current_room_id == self._room_id:
|
||||
return
|
||||
if body != null:
|
||||
RoomSystem.update_current_room_id(self._room_id)
|
||||
return
|
||||
|
||||
func _handle_global_room_changed(room_id: int) -> void:
|
||||
if room_id == self._room_id:
|
||||
_update_room_to_self()
|
||||
|
||||
func reset_priority() -> void:
|
||||
phantom_camera2d.priority = 0
|
||||
|
||||
func _update_room_to_self() -> void:
|
||||
phantom_camera2d.priority = 99
|
||||
|
|
@ -0,0 +1 @@
|
|||
uid://c7fditim2t1c1
|
||||
|
|
@ -0,0 +1,11 @@
|
|||
'''全局的相机管理器
|
||||
|
||||
======= 外部调用函数 =======
|
||||
force_change_camera(camera : ReedCamera) 切换相机
|
||||
|
||||
func camera_room_enterd(camear : ReedCamera) Camera Room 进入时手动调用
|
||||
func camera_room_exited(camera_room : ReedCameraRoom) Camera Room 离开时手动调用
|
||||
|
||||
'''
|
||||
|
||||
extends Node
|
||||
|
|
@ -0,0 +1 @@
|
|||
uid://lpenhftmjj4o
|
||||
|
|
@ -0,0 +1,21 @@
|
|||
[gd_scene load_steps=5 format=3 uid="uid://byf5lgbkjk52y"]
|
||||
|
||||
[ext_resource type="Script" uid="uid://c7fditim2t1c1" path="res://_shared/camera_room.gd" id="1_yrcw7"]
|
||||
[ext_resource type="Script" uid="uid://bhexx6mj1xv3q" path="res://addons/phantom_camera/scripts/phantom_camera/phantom_camera_2d.gd" id="2_bdhnx"]
|
||||
[ext_resource type="Script" uid="uid://8umksf8e80fw" path="res://addons/phantom_camera/scripts/resources/tween_resource.gd" id="3_p25y8"]
|
||||
|
||||
[sub_resource type="Resource" id="Resource_y58mf"]
|
||||
script = ExtResource("3_p25y8")
|
||||
|
||||
[node name="Room" type="Node2D" groups=["ROOM"]]
|
||||
script = ExtResource("1_yrcw7")
|
||||
_room_id = 10001
|
||||
|
||||
[node name="PhantomCamera2D" type="Node2D" parent="."]
|
||||
script = ExtResource("2_bdhnx")
|
||||
zoom = Vector2(0.8, 0.8)
|
||||
tween_resource = SubResource("Resource_y58mf")
|
||||
tween_on_load = false
|
||||
metadata/_custom_type_script = "uid://bhexx6mj1xv3q"
|
||||
|
||||
[node name="PlayerStartPoint" type="Marker2D" parent="."]
|
||||
|
|
@ -0,0 +1,9 @@
|
|||
@tool
|
||||
class_name RoomEntrance extends Area2D
|
||||
|
||||
@export var restart_node: Node2D
|
||||
|
||||
##如果没有手动绑定Start节点,则自动绑定到Room的default
|
||||
func init_room_entrance(room: CameraRoom) -> void:
|
||||
if restart_node == null:
|
||||
restart_node = room.default_start_point
|
||||
|
|
@ -0,0 +1 @@
|
|||
uid://ir0fur783tru
|
||||
|
|
@ -0,0 +1,6 @@
|
|||
[gd_scene load_steps=2 format=3 uid="uid://d1mnkm2uv857q"]
|
||||
|
||||
[ext_resource type="Script" uid="uid://ir0fur783tru" path="res://_shared/room_entrance.gd" id="1_nlirq"]
|
||||
|
||||
[node name="RoomEntrance" type="Area2D"]
|
||||
script = ExtResource("1_nlirq")
|
||||
|
|
@ -0,0 +1,35 @@
|
|||
extends Node
|
||||
|
||||
var current_room_id: int = 0
|
||||
|
||||
var defalut_room_id: int = 10001
|
||||
signal room_changed(room_id: int)
|
||||
|
||||
func _ready() -> void:
|
||||
init_room()
|
||||
|
||||
##更新房间id
|
||||
func update_current_room_id(room_id: int) -> bool:
|
||||
if room_id == current_room_id:
|
||||
return false
|
||||
|
||||
reset_all_room_camera_property()
|
||||
current_room_id = room_id
|
||||
room_changed.emit(room_id)
|
||||
return true
|
||||
|
||||
##重置所有房间的room property
|
||||
func reset_all_room_camera_property() -> void:
|
||||
get_tree().call_group(&"ROOM",&"reset_priority")
|
||||
|
||||
##初始化相机房间
|
||||
func init_room() -> void:
|
||||
for r in get_tree().get_nodes_in_group(&"ROOM"):
|
||||
if r._room_id == defalut_room_id:
|
||||
if r.is_node_ready():
|
||||
update_current_room_id(defalut_room_id)
|
||||
break
|
||||
else:
|
||||
await r.ready
|
||||
update_current_room_id(defalut_room_id)
|
||||
break
|
||||
|
|
@ -0,0 +1 @@
|
|||
uid://bnl485emckxmh
|
||||
|
|
@ -1,60 +0,0 @@
|
|||
[gd_scene load_steps=2 format=3 uid="uid://b4ojkr2fq8xjm"]
|
||||
|
||||
[ext_resource type="Texture2D" uid="uid://c673bap4b12fx" path="res://icon.svg" id="1_j8fyu"]
|
||||
|
||||
[node name="MainMenu" type="Control"]
|
||||
layout_mode = 3
|
||||
anchors_preset = 15
|
||||
anchor_right = 1.0
|
||||
anchor_bottom = 1.0
|
||||
grow_horizontal = 2
|
||||
grow_vertical = 2
|
||||
|
||||
[node name="TextureRect" type="TextureRect" parent="."]
|
||||
layout_mode = 1
|
||||
anchors_preset = 15
|
||||
anchor_right = 1.0
|
||||
anchor_bottom = 1.0
|
||||
grow_horizontal = 2
|
||||
grow_vertical = 2
|
||||
texture = ExtResource("1_j8fyu")
|
||||
|
||||
[node name="MC_Title" type="MarginContainer" parent="."]
|
||||
layout_mode = 1
|
||||
anchors_preset = 15
|
||||
anchor_right = 1.0
|
||||
anchor_bottom = 1.0
|
||||
grow_horizontal = 2
|
||||
grow_vertical = 2
|
||||
|
||||
[node name="L_Title" type="Label" parent="MC_Title"]
|
||||
layout_mode = 2
|
||||
text = "游戏名称"
|
||||
|
||||
[node name="MC_Options" type="MarginContainer" parent="."]
|
||||
layout_mode = 1
|
||||
anchors_preset = 15
|
||||
anchor_right = 1.0
|
||||
anchor_bottom = 1.0
|
||||
grow_horizontal = 2
|
||||
grow_vertical = 2
|
||||
|
||||
[node name="VBoxContainer" type="VBoxContainer" parent="MC_Options"]
|
||||
layout_mode = 2
|
||||
|
||||
[node name="B_Start" type="Button" parent="MC_Options/VBoxContainer"]
|
||||
layout_mode = 2
|
||||
text = "Start"
|
||||
|
||||
[node name="B_Continue" type="Button" parent="MC_Options/VBoxContainer"]
|
||||
layout_mode = 2
|
||||
text = "Continue
|
||||
"
|
||||
|
||||
[node name="B_Option" type="Button" parent="MC_Options/VBoxContainer"]
|
||||
layout_mode = 2
|
||||
text = "Option"
|
||||
|
||||
[node name="B_Exit" type="Button" parent="MC_Options/VBoxContainer"]
|
||||
layout_mode = 2
|
||||
text = "Exit"
|
||||
|
|
@ -0,0 +1,7 @@
|
|||
#####################
|
||||
EXAMPLE ASSET CREDITS
|
||||
#####################
|
||||
|
||||
# level_spritesheet
|
||||
https://opengameart.org/content/a-platformer-in-the-forest
|
||||
https://opengameart.org/users/buch
|
||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue