更新 readme 代码说明
This commit is contained in:
parent
571c6ab74c
commit
b4d34bccb2
30
README.md
30
README.md
@ -68,7 +68,7 @@ GroundLoader 加载/切换 Ground 时,分为上下两段转场:
|
|||||||
1. ambient:光照
|
1. ambient:光照
|
||||||
2. general:音效等
|
2. general:音效等
|
||||||
3. partical:粒子效果
|
3. partical:粒子效果
|
||||||
4. ux:用户交互
|
4. ux:用户交互相关
|
||||||
|
|
||||||
主要类型说明:
|
主要类型说明:
|
||||||
|
|
||||||
@ -77,17 +77,37 @@ GroundLoader 加载/切换 Ground 时,分为上下两段转场:
|
|||||||
2. 可配置触发方式:enter, area_enter, interact
|
2. 可配置触发方式:enter, area_enter, interact
|
||||||
3. 可在场景加载时触发
|
3. 可在场景加载时触发
|
||||||
4. 触发效果有:播放对话(期间锁定玩家);播放动画;回调方法(AnimationPlayer 的方法,注意“_”开头的方法会被忽略)
|
4. 触发效果有:播放对话(期间锁定玩家);播放动画;回调方法(AnimationPlayer 的方法,注意“_”开头的方法会被忽略)
|
||||||
2. inspectable:可在检阅窗口进行审视的物品,可以附加文案
|
2. 【已废弃】inspectable:可在检阅窗口进行审视的物品,可以附加文案
|
||||||
3. local_inspectable:运镜+检阅,无需检阅窗口
|
3. local_inspectable:运镜+检阅,无需检阅窗口
|
||||||
4. note:显示文案
|
4. note:显示文案
|
||||||
1. 显示方式:os(玩家头顶气泡),ballon(下方字幕,可播放配音)
|
1. 显示方式:os(玩家头顶气泡),ballon(下方字幕,可播放配音)
|
||||||
5. npc
|
5. npc
|
||||||
|
1. hook/unhook speaking:控制 NPC 在玩家未交互时显示对话气泡,配合触发播放 Dialogue 的情景(enable==false时也可生效)
|
||||||
6. portal:传送门
|
6. portal:传送门
|
||||||
1. 名称有: left(默认), right(默认), 1, 2, 3, ...
|
1. 名称有: left(默认), right(默认), 1, 2, 3, ... 其中 left/right 在玩家进入时会改变朝向(left 进入时朝右,right 进入时朝左)
|
||||||
2. 关键参数:targer_scene 与 target_portal(target_portal 为 none 时不启用)
|
2. 关键参数:targer_scene 与 target_portal(target_portal 为 none 时不启用)
|
||||||
3. 三种模式:default(通道);opened(打开的门);locked(锁定的门);对应不同图标与操作音效
|
3. 三种模式:default(通道);opened(打开的门);locked(锁定的门);对应不同图标与操作音效
|
||||||
4. 锁定的门可以配置启用钥匙(prop_key),可在使用后自动消耗该钥匙
|
4. 锁定的门可以配置启用钥匙(prop_key),可在使用后自动消耗该钥匙
|
||||||
|
7. pickable: 可用于拾取道具,可作为重要物品(as_important_prop)
|
||||||
|
8. closeup: 可配置内部 PackedScene,display 在 child 下
|
||||||
|
1. 可设置是否 exit_on_cancel
|
||||||
|
2. 读取并连接 PackedScene 的 exit 信号,PackedScene exit 可传递参数(可选)
|
||||||
|
|
||||||
|
特殊 UX 类型:
|
||||||
|
|
||||||
|
1. 刮刮乐:可以按进度刮开其中内容
|
||||||
|
2. Sign Snapper 拉动机制:
|
||||||
|
1. 自动锁定玩家操作,调用 walk_to 指定位置
|
||||||
|
2. 自动优化范围:忽略小范围移动以防抽动,最低活动距离
|
||||||
|
3. Draggable (目录: scene/little_game/general/)
|
||||||
|
1. hover 时 sprite 自动描白边(需配置子节点 CollisionShape)
|
||||||
|
2. pick & drag & drop
|
||||||
|
3. drag 活动范围
|
||||||
|
4. 可启用 as_button 效果,picked signal
|
||||||
|
4. wheel: 检测鼠标按住后,围绕中心旋转操作
|
||||||
|
5. HoverLightClickArea
|
||||||
|
1. hover 时高亮(需配置子节点 PointLight 与 CollisionShape))
|
||||||
|
|
||||||
### AimationPlayer Tool Button 说明
|
### AimationPlayer Tool Button 说明
|
||||||
|
|
||||||
#### 存档 Tool Button
|
#### 存档 Tool Button
|
||||||
@ -170,9 +190,6 @@ current_scene 是通过 GroundLoader 加载的,在 ground loader 加载 ground
|
|||||||
- PropHud 切换与点击展示
|
- PropHud 切换与点击展示
|
||||||
- 左键点击展开 Hud
|
- 左键点击展开 Hud
|
||||||
- 右键点击检阅道具
|
- 右键点击检阅道具
|
||||||
- SignSnapper 拉动机制
|
|
||||||
- 自动锁定玩家操作,调用 walk_to 指定位置
|
|
||||||
- 自动优化范围:忽略小范围移动以防抽动,最低活动距离
|
|
||||||
- ReenterLock 机制
|
- ReenterLock 机制
|
||||||
- 可重入锁
|
- 可重入锁
|
||||||
- Editor 中运行可 Debug 输出调用位置(调用 lock 的代码文件&代码行)
|
- Editor 中运行可 Debug 输出调用位置(调用 lock 的代码文件&代码行)
|
||||||
@ -185,4 +202,5 @@ current_scene 是通过 GroundLoader 加载的,在 ground loader 加载 ground
|
|||||||
- 比 Event2D 更轻量灵活的 EventBinder,内有 updater 与 trigger 两种绑定
|
- 比 Event2D 更轻量灵活的 EventBinder,内有 updater 与 trigger 两种绑定
|
||||||
- updater 由 event 驱动更新父节点状态
|
- updater 由 event 驱动更新父节点状态
|
||||||
- trigger 由父节点 signal 驱动更新 event
|
- trigger 由父节点 signal 驱动更新 event
|
||||||
|
- SavingsPanel 存档管理器:可便捷地增、删、加载存档
|
||||||
- Vibe Control 控制氛围情绪音乐
|
- Vibe Control 控制氛围情绪音乐
|
||||||
|
@ -1,19 +0,0 @@
|
|||||||
extends Control
|
|
||||||
|
|
||||||
@export var width := 200:
|
|
||||||
set(val):
|
|
||||||
width = val
|
|
||||||
if is_node_ready():
|
|
||||||
label.custom_minimum_size.x = width
|
|
||||||
@export var translation_key := "":
|
|
||||||
set(val):
|
|
||||||
translation_key = val
|
|
||||||
if is_node_ready():
|
|
||||||
label.translation_key = translation_key
|
|
||||||
|
|
||||||
@onready var label = $ScrollContainer/WordsLabel as Label
|
|
||||||
|
|
||||||
|
|
||||||
func _ready() -> void:
|
|
||||||
label.custom_minimum_size.x = width
|
|
||||||
label.translation_key = translation_key
|
|
@ -1 +0,0 @@
|
|||||||
uid://pkdpas41oa2d
|
|
@ -1,51 +0,0 @@
|
|||||||
[gd_scene load_steps=4 format=3 uid="uid://cp8aee5onwjuc"]
|
|
||||||
|
|
||||||
[ext_resource type="Script" uid="uid://pkdpas41oa2d" path="res://scene/entity/ux/scrollable_words.gd" id="1_86u3k"]
|
|
||||||
[ext_resource type="Texture2D" uid="uid://f186lvt5y2ql" path="res://asset/art/ui/遮罩/inspect背景遮罩.png" id="2_gmjbs"]
|
|
||||||
[ext_resource type="Script" uid="uid://dpocj5al0rvai" path="res://ui/text_helper.gd" id="3_6l2e8"]
|
|
||||||
|
|
||||||
[node name="ScrollableWords" type="Control"]
|
|
||||||
layout_mode = 3
|
|
||||||
anchors_preset = 15
|
|
||||||
anchor_right = 1.0
|
|
||||||
anchor_bottom = 1.0
|
|
||||||
grow_horizontal = 2
|
|
||||||
grow_vertical = 2
|
|
||||||
script = ExtResource("1_86u3k")
|
|
||||||
|
|
||||||
[node name="遮罩" 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("2_gmjbs")
|
|
||||||
|
|
||||||
[node name="ScrollContainer" type="ScrollContainer" parent="."]
|
|
||||||
custom_minimum_size = Vector2(0, 200)
|
|
||||||
layout_mode = 1
|
|
||||||
anchors_preset = 8
|
|
||||||
anchor_left = 0.5
|
|
||||||
anchor_top = 0.5
|
|
||||||
anchor_right = 0.5
|
|
||||||
anchor_bottom = 0.5
|
|
||||||
offset_left = -20.0
|
|
||||||
offset_top = -20.0
|
|
||||||
offset_right = 20.0
|
|
||||||
offset_bottom = 20.0
|
|
||||||
grow_horizontal = 2
|
|
||||||
grow_vertical = 2
|
|
||||||
horizontal_scroll_mode = 0
|
|
||||||
vertical_scroll_mode = 3
|
|
||||||
|
|
||||||
[node name="WordsLabel" type="Label" parent="ScrollContainer"]
|
|
||||||
unique_name_in_owner = true
|
|
||||||
custom_minimum_size = Vector2(200, 10)
|
|
||||||
layout_mode = 2
|
|
||||||
size_flags_horizontal = 4
|
|
||||||
size_flags_vertical = 1
|
|
||||||
text = "tdb119a3714,据闻奉贤县分水墩有两人染受鼠疫毙命,医官拟将死者尸骸解剖以观受病之原因及其情状,竟未得死者家属之同意,以该处风气闭塞,闻解剖之说,地方人民甚为惊骇,闻已有聚众滋闹之事,并闻医官已被人殴打,政府以防疫事宜关系紧要拟改令赴沪南区一带调查防疫事宜云。,,,,\"It is reported that two people in Fenshuidun, Fengxian County have died from plague. Medical officials proposed to autopsy the bodies to examine the cause and nature of the disease, but failed to obtain consent from the families of the deceased. Due to the conservative local customs, the mention of autopsy has greatly alarmed the local people. There are reports of crowds gathering to cause trouble, and medical officials have been assaulted. Given the critical importance of epidemic prevention, the government plans to redirect orders to investigate epidemic prevention matters in the southern Shanghai area.\"
|
|
||||||
"
|
|
||||||
autowrap_mode = 3
|
|
||||||
script = ExtResource("3_6l2e8")
|
|
Loading…
Reference in New Issue
Block a user