小更新
This commit is contained in:
parent
3f3bf3331f
commit
d770c55851
|
|
@ -51,32 +51,32 @@ tile_map_data = PackedByteArray("AAAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAIAAAAAAAA
|
||||||
auto_controlled_avatar = NodePath("../Avatar")
|
auto_controlled_avatar = NodePath("../Avatar")
|
||||||
|
|
||||||
[node name="Avatar" parent="." instance=ExtResource("3_6jw57")]
|
[node name="Avatar" parent="." instance=ExtResource("3_6jw57")]
|
||||||
position = Vector2(218, 251)
|
position = Vector2(606, 108)
|
||||||
collision_mask = 4
|
collision_mask = 4
|
||||||
|
|
||||||
[node name="EventTriggerDoor" parent="." instance=ExtResource("4_p0ota")]
|
[node name="EventTriggerDoor" parent="." instance=ExtResource("4_p0ota")]
|
||||||
position = Vector2(342, 176)
|
position = Vector2(342, 176)
|
||||||
|
|
||||||
[node name="PropComponent" type="Node" parent="EventTriggerDoor"]
|
[node name="[Prop_0001]" type="Node" parent="EventTriggerDoor"]
|
||||||
script = ExtResource("5_gslp7")
|
script = ExtResource("5_gslp7")
|
||||||
prop_id = 1
|
prop_id = 1
|
||||||
metadata/_custom_type_script = "uid://b4menkyub4ce7"
|
metadata/_custom_type_script = "uid://b4menkyub4ce7"
|
||||||
|
|
||||||
[node name="States" type="Node" parent="EventTriggerDoor/PropComponent"]
|
[node name="States" type="Node" parent="EventTriggerDoor/[Prop_0001]"]
|
||||||
|
|
||||||
[node name="Close" type="Node" parent="EventTriggerDoor/PropComponent/States"]
|
[node name="Close" type="Node" parent="EventTriggerDoor/[Prop_0001]/States"]
|
||||||
script = ExtResource("6_6jw57")
|
script = ExtResource("6_6jw57")
|
||||||
state_id = 0
|
state_id = 0
|
||||||
effects = Array[ExtResource("7_2t6pm")]([SubResource("Resource_2t6pm")])
|
effects = Array[ExtResource("7_2t6pm")]([SubResource("Resource_2t6pm")])
|
||||||
metadata/_custom_type_script = "uid://7lml6d1t5xtq"
|
metadata/_custom_type_script = "uid://7lml6d1t5xtq"
|
||||||
|
|
||||||
[node name="Open" type="Node" parent="EventTriggerDoor/PropComponent/States"]
|
[node name="Open" type="Node" parent="EventTriggerDoor/[Prop_0001]/States"]
|
||||||
script = ExtResource("6_6jw57")
|
script = ExtResource("6_6jw57")
|
||||||
state_id = 1
|
state_id = 1
|
||||||
effects = Array[ExtResource("7_2t6pm")]([SubResource("Resource_g37lb")])
|
effects = Array[ExtResource("7_2t6pm")]([SubResource("Resource_g37lb")])
|
||||||
metadata/_custom_type_script = "uid://7lml6d1t5xtq"
|
metadata/_custom_type_script = "uid://7lml6d1t5xtq"
|
||||||
|
|
||||||
[node name="FromClose" type="Node" parent="EventTriggerDoor/PropComponent/States/Open"]
|
[node name="FromClose" type="Node" parent="EventTriggerDoor/[Prop_0001]/States/Open"]
|
||||||
script = ExtResource("8_xkd7q")
|
script = ExtResource("8_xkd7q")
|
||||||
from_state_id = 0
|
from_state_id = 0
|
||||||
effects = Array[ExtResource("7_2t6pm")]([SubResource("Resource_xkd7q")])
|
effects = Array[ExtResource("7_2t6pm")]([SubResource("Resource_xkd7q")])
|
||||||
|
|
@ -87,15 +87,15 @@ script = ExtResource("9_ady2r")
|
||||||
tween_resource = SubResource("Resource_xja44")
|
tween_resource = SubResource("Resource_xja44")
|
||||||
metadata/_custom_type_script = "uid://bhexx6mj1xv3q"
|
metadata/_custom_type_script = "uid://bhexx6mj1xv3q"
|
||||||
|
|
||||||
[node name="PropComponent" type="Node" parent="PhantomCamera2D"]
|
[node name="[Prop_0000]" type="Node" parent="PhantomCamera2D"]
|
||||||
script = ExtResource("5_gslp7")
|
script = ExtResource("5_gslp7")
|
||||||
prop_id = 0
|
prop_id = 0
|
||||||
metadata/_custom_type_script = "uid://b4menkyub4ce7"
|
metadata/_custom_type_script = "uid://b4menkyub4ce7"
|
||||||
|
|
||||||
[node name="States" type="Node" parent="PhantomCamera2D/PropComponent"]
|
[node name="States" type="Node" parent="PhantomCamera2D/[Prop_0000]"]
|
||||||
script = ExtResource("11_m16wo")
|
script = ExtResource("11_m16wo")
|
||||||
|
|
||||||
[node name="[ID_0] Default" type="Node" parent="PhantomCamera2D/PropComponent/States"]
|
[node name="[ID_0] Default" type="Node" parent="PhantomCamera2D/[Prop_0000]/States"]
|
||||||
script = ExtResource("6_6jw57")
|
script = ExtResource("6_6jw57")
|
||||||
state_id = 0
|
state_id = 0
|
||||||
|
|
||||||
|
|
@ -112,3 +112,45 @@ script = ExtResource("12_xja44")
|
||||||
|
|
||||||
[node name="Props" type="Node2D" parent="ReedScene"]
|
[node name="Props" type="Node2D" parent="ReedScene"]
|
||||||
script = ExtResource("14_3ihdv")
|
script = ExtResource("14_3ihdv")
|
||||||
|
|
||||||
|
[node name="EventTriggerDoor" parent="ReedScene/Props" instance=ExtResource("4_p0ota")]
|
||||||
|
position = Vector2(832, 64)
|
||||||
|
|
||||||
|
[node name="[Prop_0000]" type="Node" parent="ReedScene/Props/EventTriggerDoor"]
|
||||||
|
script = ExtResource("5_gslp7")
|
||||||
|
prop_id = 0
|
||||||
|
|
||||||
|
[node name="States" type="Node" parent="ReedScene/Props/EventTriggerDoor/[Prop_0000]"]
|
||||||
|
script = ExtResource("11_m16wo")
|
||||||
|
|
||||||
|
[node name="[ID_0] Default" type="Node" parent="ReedScene/Props/EventTriggerDoor/[Prop_0000]/States"]
|
||||||
|
script = ExtResource("6_6jw57")
|
||||||
|
state_id = 0
|
||||||
|
|
||||||
|
[node name="EventTriggerDoor2" parent="ReedScene/Props" instance=ExtResource("4_p0ota")]
|
||||||
|
position = Vector2(723, 64)
|
||||||
|
|
||||||
|
[node name="[Prop_0001]" type="Node" parent="ReedScene/Props/EventTriggerDoor2"]
|
||||||
|
script = ExtResource("5_gslp7")
|
||||||
|
prop_id = 1
|
||||||
|
|
||||||
|
[node name="States" type="Node" parent="ReedScene/Props/EventTriggerDoor2/[Prop_0001]"]
|
||||||
|
script = ExtResource("11_m16wo")
|
||||||
|
|
||||||
|
[node name="[ID_0] Default" type="Node" parent="ReedScene/Props/EventTriggerDoor2/[Prop_0001]/States"]
|
||||||
|
script = ExtResource("6_6jw57")
|
||||||
|
state_id = 0
|
||||||
|
|
||||||
|
[node name="EventTriggerDoor3" parent="ReedScene/Props" instance=ExtResource("4_p0ota")]
|
||||||
|
position = Vector2(458, 63)
|
||||||
|
|
||||||
|
[node name="[Prop_0002]" type="Node" parent="ReedScene/Props/EventTriggerDoor3"]
|
||||||
|
script = ExtResource("5_gslp7")
|
||||||
|
prop_id = 2
|
||||||
|
|
||||||
|
[node name="States" type="Node" parent="ReedScene/Props/EventTriggerDoor3/[Prop_0002]"]
|
||||||
|
script = ExtResource("11_m16wo")
|
||||||
|
|
||||||
|
[node name="[ID_0] Default" type="Node" parent="ReedScene/Props/EventTriggerDoor3/[Prop_0002]/States"]
|
||||||
|
script = ExtResource("6_6jw57")
|
||||||
|
state_id = 0
|
||||||
|
|
|
||||||
|
|
@ -12,6 +12,8 @@ var _gen_default_act: Callable = Callable(self, "_editor_generate_default_act")
|
||||||
##是否要输出报错信息
|
##是否要输出报错信息
|
||||||
@export var debug_log: bool = false
|
@export var debug_log: bool = false
|
||||||
|
|
||||||
|
signal act_changed(from_act_id: int, to_act_id: int)
|
||||||
|
|
||||||
##用来扫描prop
|
##用来扫描prop
|
||||||
func _scan_scene_for_props(scene_root: Node) -> Dictionary:
|
func _scan_scene_for_props(scene_root: Node) -> Dictionary:
|
||||||
var result := {}
|
var result := {}
|
||||||
|
|
@ -76,7 +78,7 @@ func _editor_generate_default_act() -> void:
|
||||||
|
|
||||||
var pid := prop_comp.prop_id
|
var pid := prop_comp.prop_id
|
||||||
var init_state := prop_comp.initial_state_id
|
var init_state := prop_comp.initial_state_id
|
||||||
act.prop_state_map[pid] = init_state
|
act.prop_state_map[pid].state_id = init_state
|
||||||
count += 1
|
count += 1
|
||||||
|
|
||||||
prop_state_map[0] = act
|
prop_state_map[0] = act
|
||||||
|
|
|
||||||
|
|
@ -56,7 +56,6 @@ const SCENE_MANAGER_NAME := "SceneManager"
|
||||||
## ==============================
|
## ==============================
|
||||||
## Internal State
|
## Internal State
|
||||||
## ==============================
|
## ==============================
|
||||||
|
|
||||||
var _act_manager: ActManager
|
var _act_manager: ActManager
|
||||||
var _props_root: Node
|
var _props_root: Node
|
||||||
var _prop_map: Dictionary = {} # prop_id -> PropComponent
|
var _prop_map: Dictionary = {} # prop_id -> PropComponent
|
||||||
|
|
@ -126,11 +125,10 @@ func _find_prop_component(prop: Node) -> PropComponent:
|
||||||
func _bind_act_events() -> void:
|
func _bind_act_events() -> void:
|
||||||
if _act_manager == null:
|
if _act_manager == null:
|
||||||
return
|
return
|
||||||
|
|
||||||
_act_manager.act_changed.connect(_on_act_changed)
|
_act_manager.act_changed.connect(_on_act_changed)
|
||||||
|
|
||||||
|
|
||||||
func _on_act_changed(from_act: StringName, to_act: StringName) -> void:
|
func _on_act_changed(from_act: int, to_act: int) -> void:
|
||||||
if debug_log:
|
if debug_log:
|
||||||
print("[ReedScene] Act changed:", from_act, "->", to_act)
|
print("[ReedScene] Act changed:", from_act, "->", to_act)
|
||||||
|
|
||||||
|
|
@ -153,7 +151,6 @@ func _editor_ensure_node(name: String, type: Variant) -> Node:
|
||||||
node.name = name
|
node.name = name
|
||||||
add_child(node)
|
add_child(node)
|
||||||
|
|
||||||
# ⚠️ 关键:让节点成为 Scene 的一部分
|
|
||||||
node.owner = get_tree().edited_scene_root
|
node.owner = get_tree().edited_scene_root
|
||||||
|
|
||||||
if debug_log:
|
if debug_log:
|
||||||
|
|
|
||||||
14
update.md
14
update.md
|
|
@ -32,6 +32,10 @@ v0.2.3
|
||||||
- 基础的关卡编辑器,主要明确了几个概念:Prop Scene,Act,目前已经有了一个基础的展示功能性质的Demo
|
- 基础的关卡编辑器,主要明确了几个概念:Prop Scene,Act,目前已经有了一个基础的展示功能性质的Demo
|
||||||
- 分离了Player和控制器,现在Player是Avatar,控制器是PlayerController,控制器向玩家发送指令,玩家接收指令以驱动功能。
|
- 分离了Player和控制器,现在Player是Avatar,控制器是PlayerController,控制器向玩家发送指令,玩家接收指令以驱动功能。
|
||||||
|
|
||||||
|
v0.2.4
|
||||||
|
|
||||||
|
- 鈎爪的基礎版本,包含了鈎爪類,鈎爪管理類,鈎爪錨點類等,鈎爪的移動方式是在LocoComp裏添加了一個額外的移動模式。
|
||||||
|
|
||||||
## 更新计划
|
## 更新计划
|
||||||
|
|
||||||
V0.1
|
V0.1
|
||||||
|
|
@ -99,8 +103,18 @@ V0.3
|
||||||
- [ ] 可以通過signal播放不同的相機震動
|
- [ ] 可以通過signal播放不同的相機震動
|
||||||
- [ ] 可以播放一個隨機的SFX Asset
|
- [ ] 可以播放一個隨機的SFX Asset
|
||||||
- [ ] 不同的SFX預設
|
- [ ] 不同的SFX預設
|
||||||
|
- [ ] GlobalCameraManger
|
||||||
|
- [ ] 全局的相機管理器,可以用來切換相機在不同的幾個預設之間切換
|
||||||
|
- [ ] 敘事性相機
|
||||||
|
- [ ] 跟隨玩家的運動性相機
|
||||||
|
|
||||||
|
|
||||||
V0.4
|
V0.4
|
||||||
主要是拓展基于项目的特殊需求,包括:
|
主要是拓展基于项目的特殊需求,包括:
|
||||||
|
|
||||||
- [ ] 钩爪功能基本实现
|
- [ ] 钩爪功能基本实现
|
||||||
|
- [x] 飛向目標點
|
||||||
|
- [x] 如果目標點移動,會持續跟隨
|
||||||
|
- [ ] 細化手感參數
|
||||||
|
- [ ] 在鈎爪飛到一半的時候可以取消鈎爪
|
||||||
|
- [x] 鈎爪的長度可變
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue