切换服务器
This commit is contained in:
parent
e1de327991
commit
61f8cbb62a
|
|
@ -1,93 +0,0 @@
|
||||||
[gd_scene load_steps=18 format=3 uid="uid://3vc8ojbiyy5w"]
|
|
||||||
|
|
||||||
[ext_resource type="PackedScene" uid="uid://gwhff4qaouxy" path="res://_player/Avatar.tscn" id="1_fdx6o"]
|
|
||||||
[ext_resource type="Script" uid="uid://crgac4manhoud" path="res://_game/game.gd" id="1_j2xwq"]
|
|
||||||
[ext_resource type="PackedScene" uid="uid://cvqehvdjpoar4" path="res://_player/player_controller.tscn" id="2_j2xwq"]
|
|
||||||
[ext_resource type="Script" uid="uid://5e157vdk6175" path="res://addons/reedscene/scene/ReedScene.gd" id="5_skiqd"]
|
|
||||||
[ext_resource type="Script" uid="uid://bh066o84byplh" path="res://addons/reedscene/scene/ReedSceneID.gd" id="6_1l6xv"]
|
|
||||||
[ext_resource type="Script" uid="uid://dn0ksjoswquf5" path="res://addons/reedscene/scene/SceneManager.gd" id="7_iaift"]
|
|
||||||
[ext_resource type="Script" uid="uid://dsgl7lbyjsiif" path="res://addons/reedscene/act/ActManager.gd" id="8_nuiql"]
|
|
||||||
[ext_resource type="Script" uid="uid://pxjf5vst08eo" path="res://addons/reedscene/prop/PropManager.gd" id="9_6aweh"]
|
|
||||||
[ext_resource type="PackedScene" uid="uid://bflwr7cryd2l0" path="res://_shared/CameraAnchor.tscn" id="10_6aweh"]
|
|
||||||
[ext_resource type="Script" uid="uid://b4menkyub4ce7" path="res://addons/reedscene/prop/PropComponent.gd" id="11_knjgm"]
|
|
||||||
[ext_resource type="Script" uid="uid://di41kt2tj34c2" path="res://addons/reedscene/prop/StateManager.gd" id="12_7onhb"]
|
|
||||||
[ext_resource type="PackedScene" uid="uid://bonrls3iuhdqb" path="res://_props/_prefabs/player/player_trigger_volumn.tscn" id="13_6aweh"]
|
|
||||||
[ext_resource type="Script" uid="uid://7lml6d1t5xtq" path="res://addons/reedscene/prop/PropState.gd" id="13_28rt5"]
|
|
||||||
[ext_resource type="Script" uid="uid://cdvgq0xqdbagk" path="res://addons/reedscene/prop/ReedPropEffect.gd" id="13_knjgm"]
|
|
||||||
|
|
||||||
[sub_resource type="Resource" id="Resource_7onhb"]
|
|
||||||
script = ExtResource("13_knjgm")
|
|
||||||
property_name = &"priority"
|
|
||||||
value = 0
|
|
||||||
metadata/_custom_type_script = "uid://cdvgq0xqdbagk"
|
|
||||||
|
|
||||||
[sub_resource type="Resource" id="Resource_knjgm"]
|
|
||||||
script = ExtResource("13_knjgm")
|
|
||||||
property_name = &"priority"
|
|
||||||
value = 1000
|
|
||||||
metadata/_custom_type_script = "uid://cdvgq0xqdbagk"
|
|
||||||
|
|
||||||
[sub_resource type="RectangleShape2D" id="RectangleShape2D_knjgm"]
|
|
||||||
size = Vector2(661, 379)
|
|
||||||
|
|
||||||
[node name="Game" type="Node2D"]
|
|
||||||
script = ExtResource("1_j2xwq")
|
|
||||||
|
|
||||||
[node name="PlayerController" parent="." node_paths=PackedStringArray("auto_controlled_avatar") instance=ExtResource("2_j2xwq")]
|
|
||||||
auto_controlled_avatar = NodePath("../Avatar")
|
|
||||||
|
|
||||||
[node name="Avatar" parent="." instance=ExtResource("1_fdx6o")]
|
|
||||||
position = Vector2(349, -271)
|
|
||||||
collision_mask = 4
|
|
||||||
|
|
||||||
[node name="ReedScene" type="Node2D" parent="."]
|
|
||||||
script = ExtResource("5_skiqd")
|
|
||||||
metadata/_custom_type_script = "uid://5e157vdk6175"
|
|
||||||
|
|
||||||
[node name="[Invalid!]" type="Node" parent="ReedScene"]
|
|
||||||
script = ExtResource("6_1l6xv")
|
|
||||||
|
|
||||||
[node name="SceneManager" type="Node" parent="ReedScene"]
|
|
||||||
script = ExtResource("7_iaift")
|
|
||||||
|
|
||||||
[node name="ActManager" type="Node" parent="ReedScene"]
|
|
||||||
script = ExtResource("8_nuiql")
|
|
||||||
|
|
||||||
[node name="Props" type="Node2D" parent="ReedScene"]
|
|
||||||
script = ExtResource("9_6aweh")
|
|
||||||
|
|
||||||
[node name="CameraAnchor" parent="ReedScene/Props" instance=ExtResource("10_6aweh")]
|
|
||||||
|
|
||||||
[node name="[Prop_0000]" type="Node" parent="ReedScene/Props/CameraAnchor"]
|
|
||||||
script = ExtResource("11_knjgm")
|
|
||||||
prop_id = 0
|
|
||||||
|
|
||||||
[node name="States" type="Node" parent="ReedScene/Props/CameraAnchor/[Prop_0000]"]
|
|
||||||
script = ExtResource("12_7onhb")
|
|
||||||
|
|
||||||
[node name="[ID_0] Disable" type="Node" parent="ReedScene/Props/CameraAnchor/[Prop_0000]/States"]
|
|
||||||
script = ExtResource("13_28rt5")
|
|
||||||
state_id = 0
|
|
||||||
effects = Array[ExtResource("13_knjgm")]([SubResource("Resource_7onhb")])
|
|
||||||
|
|
||||||
[node name="[ID_1] Enable" type="Node" parent="ReedScene/Props/CameraAnchor/[Prop_0000]/States"]
|
|
||||||
script = ExtResource("13_28rt5")
|
|
||||||
state_id = 1
|
|
||||||
effects = Array[ExtResource("13_knjgm")]([SubResource("Resource_knjgm")])
|
|
||||||
|
|
||||||
[node name="PlayerTriggerVolumn" parent="ReedScene/Props" instance=ExtResource("13_6aweh")]
|
|
||||||
|
|
||||||
[node name="CollisionShape2D" type="CollisionShape2D" parent="ReedScene/Props/PlayerTriggerVolumn"]
|
|
||||||
shape = SubResource("RectangleShape2D_knjgm")
|
|
||||||
debug_color = Color(0.70308036, 0.46053094, 0.46591634, 0.41960785)
|
|
||||||
|
|
||||||
[node name="[Prop_0001]" type="Node" parent="ReedScene/Props/PlayerTriggerVolumn"]
|
|
||||||
script = ExtResource("11_knjgm")
|
|
||||||
prop_id = 1
|
|
||||||
|
|
||||||
[node name="States" type="Node" parent="ReedScene/Props/PlayerTriggerVolumn/[Prop_0001]"]
|
|
||||||
script = ExtResource("12_7onhb")
|
|
||||||
|
|
||||||
[node name="[ID_0] Default" type="Node" parent="ReedScene/Props/PlayerTriggerVolumn/[Prop_0001]/States"]
|
|
||||||
script = ExtResource("13_28rt5")
|
|
||||||
state_id = 0
|
|
||||||
File diff suppressed because one or more lines are too long
|
|
@ -0,0 +1,7 @@
|
||||||
|
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)
|
||||||
|
|
@ -0,0 +1 @@
|
||||||
|
uid://d3600a4hjp6y6
|
||||||
|
|
@ -0,0 +1,10 @@
|
||||||
|
[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"
|
||||||
|
|
@ -0,0 +1,10 @@
|
||||||
|
[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"
|
||||||
|
|
@ -0,0 +1,11 @@
|
||||||
|
[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"
|
||||||
|
|
@ -0,0 +1,11 @@
|
||||||
|
[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,19 +0,0 @@
|
||||||
@tool
|
|
||||||
class_name CameraAnchor extends Node2D
|
|
||||||
|
|
||||||
@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
|
|
||||||
|
|
||||||
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)
|
|
||||||
|
|
@ -0,0 +1,42 @@
|
||||||
|
@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,6 +1,6 @@
|
||||||
[gd_scene load_steps=2 format=3 uid="uid://bflwr7cryd2l0"]
|
[gd_scene load_steps=2 format=3 uid="uid://bflwr7cryd2l0"]
|
||||||
|
|
||||||
[ext_resource type="Script" uid="uid://dyxrydokgy0qs" path="res://_shared/CameraAnchor.gd" id="1_dhu66"]
|
[ext_resource type="Script" uid="uid://dyxrydokgy0qs" path="res://_shared/camera/CameraAnchor.gd" id="1_dhu66"]
|
||||||
|
|
||||||
[node name="CameraAnchor" type="Node2D"]
|
[node name="CameraAnchor" type="Node2D"]
|
||||||
script = ExtResource("1_dhu66")
|
script = ExtResource("1_dhu66")
|
||||||
|
|
@ -1,19 +0,0 @@
|
||||||
extends Node
|
|
||||||
|
|
||||||
var _cached_player_camera: GlobalCamera
|
|
||||||
|
|
||||||
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
|
|
||||||
|
|
@ -1,9 +1,4 @@
|
||||||
[gd_scene load_steps=3 format=3 uid="uid://b8pv5wtbo0y20"]
|
'''全局的相机管理器
|
||||||
|
|
||||||
[ext_resource type="Script" uid="uid://bd046eokvcnu2" path="res://addons/phantom_camera/scripts/phantom_camera_host/phantom_camera_host.gd" id="2_s84x6"]
|
|
||||||
|
|
||||||
[sub_resource type="GDScript" id="GDScript_3tsvq"]
|
|
||||||
script/source = "'''全局的相机管理器
|
|
||||||
|
|
||||||
======= 外部调用函数 =======
|
======= 外部调用函数 =======
|
||||||
|
|
||||||
|
|
@ -16,7 +11,7 @@ var _current_anchor: CameraAnchor
|
||||||
var _switch_tween: Tween
|
var _switch_tween: Tween
|
||||||
|
|
||||||
## 玩家关卡内静态相机
|
## 玩家关卡内静态相机
|
||||||
const PLAYER_CAMERA_SCENE:= preload(\"res://_shared/camera/PlayerStaticCamera.tscn\")
|
const PLAYER_CAMERA_SCENE:= preload("res://_shared/camera/PlayerStaticCamera.tscn")
|
||||||
|
|
||||||
## 注册玩家相机
|
## 注册玩家相机
|
||||||
func register_player_camera(owner: Node) -> GlobalCamera:
|
func register_player_camera(owner: Node) -> GlobalCamera:
|
||||||
|
|
@ -38,9 +33,17 @@ func register_anchor(anchor: CameraAnchor) -> void:
|
||||||
if anchor in _cached_anchors:
|
if anchor in _cached_anchors:
|
||||||
return
|
return
|
||||||
_cached_anchors.append(anchor)
|
_cached_anchors.append(anchor)
|
||||||
|
anchor.on_priority_change.connect(on_anchor_priority_changed)
|
||||||
_sort_anchors()
|
_sort_anchors()
|
||||||
_try_auto_switch()
|
_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:
|
func unregister_anchor(anchor: CameraAnchor) -> void:
|
||||||
_cached_anchors.erase(anchor)
|
_cached_anchors.erase(anchor)
|
||||||
|
|
@ -51,7 +54,7 @@ func unregister_anchor(anchor: CameraAnchor) -> void:
|
||||||
## 排序已有的锚点
|
## 排序已有的锚点
|
||||||
func _sort_anchors() -> void:
|
func _sort_anchors() -> void:
|
||||||
_cached_anchors.sort_custom(func(a, b):
|
_cached_anchors.sort_custom(func(a, b):
|
||||||
return a.priority > b.priority
|
return a._priority > b._priority
|
||||||
)
|
)
|
||||||
|
|
||||||
## 尝试自切换
|
## 尝试自切换
|
||||||
|
|
@ -59,12 +62,13 @@ func _try_auto_switch() -> void:
|
||||||
for a in _cached_anchors:
|
for a in _cached_anchors:
|
||||||
if a.enabled:
|
if a.enabled:
|
||||||
switch_anchor(a)
|
switch_anchor(a)
|
||||||
|
_current_anchor = a
|
||||||
return
|
return
|
||||||
|
|
||||||
## 重置所有的Camera的priority
|
## 重置所有的Camera的_priority
|
||||||
func reset_all_camera_priority() -> void:
|
func reset_all_camera_priority() -> void:
|
||||||
for a in _cached_anchors:
|
for a in _cached_anchors:
|
||||||
a.priority = 0
|
a._priority = 0
|
||||||
|
|
||||||
## 切换相机
|
## 切换相机
|
||||||
func switch_anchor(target_anchor: CameraAnchor) -> void:
|
func switch_anchor(target_anchor: CameraAnchor) -> void:
|
||||||
|
|
@ -92,7 +96,7 @@ func switch_anchor(target_anchor: CameraAnchor) -> void:
|
||||||
# ===== 位置 =====
|
# ===== 位置 =====
|
||||||
_switch_tween.tween_property(
|
_switch_tween.tween_property(
|
||||||
camera,
|
camera,
|
||||||
\"global_position\",
|
"global_position",
|
||||||
target_anchor.global_position,
|
target_anchor.global_position,
|
||||||
blend_time
|
blend_time
|
||||||
)
|
)
|
||||||
|
|
@ -100,7 +104,7 @@ func switch_anchor(target_anchor: CameraAnchor) -> void:
|
||||||
# ===== Zoom =====
|
# ===== Zoom =====
|
||||||
_switch_tween.tween_property(
|
_switch_tween.tween_property(
|
||||||
camera,
|
camera,
|
||||||
\"zoom\",
|
"zoom",
|
||||||
target_anchor.zoom,
|
target_anchor.zoom,
|
||||||
blend_time
|
blend_time
|
||||||
)
|
)
|
||||||
|
|
@ -108,7 +112,7 @@ func switch_anchor(target_anchor: CameraAnchor) -> void:
|
||||||
# ===== Offset =====
|
# ===== Offset =====
|
||||||
_switch_tween.tween_property(
|
_switch_tween.tween_property(
|
||||||
camera,
|
camera,
|
||||||
\"offset\",
|
"offset",
|
||||||
target_anchor.offset,
|
target_anchor.offset,
|
||||||
blend_time
|
blend_time
|
||||||
)
|
)
|
||||||
|
|
@ -119,15 +123,3 @@ func switch_anchor(target_anchor: CameraAnchor) -> void:
|
||||||
)
|
)
|
||||||
|
|
||||||
_current_anchor = target_anchor
|
_current_anchor = target_anchor
|
||||||
"
|
|
||||||
|
|
||||||
[node name="CameraSystem" type="Node"]
|
|
||||||
script = SubResource("GDScript_3tsvq")
|
|
||||||
|
|
||||||
[node name="Camera2D" type="Camera2D" parent="."]
|
|
||||||
|
|
||||||
[node name="PhantomCameraHost" type="Node" parent="Camera2D"]
|
|
||||||
process_priority = 300
|
|
||||||
process_physics_priority = 300
|
|
||||||
script = ExtResource("2_s84x6")
|
|
||||||
metadata/_custom_type_script = "uid://bd046eokvcnu2"
|
|
||||||
|
|
@ -0,0 +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"]
|
||||||
|
|
||||||
|
[node name="CameraSystem" type="Node"]
|
||||||
|
script = ExtResource("1_xxnab")
|
||||||
|
|
||||||
|
[node name="Camera2D" type="Camera2D" parent="."]
|
||||||
|
|
||||||
|
[node name="PhantomCameraHost" type="Node" parent="Camera2D"]
|
||||||
|
process_priority = 300
|
||||||
|
process_physics_priority = 300
|
||||||
|
script = ExtResource("2_385ly")
|
||||||
|
metadata/_custom_type_script = "uid://bd046eokvcnu2"
|
||||||
|
|
@ -1,8 +1,12 @@
|
||||||
[gd_scene load_steps=4 format=3 uid="uid://d1w8ftfhxycfy"]
|
[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://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://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://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"]
|
[node name="PlayerStaticCamera" type="Node2D"]
|
||||||
script = ExtResource("1_fixiw")
|
script = ExtResource("1_fixiw")
|
||||||
|
|
@ -11,6 +15,7 @@ script = ExtResource("1_fixiw")
|
||||||
unique_name_in_owner = true
|
unique_name_in_owner = true
|
||||||
script = ExtResource("1_llsih")
|
script = ExtResource("1_llsih")
|
||||||
priority = 1000
|
priority = 1000
|
||||||
|
tween_resource = SubResource("Resource_pvk7k")
|
||||||
tween_on_load = false
|
tween_on_load = false
|
||||||
draw_limits = true
|
draw_limits = true
|
||||||
metadata/_custom_type_script = "uid://bhexx6mj1xv3q"
|
metadata/_custom_type_script = "uid://bhexx6mj1xv3q"
|
||||||
|
|
|
||||||
|
|
@ -12,8 +12,8 @@ var _gen_default_act: Callable = Callable(self, "_editor_generate_default_act")
|
||||||
var _gen_empty_act: Callable = Callable(self, "_editor_generate_empty_act")
|
var _gen_empty_act: Callable = Callable(self, "_editor_generate_empty_act")
|
||||||
##是否要输出报错信息
|
##是否要输出报错信息
|
||||||
@export var debug_log: bool = false
|
@export var debug_log: bool = false
|
||||||
##关卡的初始Act,默认Clamp到Act的数量,防止出现错误
|
##关卡的初始Act,默认Clamp到Act的数量,防止出现错误,此处的-1是用来占位的,如果是 -1,意味着不修改,使用const的Id,即0
|
||||||
@export var init_act_id: int = 0:
|
@export var init_act_id: int = -1:
|
||||||
set(value):
|
set(value):
|
||||||
var max_index := max(prop_state_map.size() - 1, 0)
|
var max_index := max(prop_state_map.size() - 1, 0)
|
||||||
init_act_id = clamp(value, 0, max_index)
|
init_act_id = clamp(value, 0, max_index)
|
||||||
|
|
|
||||||
|
|
@ -96,7 +96,7 @@ func _ready() -> void:
|
||||||
pc.init()
|
pc.init()
|
||||||
|
|
||||||
## act manger 切换一次
|
## act manger 切换一次
|
||||||
_act_manager.switch_act_with_id(_act_manager.DEFAULT_ACT_ID)
|
_act_manager.switch_act_with_id(_act_manager.DEFAULT_ACT_ID if _act_manager.init_act_id < 0 else _act_manager.init_act_id)
|
||||||
|
|
||||||
## 如果prop有复写init state的选项,则overwrite
|
## 如果prop有复写init state的选项,则overwrite
|
||||||
for pc in pcs:
|
for pc in pcs:
|
||||||
|
|
|
||||||
|
|
@ -18,7 +18,7 @@ config/icon="res://icon.svg"
|
||||||
[autoload]
|
[autoload]
|
||||||
|
|
||||||
PhantomCameraManager="*res://addons/phantom_camera/scripts/managers/phantom_camera_manager.gd"
|
PhantomCameraManager="*res://addons/phantom_camera/scripts/managers/phantom_camera_manager.gd"
|
||||||
CameraSystem="*res://_shared/camera/camera_shake/CameraSystem.tscn"
|
CameraSystem="*res://_shared/camera/CameraSystem.tscn"
|
||||||
GlobalEvent="*res://_shared/global_event.gd"
|
GlobalEvent="*res://_shared/global_event.gd"
|
||||||
ReedVFX="*res://addons/reedfx/vfx/ReedVFXSystem.tscn"
|
ReedVFX="*res://addons/reedfx/vfx/ReedVFXSystem.tscn"
|
||||||
ReedSceneRegistry="*res://addons/reedscene/scene/SceneRegistry.gd"
|
ReedSceneRegistry="*res://addons/reedscene/scene/SceneRegistry.gd"
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue