更新文档, 移除UiBase中OnShowUi()函数的参数

This commit is contained in:
小李xl 2023-03-31 02:40:44 +08:00
parent 3156026820
commit 3eae4011b7
18 changed files with 109 additions and 123 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 48 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 82 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 104 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 43 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 20 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 75 KiB

View File

@ -52,6 +52,9 @@ var resource = ResourceManager.Load<Theme>(ResourcePath.resource_theme_mainTheme
### 3.2.游戏核心系统
在`Main/ViewCanvas/SubViewportContainer/SubViewport`的子节点将开启4倍缩放, 并且启用完美像素
该节点放置除UI以外的任何节点
#### 3.2.1.什么是`ActivityObject`
定义: 游戏内所有可活动物体的基类叫做`ActivityObject`
@ -317,7 +320,7 @@ private IEnumerator StartRotation()
* **事件房间**: 触发剧情或者解锁NPC的房间
#### 3.3.2.创建模板房间
图块层级概述(后续补上)
图块层级概述(后续补上, 先默认使用`resource/map/tileset/TileSet1.tres`)
##### 创建模板房间
项目提供了一套创建模板房间的工具, 点击`tools`页签, 找到`创建地牢房间`这一项, 输入模板房间名称(注意房间名称不能重复), 即可创建房间, 创建房间完成后会创建房间配置数据, 路径为`resource/map/tiledata/xxx.json`, 并将配置数据注册到`resource/map/RoomConfig.json`中
@ -325,18 +328,61 @@ private IEnumerator StartRotation()
##### 绘制房间
创建好的房间会自动在编辑器中打开, 为场景的根节点选好`TileSet`后就可以画房间了
![](文档资源/image_8.png)
![](文档资源/image_8.png)
编辑器会自动计算出房间位置轮廓(绿色线)和导航区域(红色和黄色线), 并绘制出来, 按下`ctrs`+`s`, 编辑器就会将位置轮廓和导航信息存入`resource/map/tiledata/xxx.json`下
注意, 为了避免Ai运动时卡墙角, 所以计算导航轮廓时特意与墙预留了半个格子的距离, 也就是说如果存在单格的道路, 导航计算就会出错, 所以在画道路时必须为两格以上的宽度, 像下面这两种情况就是不被允许的, 编辑器会绘制出错误的格子
![](文档资源/image_9.png)
![](文档资源/image_10.png)
![](文档资源/image_10.png)
如果计算导航网格出错, 那么编辑器将不会保存房间配置信息
##### 配置房间门生成位置
如果某些模板房间需要在指定区域内生成门, 那么就需要设置房间门生成区域
在模板场景中选中根节点, 再勾选`Enable Edit`
![](文档资源/image_11.png)
此时将鼠标放置在房间轮廓的绿线上就会显示生成区域
![](文档资源/image_12.png)
点击鼠标左键即可创建门区域, 如果悬停时显示红色方块, 则表示不能在此处创建门区域
创建门生成区域的约束: 区域不能重叠, 且两个区域的间距至少为4格, 每个区域至少4格宽度
![](文档资源/gif_1.gif)
新建的区域默认为4格宽度, 如果需要调整宽度, 可以拖拽区域两侧的点来调整范围
![](文档资源/gif_2.gif)
如果需要删除区域, 则悬停到区域两侧任意一个点上, 按下鼠标中建即可删除
![](文档资源/gif_3.gif)
门区域需要对齐地面地砖
![](文档资源/image_13.png)
注意:
* 如果一个模板房间不设置门生成区域, 则默认四边任何位置都可能生成门
* 配置好一个房间的门生成区域后, 如果绘制房间时改变了房间的大小或者位置, 则编辑器会清空配置的门区域
* 编辑门区域功能属于扩展编辑器功能, 因此单纯改变门区域数据不会在场景页签上标`*`(编辑器不会认为该资源有修改), 修改后需要及时按下`ctrl`+`s`保存, 以免造成数据丢失
### 3.4.UI系统
#### 3.4.1.UI系统概述
游戏内的物体, 例如`ActivityObject`等都是在`Main/ViewCanvas/SubViewportContainer/SubViewport`节点下, 并且启用了完美像素, 但是UI恰恰相反,它们直接位于`Main`节点下, 既没有4倍缩放也没有完美像素
游戏中的UI分为4个层级, 分别为
* Bottom: 最底层, 层级为5
* Middle: 中间层, 层级为15
* Height: 较高层, 层级为25
* Pop: 最顶层, 层级为35
UI场景根节点必须继承`UiBase`类, 并且生命周期由`UiManager`控制
UI代码放置位置: `src/game/ui/**/**.cs`
UI场景资源放置位置: `prefab/ui/**.tscn`
打开指定UI:
```csharp
var ui = UiManager.OpenUi("UI名称");
```
关闭Ui
```csharp
UiManager.DisposeUi(ui);
```
#### 3.4.2.UI代码生器
为了减低开发者制作UI的复杂程度, 避免手写获取UI节点的代码, 我们设计了一套自动生成UI层级代码的功能, 该功能在编辑器中会监听开发者对于UI场景的修改, 并及时生成相应的UI代码, 并且开发者的UI逻辑类继承生成的UI类, 即可方便的获取UI节点, 可以节省大量时间, 因为代码是实时生成的, 因此一旦有节点改名或者移动位置, 重新生成UI代码后, 引用该节点的代码就会出现编译错误, 方便开发者修改
##### 创建UI
在`Tools`页签下找到`创建游戏UI`, 输入UI名称即可点击创建UI
创建完毕后会离开打开该UI场景
#### 3.4.3.常用功能

View File

@ -1,4 +1,4 @@
<Project Sdk="Godot.NET.Sdk/4.0.1-rc.1">
<Project Sdk="Godot.NET.Sdk/4.0.1">
<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
<EnableDynamicLoading>true</EnableDynamicLoading>

View File

@ -0,0 +1,11 @@
<Project Sdk="Godot.NET.Sdk/4.0.1-rc.1">
<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
<EnableDynamicLoading>true</EnableDynamicLoading>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)' == 'Debug' ">
</PropertyGroup>
<ItemGroup>
<Folder Include="src\game\ui\editorTools" />
</ItemGroup>
</Project>

View File

@ -6,6 +6,6 @@
[node name="Room6" type="TileMap"]
tile_set = ExtResource("1_0o1o2")
format = 2
layer_0/tile_data = PackedInt32Array(196615, 0, 8, 131079, 0, 8, 65543, 0, 8, 7, 0, 8, -65529, 0, 8, -131065, 0, 8, -196601, 0, 8, 196614, 0, 8, 131078, 0, 8, 65542, 0, 8, 6, 0, 8, -65530, 0, 8, -131066, 0, 8, -196602, 0, 8, -262138, 0, 8, 196613, 0, 8, 131077, 0, 8, 65541, 0, 8, 5, 0, 8, -196603, 0, 8, -262139, 0, 8, 196612, 0, 8, 131076, 0, 8, 65540, 0, 8, 4, 0, 8, -196604, 0, 8, -262140, 0, 8, 196611, 0, 8, 131075, 0, 8, 65539, 0, 8, 3, 0, 8, -196605, 0, 8, -262141, 0, 8, 196610, 0, 8, 131074, 0, 8, 65538, 0, 8, 2, 0, 8, -196606, 0, 8, -262142, 0, 8, 196609, 0, 8, 131073, 0, 8, 65537, 0, 8, 1, 0, 8, -196607, 0, 8, -262143, 0, 8, 196608, 0, 8, 131072, 0, 8, 65536, 0, 8, 0, 0, 8, -196608, 0, 8, -262144, 0, 8, 262143, 0, 8, 196607, 0, 8, 131071, 0, 8, 65535, 0, 8, -131073, 0, 8, -196609, 0, 8, 262142, 0, 8, 196606, 0, 8, 131070, 0, 8, 65534, 0, 8, -2, 0, 8, -65538, 0, 8, -131074, 0, 8, -196610, 0, 8, 262141, 0, 8, 196605, 0, 8, 131069, 0, 8, 65533, 0, 8, -3, 0, 8, -65539, 0, 8, -131075, 0, 8, -196611, 0, 8, 262140, 0, 8, 196604, 0, 8, 131068, 0, 8, 65532, 0, 8, -4, 0, 8, -65540, 0, 8, -131076, 0, 8, -196612, 0, 8, -131077, 0, 8, -196613, 0, 8, -262149, 0, 8, -262148, 0, 8, -262147, 0, 8, -65541, 0, 8, -5, 0, 8, 65531, 196608, 2, 131067, 196608, 3, 196603, 196608, 3, 262139, 196608, 3, 327677, 131072, 2, 327676, 131072, 2, 327675, 720896, 2, -262146, 0, 8, 327678, 131072, 2, -262145, 0, 8, 327679, 196608, 2, -327680, 0, 8, 262144, 0, 8, -327679, 0, 8, 262145, 0, 8, -327678, 0, 8, 262146, 0, 8, -327677, 0, 8, 262147, 0, 8, -327676, 0, 8, 262148, 0, 8, -327675, 0, 8, 262149, 65536, 2, -327674, 0, 8, 262150, 131072, 2, 262151, 131072, 2, -196600, 65536, 7, -131064, 0, 8, -65528, 0, 8, 8, 0, 8, 65544, 0, 8, 131080, 0, 8, 196616, 0, 8, 262152, 131072, 2, -65537, 65536, 2, -131072, 131072, 2, -131071, 131072, 2, -131070, 131072, 2, -131069, 131072, 2, -131068, 131072, 2, -131067, 196608, 2, -1, 65536, 7, -65536, 131072, 7, -65535, 131072, 7, -65534, 131072, 7, -65533, 131072, 7, -65532, 131072, 7, -65531, 196608, 7, 327684, 0, 8, 327683, 0, 8, 327682, 0, 8, 327681, 0, 8, 327680, 0, 8, 393215, 196608, 3, 393217, 131072, 2, 393216, 131072, 2, 458751, 720896, 2, 393218, 131072, 2, 393219, 131072, 2, 393220, 131072, 2, 327685, 65536, 3, 393221, 851968, 2, -6, 0, 8, -65542, 0, 8, -131078, 0, 8, -196614, 0, 8, -262150, 0, 8, -7, 0, 8, -65543, 0, 8, -131079, 0, 8, -196615, 0, 8, -262151, 0, 8, -196616, 196608, 3, -262152, 196608, 3, -327688, 196608, 4, -327687, 131072, 7, -327686, 131072, 7, -131080, 196608, 3, -65544, 196608, 3, -8, 196608, 3, 65530, 131072, 2, 65529, 131072, 2, 65528, 720896, 2, -327685, 131072, 7, -327684, 196608, 7, -327683, 0, 8, -327682, 0, 8, -327681, 65536, 7, -393216, 131072, 7, -393215, 131072, 7, -393214, 131072, 7, -393213, 131072, 7, -393212, 131072, 7, -393211, 196608, 7, 196619, 0, 8, 131083, 0, 8, 65547, 0, 8, 11, 0, 8, -65525, 0, 8, -131061, 0, 8, 196618, 0, 8, 131082, 0, 8, 65546, 0, 8, 10, 0, 8, -65526, 0, 8, -131062, 0, 8, 196617, 0, 8, 131081, 0, 8, 65545, 0, 8, 9, 0, 8, -65527, 0, 8, -131063, 0, 8, -196599, 131072, 7, 262153, 131072, 2, -196598, 131072, 7, 262154, 131072, 2, -196597, 131072, 7, 262155, 131072, 2, -131060, 65536, 3, -65524, 65536, 3, -196596, 65536, 4, 12, 65536, 3, 65548, 65536, 3, 131084, 65536, 3, 196620, 65536, 3, 262156, 851968, 2, -393220, 196608, 4, -393219, 131072, 7, -393218, 131072, 7, -393217, 65536, 4, -262137, 0, 8, -327673, 0, 8, -262136, 65536, 3, -393209, 0, 8, -393208, 65536, 3, -327672, 65536, 3, -393210, 0, 8, -458746, 131072, 7, -458745, 131072, 7, -458744, 65536, 4, -458747, 196608, 4)
layer_0/tile_data = PackedInt32Array(196613, 0, 8, 131077, 0, 8, 65541, 0, 8, 5, 0, 8, -65531, 0, 8, -131067, 0, 8, 196612, 0, 8, 131076, 0, 8, 65540, 0, 8, 4, 0, 8, -65532, 0, 8, -131068, 0, 8, 196611, 0, 8, 131075, 0, 8, 65539, 0, 8, 3, 0, 8, -65533, 0, 8, -131069, 0, 8, 196610, 0, 8, 131074, 0, 8, 65538, 0, 8, 2, 0, 8, -65534, 0, 8, -131070, 0, 8, 196609, 0, 8, 131073, 0, 8, 65537, 0, 8, 1, 0, 8, -65535, 0, 8, -131071, 0, 8, 196608, 0, 8, 131072, 0, 8, 65536, 0, 8, 0, 0, 8, -65536, 0, 8, -131072, 0, 8, 262143, 0, 8, 196607, 0, 8, 131071, 0, 8, 65535, 0, 8, -1, 0, 8, -65537, 0, 8, 262142, 0, 8, 196606, 0, 8, 131070, 0, 8, 65534, 0, 8, -2, 0, 8, -65538, 0, 8, -3, 196608, 3, -65539, 196608, 3, -131075, 196608, 4, -131074, 131072, 7, -131073, 131072, 7, 65533, 196608, 3, 131069, 196608, 3, 196605, 196608, 3, 262141, 196608, 3, 327679, 131072, 2, 327678, 131072, 2, 327677, 720896, 2, -196608, 131072, 7, 262144, 131072, 2, -196607, 131072, 7, 262145, 131072, 2, -196606, 131072, 7, 262146, 131072, 2, -196605, 131072, 7, 262147, 196608, 2, -196604, 131072, 7, 262148, 0, 8, -196603, 131072, 7, 262149, 0, 8, -131066, 65536, 3, -65530, 65536, 3, -196602, 65536, 4, 6, 65536, 3, 65542, 65536, 7, 131078, 0, 8, 196614, 0, 8, 262150, 0, 8, 458761, 0, 8, 393225, 0, 8, 327689, 0, 8, 262153, 0, 8, 196617, 0, 8, 131081, 0, 8, 458760, 0, 8, 393224, 0, 8, 327688, 0, 8, 262152, 0, 8, 196616, 0, 8, 131080, 0, 8, 458759, 0, 8, 393223, 0, 8, 327687, 0, 8, 262151, 0, 8, 196615, 0, 8, 131079, 0, 8, 458758, 0, 8, 393222, 0, 8, 327686, 0, 8, 458757, 0, 8, 393221, 0, 8, 327685, 0, 8, 458756, 0, 8, 393220, 0, 8, 327684, 0, 8, 327683, 196608, 3, 393219, 196608, 3, 458755, 196608, 3, 524293, 131072, 2, 524292, 131072, 2, 524291, 720896, 2, 524294, 131072, 2, 65543, 131072, 7, 524295, 131072, 2, 65544, 131072, 7, 524296, 131072, 2, 65545, 131072, 7, 524297, 131072, 2, 131082, 65536, 3, 196618, 65536, 3, 65546, 65536, 4, 262154, 65536, 3, 327690, 65536, 3, 393226, 65536, 3, 458762, 65536, 3, 524298, 851968, 2)
script = ExtResource("dungeonRoomTemplate")
EnableEdit = true

View File

@ -1,125 +1,54 @@
{
"Position": {
"X": -8,
"Y": -7
"X": -3,
"Y": -3
},
"Size": {
"X": 21,
"Y": 14
"X": 14,
"Y": 12
},
"DoorAreaInfos": [
{
"Direction": 1,
"Start": 32,
"End": 112
},
{
"Direction": 0,
"Start": 80,
"End": 176
},
{
"Direction": 2,
"Start": 128,
"End": 208
"Start": 16,
"End": 80
}
],
"NavigationList": [
{
"Type": 0,
"Points": [
{
"X": -40,
"Y": -88
},
{
"X": -24,
"Y": -88
},
{
"X": -24,
"Y": -72
},
{
"X": 104,
"Y": -72
},
{
"X": 104,
"Y": -88
},
{
"X": 120,
"Y": -88
},
{
"X": 120,
"Y": -24
},
{
"X": 184,
"X": 88,
"Y": -24
},
{
"X": 184,
"Y": 56
"X": 88,
"Y": 40
},
{
"X": 152,
"Y": 40
},
{
"X": 152,
"Y": 120
},
{
"X": 72,
"Y": 120
},
{
"X": 72,
"Y": 56
},
{
"X": 72,
"Y": 88
},
{
"X": 8,
"Y": 88
},
{
"X": 8,
"Y": 56
},
{
"X": -56,
"Y": 56
},
{
"X": -56,
"Y": -8
},
{
"X": -104,
"Y": -8
},
{
"X": -104,
"Y": -72
},
{
"X": -40,
"Y": -72
}
]
},
{
"Type": 1,
"Points": [
{
"X": -24,
"Y": -40
},
{
"X": 104,
"Y": -40
},
{
"X": 104,
"Y": 8
},
{
"X": -24,
"Y": 8
"Y": 56
}
]
}

View File

@ -352,7 +352,7 @@ bg_color = Color(0.260588, 0.156863, 0.724706, 0.8)
[sub_resource type="ImageTexture" id="58"]
[sub_resource type="Image" id="Image_xmfgf"]
[sub_resource type="Image" id="Image_1ghhs"]
data = {
"data": PackedByteArray(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 255, 255, 255, 0, 255, 255, 255, 1, 255, 255, 255, 39, 255, 255, 255, 67, 255, 255, 255, 67, 255, 255, 255, 39, 255, 255, 255, 1, 255, 255, 255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 255, 255, 255, 0, 255, 255, 255, 39, 255, 255, 255, 75, 255, 255, 255, 75, 255, 255, 255, 75, 255, 255, 255, 75, 255, 255, 255, 39, 255, 255, 255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 255, 255, 255, 0, 255, 255, 255, 66, 255, 255, 255, 75, 255, 255, 255, 75, 255, 255, 255, 75, 255, 255, 255, 75, 255, 255, 255, 66, 255, 255, 255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 255, 255, 255, 0, 255, 255, 255, 66, 255, 255, 255, 75, 255, 255, 255, 75, 255, 255, 255, 75, 255, 255, 255, 75, 255, 255, 255, 66, 255, 255, 255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 255, 255, 255, 0, 255, 255, 255, 39, 255, 255, 255, 75, 255, 255, 255, 75, 255, 255, 255, 75, 255, 255, 255, 75, 255, 255, 255, 39, 255, 255, 255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 255, 255, 255, 0, 255, 255, 255, 1, 255, 255, 255, 39, 255, 255, 255, 67, 255, 255, 255, 67, 255, 255, 255, 39, 255, 255, 255, 1, 255, 255, 255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0),
"format": "RGBA8",
@ -362,7 +362,7 @@ data = {
}
[sub_resource type="ImageTexture" id="60"]
image = SubResource("Image_xmfgf")
image = SubResource("Image_1ghhs")
[sub_resource type="StyleBoxTexture" id="61"]
content_margin_left = 2.0
@ -372,7 +372,7 @@ content_margin_bottom = 2.0
texture = SubResource("60")
region_rect = Rect2(0, 0, 12, 12)
[sub_resource type="Image" id="Image_raat4"]
[sub_resource type="Image" id="Image_1l3ax"]
data = {
"data": PackedByteArray(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 191, 191, 191, 0, 247, 247, 247, 0, 248, 248, 248, 0, 248, 248, 248, 0, 247, 247, 247, 0, 191, 191, 191, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 191, 191, 191, 0, 191, 191, 191, 4, 247, 247, 247, 98, 248, 248, 248, 167, 248, 248, 248, 167, 247, 247, 247, 98, 191, 191, 191, 4, 191, 191, 191, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 247, 247, 247, 0, 247, 247, 247, 97, 248, 248, 248, 186, 248, 248, 248, 186, 248, 248, 248, 186, 248, 248, 248, 186, 247, 247, 247, 97, 247, 247, 247, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 248, 248, 248, 0, 248, 248, 248, 164, 248, 248, 248, 186, 248, 248, 248, 186, 248, 248, 248, 186, 248, 248, 248, 186, 248, 248, 248, 164, 248, 248, 248, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 248, 248, 248, 0, 248, 248, 248, 164, 248, 248, 248, 186, 248, 248, 248, 186, 248, 248, 248, 186, 248, 248, 248, 186, 248, 248, 248, 164, 248, 248, 248, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 247, 247, 247, 0, 247, 247, 247, 97, 248, 248, 248, 186, 248, 248, 248, 186, 248, 248, 248, 186, 248, 248, 248, 186, 247, 247, 247, 97, 247, 247, 247, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 191, 191, 191, 0, 191, 191, 191, 4, 247, 247, 247, 98, 248, 248, 248, 167, 248, 248, 248, 167, 247, 247, 247, 98, 191, 191, 191, 4, 191, 191, 191, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 191, 191, 191, 0, 247, 247, 247, 0, 248, 248, 248, 0, 248, 248, 248, 0, 247, 247, 247, 0, 191, 191, 191, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0),
"format": "RGBA8",
@ -382,7 +382,7 @@ data = {
}
[sub_resource type="ImageTexture" id="63"]
image = SubResource("Image_raat4")
image = SubResource("Image_1l3ax")
[sub_resource type="StyleBoxTexture" id="64"]
content_margin_left = 2.0
@ -392,7 +392,7 @@ content_margin_bottom = 2.0
texture = SubResource("63")
region_rect = Rect2(0, 0, 12, 12)
[sub_resource type="Image" id="Image_37m8h"]
[sub_resource type="Image" id="Image_frltt"]
data = {
"data": PackedByteArray(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 127, 127, 127, 0, 173, 173, 173, 0, 173, 173, 173, 0, 173, 173, 173, 0, 173, 173, 173, 0, 127, 127, 127, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 127, 127, 127, 0, 127, 127, 127, 4, 173, 173, 173, 97, 173, 173, 173, 166, 173, 173, 173, 166, 173, 173, 173, 97, 127, 127, 127, 4, 127, 127, 127, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 172, 172, 172, 0, 172, 172, 172, 96, 173, 173, 173, 185, 173, 173, 173, 185, 173, 173, 173, 185, 173, 173, 173, 185, 172, 172, 172, 96, 172, 172, 172, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 173, 173, 173, 0, 173, 173, 173, 163, 173, 173, 173, 185, 173, 173, 173, 185, 173, 173, 173, 185, 173, 173, 173, 185, 173, 173, 173, 163, 173, 173, 173, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 173, 173, 173, 0, 173, 173, 173, 163, 173, 173, 173, 185, 173, 173, 173, 185, 173, 173, 173, 185, 173, 173, 173, 185, 173, 173, 173, 163, 173, 173, 173, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 172, 172, 172, 0, 172, 172, 172, 96, 173, 173, 173, 185, 173, 173, 173, 185, 173, 173, 173, 185, 173, 173, 173, 185, 172, 172, 172, 96, 172, 172, 172, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 127, 127, 127, 0, 127, 127, 127, 4, 173, 173, 173, 97, 173, 173, 173, 166, 173, 173, 173, 166, 173, 173, 173, 97, 127, 127, 127, 4, 127, 127, 127, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 127, 127, 127, 0, 173, 173, 173, 0, 173, 173, 173, 0, 173, 173, 173, 0, 173, 173, 173, 0, 127, 127, 127, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0),
"format": "RGBA8",
@ -402,7 +402,7 @@ data = {
}
[sub_resource type="ImageTexture" id="66"]
image = SubResource("Image_37m8h")
image = SubResource("Image_frltt")
[sub_resource type="StyleBoxTexture" id="67"]
content_margin_left = 2.0
@ -412,7 +412,7 @@ content_margin_bottom = 2.0
texture = SubResource("66")
region_rect = Rect2(0, 0, 12, 12)
[sub_resource type="Image" id="Image_i747y"]
[sub_resource type="Image" id="Image_7ssec"]
data = {
"data": PackedByteArray(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 255, 255, 255, 0, 255, 255, 255, 4, 255, 255, 255, 16, 255, 255, 255, 16, 255, 255, 255, 4, 255, 255, 255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 255, 255, 255, 0, 255, 255, 255, 16, 255, 255, 255, 21, 255, 255, 255, 21, 255, 255, 255, 16, 255, 255, 255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 255, 255, 255, 0, 255, 255, 255, 16, 255, 255, 255, 21, 255, 255, 255, 21, 255, 255, 255, 16, 255, 255, 255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 255, 255, 255, 0, 255, 255, 255, 4, 255, 255, 255, 16, 255, 255, 255, 16, 255, 255, 255, 4, 255, 255, 255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0),
"format": "RGBA8",
@ -422,7 +422,7 @@ data = {
}
[sub_resource type="ImageTexture" id="69"]
image = SubResource("Image_i747y")
image = SubResource("Image_7ssec")
[sub_resource type="StyleBoxTexture" id="70"]
content_margin_left = 0.0
@ -446,7 +446,7 @@ content_margin_top = 4.0
content_margin_right = 4.0
content_margin_bottom = 4.0
[sub_resource type="Image" id="Image_7vofm"]
[sub_resource type="Image" id="Image_h5f57"]
data = {
"data": PackedByteArray(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 255, 255, 255, 0, 255, 255, 255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 255, 255, 255, 0, 255, 255, 255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 255, 255, 255, 0, 255, 255, 255, 76, 255, 255, 255, 17, 255, 255, 255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 255, 255, 255, 0, 255, 255, 255, 17, 255, 255, 255, 76, 255, 255, 255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 255, 255, 255, 0, 255, 255, 255, 76, 255, 255, 255, 228, 255, 255, 255, 188, 255, 255, 255, 17, 255, 255, 255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 255, 255, 255, 0, 255, 255, 255, 17, 255, 255, 255, 188, 255, 255, 255, 228, 255, 255, 255, 76, 255, 255, 255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 255, 255, 255, 0, 255, 255, 255, 18, 255, 255, 255, 188, 255, 255, 255, 229, 255, 255, 255, 187, 255, 255, 255, 17, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 17, 255, 255, 255, 187, 255, 255, 255, 229, 255, 255, 255, 188, 255, 255, 255, 18, 255, 255, 255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 255, 255, 255, 0, 255, 255, 255, 19, 255, 255, 255, 188, 255, 255, 255, 229, 255, 255, 255, 185, 255, 255, 255, 17, 255, 255, 255, 17, 255, 255, 255, 186, 255, 255, 255, 229, 255, 255, 255, 188, 255, 255, 255, 19, 255, 255, 255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 255, 255, 255, 0, 255, 255, 255, 19, 255, 255, 255, 190, 255, 255, 255, 229, 255, 255, 255, 185, 255, 255, 255, 185, 255, 255, 255, 229, 255, 255, 255, 189, 255, 255, 255, 19, 255, 255, 255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 255, 255, 255, 0, 255, 255, 255, 19, 255, 255, 255, 191, 255, 255, 255, 229, 255, 255, 255, 229, 255, 255, 255, 190, 255, 255, 255, 19, 255, 255, 255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 255, 255, 255, 0, 255, 255, 255, 17, 255, 255, 255, 188, 255, 255, 255, 229, 255, 255, 255, 229, 255, 255, 255, 188, 255, 255, 255, 17, 255, 255, 255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 255, 255, 255, 0, 255, 255, 255, 17, 255, 255, 255, 188, 255, 255, 255, 229, 255, 255, 255, 188, 255, 255, 255, 188, 255, 255, 255, 229, 255, 255, 255, 187, 255, 255, 255, 17, 255, 255, 255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 255, 255, 255, 0, 255, 255, 255, 17, 255, 255, 255, 187, 255, 255, 255, 229, 255, 255, 255, 188, 255, 255, 255, 18, 255, 255, 255, 19, 255, 255, 255, 188, 255, 255, 255, 229, 255, 255, 255, 186, 255, 255, 255, 17, 255, 255, 255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 255, 255, 255, 0, 255, 255, 255, 17, 255, 255, 255, 185, 255, 255, 255, 229, 255, 255, 255, 189, 255, 255, 255, 19, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 19, 255, 255, 255, 189, 255, 255, 255, 229, 255, 255, 255, 185, 255, 255, 255, 17, 255, 255, 255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 255, 255, 255, 0, 255, 255, 255, 76, 255, 255, 255, 229, 255, 255, 255, 190, 255, 255, 255, 19, 255, 255, 255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 255, 255, 255, 0, 255, 255, 255, 19, 255, 255, 255, 190, 255, 255, 255, 229, 255, 255, 255, 76, 255, 255, 255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 255, 255, 255, 0, 255, 255, 255, 77, 255, 255, 255, 19, 255, 255, 255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 255, 255, 255, 0, 255, 255, 255, 19, 255, 255, 255, 77, 255, 255, 255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 255, 255, 255, 0, 255, 255, 255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 255, 255, 255, 0, 255, 255, 255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0),
"format": "RGBA8",
@ -456,7 +456,7 @@ data = {
}
[sub_resource type="ImageTexture" id="56"]
image = SubResource("Image_7vofm")
image = SubResource("Image_h5f57")
[sub_resource type="StyleBoxFlat" id="57"]
content_margin_left = 6.0

View File

@ -26,14 +26,14 @@ public abstract class IUiNode<TNodeType, TCloneType> where TNodeType : Node
/// <summary>
/// 嵌套打开子ui
/// </summary>
public UiBase OpenNestedUi(string uiName, params object[] args)
public UiBase OpenNestedUi(string uiName)
{
var packedScene = ResourceManager.Load<PackedScene>("res://" + GameConfig.UiPrefabDir + uiName + ".tscn");
var uiBase = packedScene.Instantiate<UiBase>();
Instance.AddChild(uiBase);
uiBase.OnCreateUi();
uiBase.ShowUi(args);
uiBase.ShowUi();
return uiBase;
}

View File

@ -15,7 +15,7 @@ public abstract partial class UiBase : Control
public UiLayer Layer = UiLayer.Middle;
/// <summary>
/// Ui 模式
/// Ui 模式, 单例/正常模式
/// </summary>
[Export]
public UiMode Mode = UiMode.Normal;
@ -59,9 +59,9 @@ public abstract partial class UiBase : Control
}
/// <summary>
/// 当前ui显示时调用,并接收参数
/// 当前ui显示时调用
/// </summary>
public abstract void OnShowUi(params object[] args);
public abstract void OnShowUi();
/// <summary>
/// 当前ui隐藏时调用
@ -83,9 +83,9 @@ public abstract partial class UiBase : Control
}
/// <summary>
/// 显示ui, 并传入参数
/// 显示ui
/// </summary>
public void ShowUi(params object[] args)
public void ShowUi()
{
if (IsOpen)
{
@ -94,7 +94,7 @@ public abstract partial class UiBase : Control
IsOpen = true;
Visible = true;
OnShowUi(args);
OnShowUi();
}
/// <summary>

View File

@ -111,23 +111,23 @@ public static partial class UiManager
/// <summary>
/// 根据Ui资源路径打开Ui, 并返回Ui实例, 该Ui资源的场景根节点必须继承<see cref="UiBase"/>
/// </summary>
public static UiBase OpenUi(string uiName, params object[] args)
public static UiBase OpenUi(string uiName)
{
var packedScene = ResourceManager.Load<PackedScene>("res://" + GameConfig.UiPrefabDir + uiName + ".tscn");
var uiBase = packedScene.Instantiate<UiBase>();
var canvasLayer = GetUiLayer(uiBase.Layer);
canvasLayer.AddChild(uiBase);
uiBase.OnCreateUi();
uiBase.ShowUi(args);
uiBase.ShowUi();
return uiBase;
}
/// <summary>
/// 根据Ui资源路径打开Ui, 并返回Ui实例, 该Ui资源的场景根节点必须继承<see cref="UiBase"/>
/// </summary>
public static T OpenUi<T>(string uiName, params object[] args) where T : UiBase
public static T OpenUi<T>(string uiName) where T : UiBase
{
return (T)OpenUi(uiName, args);
return (T)OpenUi(uiName);
}
/// <summary>

View File

@ -15,7 +15,7 @@ public partial class EditorToolsPanel : EditorTools
//询问窗口关闭
private Action<bool> _onConfirmClose;
public override void OnShowUi(params object[] args)
public override void OnShowUi()
{
//tips
_onTipsClose = null;

View File

@ -22,7 +22,7 @@ public partial class RoomUIPanel : RoomUI
_gunBar = new GunBar(L_Control.L_GunBar);
}
public override void OnShowUi(params object[] args)
public override void OnShowUi()
{
_reloadBar.OnShow();
_interactiveTipBar.OnShow();

View File

@ -6,7 +6,7 @@
**游戏名称:** 待定
**美术风格:** 2D像素(完美像素)
**游戏类型:** Roguelite, 俯视角, 地牢射击
**游戏类型:** Roguelite, 俯视角, 地牢探索, 双摇杆射击
**参考游戏:** 挺进地牢, 元气骑士, 废土之王
**核心简介:** 游戏整体流程由数层地牢组成, 每层又由数个房间组成, 每个房间有一堵门隔开, 玩家每进入一个房间, 需要清理房间内所有的敌人, 方可离开和进入下一个房间,
玩家需要在这些房间中探索, 战斗, 收集掉落的道具和被动, 一步步成长, 击败boss, 进入下一层, 如此往复, 直到击败最后一层boss即可通关.