diff --git a/.gitignore b/.gitignore index 68bc274..ddc5aab 100644 --- a/.gitignore +++ b/.gitignore @@ -1,8 +1,6 @@ /DungeonShooting_Godot/android -/DungeonShooting_Godot/.idea /DungeonShooting_Godot/.godot /Script_Vscode_Plugin/node_modules -/DScript/.idea /DScript/DScript_Compiler/obj /DScript/DScript_Compiler/bin /DScript/DScript_Runtime/obj @@ -15,3 +13,4 @@ /DScript/DScript_Compiler_Test/obj /DScript/DScript_Runtime/Backups /DScript/DScript.sln.DotSettings.user +**/.idea \ No newline at end of file diff --git "a/DungeonShooting_Document/\345\274\200\345\217\221\346\227\245\345\277\227.md" "b/DungeonShooting_Document/\345\274\200\345\217\221\346\227\245\345\277\227.md" index 93c25f0..6dcadc5 100644 --- "a/DungeonShooting_Document/\345\274\200\345\217\221\346\227\245\345\277\227.md" +++ "b/DungeonShooting_Document/\345\274\200\345\217\221\346\227\245\345\277\227.md" @@ -1,44 +1,41 @@ - +--- ### 2023-3-19 -> 本周主要完成Godot编辑器插件扩展, 目的为了更加方便为游戏添加内容, 主要工作内容如有: -> * 将原来编辑器中的`automation`面板移到Godot编辑器`2D`/`Script`这一栏, 并重命名为`Tools` -> * `Tools`面板中添加创建UI的功能, 输入UI名称点击创建就能自动创建一个空的UI场景和相配套UI代码, 编辑器监听用户对于UI的改动, 一旦有变化, 就会自动重新生成UI基础代码, 这样做的好处是一旦有节点重命名或者移动位置, 用到这个节点的代码就会编译报错. 每个UI都分好了文件夹, 所有和当前UI有关的代码都应该被放到同一个UI文件夹下 -> * UI节点添加打开子UI的api, 允许嵌套打开UI -> * `Tools`面板中添加创建地牢预制房间的功能, 现在不需要自己在节点管理器中添加`DungeonRoomTemplate`了, 并且节点管理器已经移除`DungeonRoomTemplate` -> * 优化`RoomConfig.json`, 现在不是所有数据都存在这个配置里了, 这里面值放一些基础数据和房间详细配置的路径, 需要房间详细信息再进行动态加载 -> * `Uibase`添加协程支持, 功能和`ActivityObject`中的协程一样 -> * 重写`ActivityObject`中的投抛系统, 加入`ActivityObject`加入海拔高度字段, 并且自动计算精灵和阴影位置, 当海拔高度大于0时会自动做自由落体, 想向上抛物的话也只需要设置垂直方向的速度就行, 现在的`Throw()`函数仅仅只是对于设置海拔高度和垂直速度的一个封装 +本周主要完成Godot编辑器插件扩展, 目的为了更加方便为游戏添加内容, 主要工作内容如有: +* 将原来编辑器中的`automation`面板移到Godot编辑器`2D`/`Script`这一栏, 并重命名为`Tools` +* `Tools`面板中添加创建UI的功能, 输入UI名称点击创建就能自动创建一个空的UI场景和相配套UI代码, 编辑器监听用户对于UI的改动, 一旦有变化, 就会自动重新生成UI基础代码, 这样做的好处是一旦有节点重命名或者移动位置, 用到这个节点的代码就会编译报错. 每个UI都分好了文件夹, 所有和当前UI有关的代码都应该被放到同一个UI文件夹下 +* UI节点添加打开子UI的api, 允许嵌套打开UI +* `Tools`面板中添加创建地牢预制房间的功能, 现在不需要自己在节点管理器中添加`DungeonRoomTemplate`了, 并且节点管理器已经移除`DungeonRoomTemplate` +* 优化`RoomConfig.json`, 现在不是所有数据都存在这个配置里了, 这里面值放一些基础数据和房间详细配置的路径, 需要房间详细信息再进行动态加载 +* `Uibase`添加协程支持, 功能和`ActivityObject`中的协程一样 +* 重写`ActivityObject`中的投抛系统, 加入`ActivityObject`加入海拔高度字段, 并且自动计算精灵和阴影位置, 当海拔高度大于0时会自动做自由落体, 想向上抛物的话也只需要设置垂直方向的速度就行, 现在的`Throw()`函数仅仅只是对于设置海拔高度和垂直速度的一个封装 --- - ### 2023-3-13 -> 为了尽早能够完成核心功能, 对外展示demo, 三月上旬开发提速, 主要的工作内容有: -> * 找到一个会触发关闭游戏卡死的 bug, 问题出在`TileMap.GetCellTileData()`函数上, 调用该函数在关闭游戏释放资源时会导致读取到已经被释放的内存, 但是卡死的问题还是有极小概率发生, 目前情况未知 -> * 发现并修复bug: 之前版本在自定义房间连接时, 如果生成带有拐角的通道, 通道生成的位置不是按最近位置生成, 这就导致生成的拐角通道特别长, 而且浪费空间, 现已修复 -> * 完成房间的定义, 并为房间划分好区域, 当玩家进入一个新的房间时开始关门并刷怪, 消灭房间内所有敌人时开门 -> * 重整`ActivityObject`子类实例化流程, 现在通过在`ActivityObject`子类上加`[RegisterActivity(id, prefabPath)]`标记来注册物体, 并调用`ActivityObject.Create(id)`来创建实例 -> * 在预制房间中添加自定义物体生成标记(`ActivityMark`), 通过标记可以指定生成的对象, 位置, 所在波数和延时生成时间, 也可以继承`ActivityMark`来扩展物体生成操作, 例如子类`EnemyMark`, 标记生成敌人, 并且可以指定初始武器与弹药量 -> * Ui核心框架已经搭建完成, 并划分好UI的层级, 现已通过`UiManager`管理Ui, 目前`UiManager`还有部分功能尚未完成 -> * 完成Ui类代码自动生成的功能, 现在可以根据Ui对象生成相应的图层调用代码, 更加方便编写Ui, 但是目前还没有接到编辑器中, 需要写代码手动调用接口 -> * 修复相机运动和抖动时存在的问题 +为了尽早能够完成核心功能, 对外展示demo, 三月上旬开发提速, 主要的工作内容有: +* 找到一个会触发关闭游戏卡死的 bug, 问题出在`TileMap.GetCellTileData()`函数上, 调用该函数在关闭游戏释放资源时会导致读取到已经被释放的内存, 但是卡死的问题还是有极小概率发生, 目前情况未知 +* 发现并修复bug: 之前版本在自定义房间连接时, 如果生成带有拐角的通道, 通道生成的位置不是按最近位置生成, 这就导致生成的拐角通道特别长, 而且浪费空间, 现已修复 +* 完成房间的定义, 并为房间划分好区域, 当玩家进入一个新的房间时开始关门并刷怪, 消灭房间内所有敌人时开门 +* 重整`ActivityObject`子类实例化流程, 现在通过在`ActivityObject`子类上加`[RegisterActivity(id, prefabPath)]`标记来注册物体, 并调用`ActivityObject.Create(id)`来创建实例 +* 在预制房间中添加自定义物体生成标记(`ActivityMark`), 通过标记可以指定生成的对象, 位置, 所在波数和延时生成时间, 也可以继承`ActivityMark`来扩展物体生成操作, 例如子类`EnemyMark`, 标记生成敌人, 并且可以指定初始武器与弹药量 +* Ui核心框架已经搭建完成, 并划分好UI的层级, 现已通过`UiManager`管理Ui, 目前`UiManager`还有部分功能尚未完成 +* 完成Ui类代码自动生成的功能, 现在可以根据Ui对象生成相应的图层调用代码, 更加方便编写Ui, 但是目前还没有接到编辑器中, 需要写代码手动调用接口 +* 修复相机运动和抖动时存在的问题 --- - ### 2023-02-28 -> 经过数十天开发, 已经完成自定义房间功能, 支持配置连接门生成区域, 而不是像之前一样整个矩形外框都能生成门, 并且还做了在编辑器中可视化编辑连接们生成区域的功能, -> 所有的自定义房间放在`resource/map/tileMaps`, 路径下, 使用`automation`面板下的`打包地牢配置`即可将所有房间的配置信息整合到`RoomConfig.json`文件内, 方便代码获取房间数据, -> 在编辑器中添加`DungeonRoomTemplate`节点, 用于创建模板房间. +经过数十天开发, 已经完成自定义房间功能, 支持配置连接门生成区域, 而不是像之前一样整个矩形外框都能生成门, 并且还做了在编辑器中可视化编辑连接们生成区域的功能, +所有的自定义房间放在`resource/map/tileMaps`, 路径下, 使用`automation`面板下的`打包地牢配置`即可将所有房间的配置信息整合到`RoomConfig.json`文件内, 方便代码获取房间数据, +在编辑器中添加`DungeonRoomTemplate`节点, 用于创建模板房间. --- - ### 2023-02-15 -> 第一篇开发日志, 后面会更加频繁更新日志 -> 用了大半年事件完成完成项目基础架构搭建, 已经包含的功能有: -> * 所有物体的父物体为`ActivityObject`, 可以在编辑器中找到节点`ActivityObjectTemplate`来快速创建物体模板 -> * 玩家, 敌人的基础移动, 拾起/扔掉武器, 武器袋存放武器, 切换武器, 手持武器开火, 换弹, -> * 武器类别有近战/远程武器, 武器由属性类控制 -> * ai行为逻辑, 包括自动寻路, 发现玩家后追踪玩家, 通知其它ai玩家位置, 射程足够时朝玩家射击, 在玩家周围徘徊, 没有武器/弹药时寻找可用的武器 -> * 随机生成地牢, 地牢房间与房间由过道连接, 一个房间至少连接一个其它房间 -> * 游戏中UI, 包括血条, 玩家手持武器, 武器弹药, 换弹进度, 拾起武器提示 -> * 音效管理, 播放背景音乐和音效 \ No newline at end of file +第一篇开发日志, 后面会更加频繁更新日志 +用了大半年事件完成完成项目基础架构搭建, 已经包含的功能有: +* 所有物体的父物体为`ActivityObject`, 可以在编辑器中找到节点`ActivityObjectTemplate`来快速创建物体模板 +* 玩家, 敌人的基础移动, 拾起/扔掉武器, 武器袋存放武器, 切换武器, 手持武器开火, 换弹, +* 武器类别有近战/远程武器, 武器由属性类控制 +* ai行为逻辑, 包括自动寻路, 发现玩家后追踪玩家, 通知其它ai玩家位置, 射程足够时朝玩家射击, 在玩家周围徘徊, 没有武器/弹药时寻找可用的武器 +* 随机生成地牢, 地牢房间与房间由过道连接, 一个房间至少连接一个其它房间 +* 游戏中UI, 包括血条, 玩家手持武器, 武器弹药, 换弹进度, 拾起武器提示 +* 音效管理, 播放背景音乐和音效 \ No newline at end of file diff --git "a/DungeonShooting_Document/\346\226\207\346\241\243\350\265\204\346\272\220/2023-03-26_030144.png" "b/DungeonShooting_Document/\346\226\207\346\241\243\350\265\204\346\272\220/2023-03-26_030144.png" new file mode 100644 index 0000000..2db4357 --- /dev/null +++ "b/DungeonShooting_Document/\346\226\207\346\241\243\350\265\204\346\272\220/2023-03-26_030144.png" Binary files differ diff --git "a/DungeonShooting_Document/\346\226\207\346\241\243\350\265\204\346\272\220/gif_1.gif" "b/DungeonShooting_Document/\346\226\207\346\241\243\350\265\204\346\272\220/gif_1.gif" new file mode 100644 index 0000000..cad3ad3 --- /dev/null +++ "b/DungeonShooting_Document/\346\226\207\346\241\243\350\265\204\346\272\220/gif_1.gif" Binary files differ diff --git "a/DungeonShooting_Document/\346\226\207\346\241\243\350\265\204\346\272\220/gif_2.gif" "b/DungeonShooting_Document/\346\226\207\346\241\243\350\265\204\346\272\220/gif_2.gif" new file mode 100644 index 0000000..fd8194e --- /dev/null +++ "b/DungeonShooting_Document/\346\226\207\346\241\243\350\265\204\346\272\220/gif_2.gif" Binary files differ diff --git "a/DungeonShooting_Document/\346\226\207\346\241\243\350\265\204\346\272\220/gif_3.gif" "b/DungeonShooting_Document/\346\226\207\346\241\243\350\265\204\346\272\220/gif_3.gif" new file mode 100644 index 0000000..245744f --- /dev/null +++ "b/DungeonShooting_Document/\346\226\207\346\241\243\350\265\204\346\272\220/gif_3.gif" Binary files differ diff --git "a/DungeonShooting_Document/\346\226\207\346\241\243\350\265\204\346\272\220/gif_4.gif" "b/DungeonShooting_Document/\346\226\207\346\241\243\350\265\204\346\272\220/gif_4.gif" new file mode 100644 index 0000000..a087451 --- /dev/null +++ "b/DungeonShooting_Document/\346\226\207\346\241\243\350\265\204\346\272\220/gif_4.gif" Binary files differ diff --git "a/DungeonShooting_Document/\346\226\207\346\241\243\350\265\204\346\272\220/image_10.png" "b/DungeonShooting_Document/\346\226\207\346\241\243\350\265\204\346\272\220/image_10.png" new file mode 100644 index 0000000..37aee41 --- /dev/null +++ "b/DungeonShooting_Document/\346\226\207\346\241\243\350\265\204\346\272\220/image_10.png" Binary files differ diff --git "a/DungeonShooting_Document/\346\226\207\346\241\243\350\265\204\346\272\220/image_11.png" "b/DungeonShooting_Document/\346\226\207\346\241\243\350\265\204\346\272\220/image_11.png" new file mode 100644 index 0000000..046e766 --- /dev/null +++ "b/DungeonShooting_Document/\346\226\207\346\241\243\350\265\204\346\272\220/image_11.png" Binary files differ diff --git "a/DungeonShooting_Document/\346\226\207\346\241\243\350\265\204\346\272\220/image_12.png" "b/DungeonShooting_Document/\346\226\207\346\241\243\350\265\204\346\272\220/image_12.png" new file mode 100644 index 0000000..0bbfdaf --- /dev/null +++ "b/DungeonShooting_Document/\346\226\207\346\241\243\350\265\204\346\272\220/image_12.png" Binary files differ diff --git "a/DungeonShooting_Document/\346\226\207\346\241\243\350\265\204\346\272\220/image_13.png" "b/DungeonShooting_Document/\346\226\207\346\241\243\350\265\204\346\272\220/image_13.png" new file mode 100644 index 0000000..a7d7727 --- /dev/null +++ "b/DungeonShooting_Document/\346\226\207\346\241\243\350\265\204\346\272\220/image_13.png" Binary files differ diff --git "a/DungeonShooting_Document/\346\226\207\346\241\243\350\265\204\346\272\220/image_14.png" "b/DungeonShooting_Document/\346\226\207\346\241\243\350\265\204\346\272\220/image_14.png" new file mode 100644 index 0000000..a5181fc --- /dev/null +++ "b/DungeonShooting_Document/\346\226\207\346\241\243\350\265\204\346\272\220/image_14.png" Binary files differ diff --git "a/DungeonShooting_Document/\346\226\207\346\241\243\350\265\204\346\272\220/image_15.png" "b/DungeonShooting_Document/\346\226\207\346\241\243\350\265\204\346\272\220/image_15.png" new file mode 100644 index 0000000..94ad6d2 --- /dev/null +++ "b/DungeonShooting_Document/\346\226\207\346\241\243\350\265\204\346\272\220/image_15.png" Binary files differ diff --git "a/DungeonShooting_Document/\346\226\207\346\241\243\350\265\204\346\272\220/image_16.png" "b/DungeonShooting_Document/\346\226\207\346\241\243\350\265\204\346\272\220/image_16.png" new file mode 100644 index 0000000..d87de83 --- /dev/null +++ "b/DungeonShooting_Document/\346\226\207\346\241\243\350\265\204\346\272\220/image_16.png" Binary files differ diff --git "a/DungeonShooting_Document/\346\226\207\346\241\243\350\265\204\346\272\220/image_17.png" "b/DungeonShooting_Document/\346\226\207\346\241\243\350\265\204\346\272\220/image_17.png" new file mode 100644 index 0000000..2ec7c41 --- /dev/null +++ "b/DungeonShooting_Document/\346\226\207\346\241\243\350\265\204\346\272\220/image_17.png" Binary files differ diff --git "a/DungeonShooting_Document/\346\226\207\346\241\243\350\265\204\346\272\220/image_18.png" "b/DungeonShooting_Document/\346\226\207\346\241\243\350\265\204\346\272\220/image_18.png" new file mode 100644 index 0000000..a8e6e2e --- /dev/null +++ "b/DungeonShooting_Document/\346\226\207\346\241\243\350\265\204\346\272\220/image_18.png" Binary files differ diff --git "a/DungeonShooting_Document/\346\226\207\346\241\243\350\265\204\346\272\220/image_19.png" "b/DungeonShooting_Document/\346\226\207\346\241\243\350\265\204\346\272\220/image_19.png" new file mode 100644 index 0000000..9ad2347 --- /dev/null +++ "b/DungeonShooting_Document/\346\226\207\346\241\243\350\265\204\346\272\220/image_19.png" Binary files differ diff --git "a/DungeonShooting_Document/\346\226\207\346\241\243\350\265\204\346\272\220/image_4.png" "b/DungeonShooting_Document/\346\226\207\346\241\243\350\265\204\346\272\220/image_4.png" new file mode 100644 index 0000000..c1c2d7a --- /dev/null +++ "b/DungeonShooting_Document/\346\226\207\346\241\243\350\265\204\346\272\220/image_4.png" Binary files differ diff --git "a/DungeonShooting_Document/\346\226\207\346\241\243\350\265\204\346\272\220/image_5.png" "b/DungeonShooting_Document/\346\226\207\346\241\243\350\265\204\346\272\220/image_5.png" new file mode 100644 index 0000000..246ce43 --- /dev/null +++ "b/DungeonShooting_Document/\346\226\207\346\241\243\350\265\204\346\272\220/image_5.png" Binary files differ diff --git "a/DungeonShooting_Document/\346\226\207\346\241\243\350\265\204\346\272\220/image_6.png" "b/DungeonShooting_Document/\346\226\207\346\241\243\350\265\204\346\272\220/image_6.png" new file mode 100644 index 0000000..78a85d7 --- /dev/null +++ "b/DungeonShooting_Document/\346\226\207\346\241\243\350\265\204\346\272\220/image_6.png" Binary files differ diff --git "a/DungeonShooting_Document/\346\226\207\346\241\243\350\265\204\346\272\220/image_7.png" "b/DungeonShooting_Document/\346\226\207\346\241\243\350\265\204\346\272\220/image_7.png" new file mode 100644 index 0000000..516e32a --- /dev/null +++ "b/DungeonShooting_Document/\346\226\207\346\241\243\350\265\204\346\272\220/image_7.png" Binary files differ diff --git "a/DungeonShooting_Document/\346\226\207\346\241\243\350\265\204\346\272\220/image_8.png" "b/DungeonShooting_Document/\346\226\207\346\241\243\350\265\204\346\272\220/image_8.png" new file mode 100644 index 0000000..6d9c19a --- /dev/null +++ "b/DungeonShooting_Document/\346\226\207\346\241\243\350\265\204\346\272\220/image_8.png" Binary files differ diff --git "a/DungeonShooting_Document/\346\226\207\346\241\243\350\265\204\346\272\220/image_9.png" "b/DungeonShooting_Document/\346\226\207\346\241\243\350\265\204\346\272\220/image_9.png" new file mode 100644 index 0000000..fcd1381 --- /dev/null +++ "b/DungeonShooting_Document/\346\226\207\346\241\243\350\265\204\346\272\220/image_9.png" Binary files differ diff --git "a/DungeonShooting_Document/\351\241\271\347\233\256\345\270\256\345\212\251\346\226\207\346\241\243.md" "b/DungeonShooting_Document/\351\241\271\347\233\256\345\270\256\345\212\251\346\226\207\346\241\243.md" new file mode 100644 index 0000000..c360d84 --- /dev/null +++ "b/DungeonShooting_Document/\351\241\271\347\233\256\345\270\256\345\212\251\346\226\207\346\241\243.md" @@ -0,0 +1,533 @@ + +前言: 该文档仅针对`DungeonShooting_Godot`目录下的Godot工程 + +第一次编写日期: 2023-04-01 + +目录: + + * [1.启动项目](#1启动项目) + * [2.项目资源](#2项目资源) + * [2.1.目录结构](#21目录结构) + * [2.2.脚本获取资源](#22脚本获取资源) + * [2.3.重新生成ResourcePath](#23重新生成resourcepath) + * [3.游戏框架](#3游戏框架) + * [3.1.简述](#31简述) + * [3.2.游戏核心系统](#32游戏核心系统) + * [3.2.1.什么是ActivityObject](#321什么是activityobject) + * [3.2.2.什么是Activity模板场景](#322什么是activity模板场景) + * [3.2.3.如何创建ActivityObject](#323如何创建activityobject) + * [第一步, 创建模板场景:](#第一步-创建模板场景-) + * [第二步, 创建脚本:](#第二步-创建脚本-) + * [实例化ActivityObject](#实例化activityobject) + * [3.2.4.自定义RegisterActivity](#324自定义registeractivity) + * [3.2.5.ActivityObject常用功能](#325activityobject常用功能) + * [自定义组件](#自定义组件) + * [运动控制](#运动控制) + * [垂直方向运动](#垂直方向运动) + * [协程](#协程) + * [3.3.地牢](#33地牢) + * [3.3.1.地牢概述](#331地牢概述) + * [3.3.2.创建模板房间](#332创建模板房间) + * [创建模板房间](#创建模板房间) + * [绘制房间](#绘制房间) + * [配置房间门生成位置](#配置房间门生成位置) + * [ActivityMark标记](#activitymark标记) + * [扩展ActivityMark标记](#扩展activitymark标记) + * [3.4.UI系统](#34ui系统) + * [3.4.1.UI系统概述](#341ui系统概述) + * [3.4.2.UI代码生器](#342ui代码生器) + * [创建UI](#创建ui) + * [打开UI](#打开ui) + * [3.4.3.常用功能](#343常用功能) + * [生命周期](#生命周期) + * [包裹UI节点的IUiNode](#包裹ui节点的iuinode) + + +--- +## 1.启动项目 +**Godot版本:** Godot4x +**.net版本:** .net6.0 +使用Godot打开`project.godot`, 如果是第一次打开项目会弹出一个找不到资源的提示, 这是因为项目没有编译过, 点击Godot右上角`build`, 然后打`开项目设置`, 在`插件`这一个页签下启用`DungeonShooting_plugin`这个插件, 然后项目就可以正常运行了 + +--- +## 2.项目资源 + +### 2.1.目录结构 +所有资源严格划分类别, 并放入指定的文件夹 +**项目目录结构如下:** +* ./addons: 项目插件目录 +* ./prefab: 预制体资源目录 +* ./resource 美术,音乐,配置文件等资源放置路径 +* ./scene 场景资源 +* ./src 代码资源 + +### 2.2.脚本获取资源 +为了方便代码获取资源以及排除代码中引用丢失资源的情况, 项目中使用`ResourcePath`类来放置所有资源路径, 该类常量值即代表资源路径, 使用`ResourceManager.Load()`来加载资源 +举个例子, 某资源在编辑器中的路径为: +```text +res://resource/theme/mainTheme.tres +``` +那么在`ResourcePath`中的代码就为: +```csharp +public const string resource_theme_mainTheme_tres = "res://resource/theme/mainTheme.tres"; +``` +加载该资源的代码为: +```csharp +var resource = ResourceManager.Load(ResourcePath.resource_theme_mainTheme_tres); +``` + +### 2.3.重新生成ResourcePath +如果项目中有资源变动, 则可以使用`Tools`页签下的`重新生成ResourcePath.cs文件` +![](文档资源/image_6.png) + +--- +## 3.游戏框架 +### 3.1.简述 +游戏框架分为三部分: +1. 游戏核心系统 +2. UI模块系统 +3. 代码生成系统 + +**游戏核心系统**: 以游戏玩法为中心的逻辑代码, 包括玩家, 敌人, 武器, 被动, 道具, 地牢生成, 房间规则, 存档逻辑等 +**UI模块系统**: 用户操作界面的逻辑代码 +**代码生成系统**: 自动生成便于开发的资源的逻辑代码, 包括生成UI模板, 生成地牢模板, 生成代码等 + +### 3.2.游戏核心系统 + +在`Main/ViewCanvas/SubViewportContainer/SubViewport`的子节点将开启4倍缩放, 并且启用完美像素 +该节点放置除UI以外的任何节点 + +#### 3.2.1.什么是ActivityObject +定义: 游戏内所有可活动物体的基类叫做`ActivityObject` +源代码: [ActivityObject.cs](../DungeonShooting_Godot/src/framework/activity/ActivityObject.cs) + +`ActivityObject`的意由来: 为了方便统一管理物体, 并且减少子类代码沉积, 因此将所有活动物体都需要用到的逻辑抽到一个统一的类中, 并命名为`ActivityObject`, 所有的活动物体都需要继承该类 + +`ActivityObject`提供的基础功能: +* `Component`组件管理 +* 协程功能 +* 外力控制运动 +* 纵轴运动模拟 (自由落体, 投抛物体等) +* 数据标记 +* 对象归属区域 +* 互动逻辑接口 + +通过下面这张图可以了解游戏中的物体与`ActivityObject`的关系 (注意: 该图为早期开发版本的继承关系图, 后面开发可能会有修改) +![](文档资源/2023-03-26_030144.png) + +#### 3.2.2.什么是Activity模板场景 +定义: `Activity模板场景`是指可以可以被实例化出`ActivityObject`对象的场景, 但是场景根节点必须是`ActivityObjectTemplate`节点 + +上面定义看起来有矛盾: `ActivityObjectTemplate`没有继承`ActivityObject`, 为啥以它为根节点的场景却能实例化出`ActivityObject`? +这就得提到一个概念: **场景与脚本分离**, 顾名思义, 场景中的节点与`ActivityObject`的脚本是完全分离的, 场景中的节点并没有挂载`ActivityObject`脚本, 在编辑器中它们是两互不干涉的. +游戏运行中, 如果需要实例化`ActivityObject`, 那么就先需要在`ActivityObject`脚本代码中指定该物体的模板场景, 实例化过程中游戏会先实例化出模板场景, 再用`ActivityObject`的实例顶替掉模板场景的根节点, 因此就能打到最终的效果. +为什么要这么做? 原因很简单, 因为我们的游戏是一个Roguelite游戏, 因此游戏中肯定会有大量的武器道具和敌人来填充内容, 但是总会有类似功能或者类似场景结构的物体, 这样就没有必要每一个物体都新建一个单独的场景, 而是让功能让这些类似功能或者结构的物体使用同一个场景, 但为了因对有不同行为逻辑的物体, 我们就设计了一套**场景与脚本分离**的设计模式来因对上述情况 +总结: `Activity模板场景`是不挂载逻辑脚本的, 但是`ActivityObject`必须包含使用的模板场景, 并由统一的Api来实例化`ActivityObject`对象, 至于`ActivityObject`如何绑定模板场景, 请看: 3.2.3.如何创建一个`ActivityObject` + +通过下面这张图可以更好的立即`Activity模板场景`和`ActivityObject`的关系 +(缺张图...) + +#### 3.2.3.如何创建ActivityObject +这里的创建分为两步: +##### 第一步, 创建模板场景: +创建一个空场景, 并且添加`ActivityObjectTemplate`节点 +![](文档资源/image_4.png) +创建完成后编辑器会自动创建必要的子节点 +![](文档资源/image_5.png) +此时就可以随意添加子节点和重命名更节点了, 最后记得保存到`./prefab`文件夹下 +**注意**: `ShadowSprite`,`AnimatedSprite`,`Collision`这三个节点不能改名, 但是可以修改属性和添加子节点 + +##### 第二步, 创建脚本: +创建脚本放到在`./src/game`下, 脚本必须继直接或间接承`ActivityObject`, 并且需要在类上加`[RegisterActivity(id, path)]`标记用于注册对象, `物体id`必须唯一 +源代码: [RegisterActivity.cs](../DungeonShooting_Godot/src/framework/activity/RegisterActivity.cs) +参考代码如下: +```csharp +using Godot; + +[RegisterActivity("物体唯一Id", "模板场景路径")] +public partial class YourActivity : ActivityObject +{ + +} +``` +为了方便区分物体类型, 可以使用`ActivityIdPrefix`类中的常量来添加`id`前缀, 目前支持的类型如下: +* **Role**: 角色 +* **Enemy**: 敌人 +* **Weapon**: 武器 +* **Bullet**: 子弹 +* **Shell**: 弹壳 +* **Other**: 其他类型, 例如门, 箱子等 +* **Test**: 测试物体 + +例如我们创建一个敌人, 那么`[RegisterActivity()]`就可以这么写: +```csharp +[RegisterActivity(ActivityIdPrefix.Enemy + "0001", ResourcePath.prefab_role_Enemy_tscn)] +``` + +##### 实例化ActivityObject +可通过`ActivityObject.Create(id)`创建物体, 这个`id`可以结合`ActivityIdPrefix`, 那么创建敌人最终可以这样写 +```csharp +var enemy = ActivityObject.Create(ActivityIdPrefix.Enemy + "0001"); +``` + +#### 3.2.4.自定义RegisterActivity +某些情况下需要更改`RegisterActivity`的参数, 或者需要对实例化出来的`ActivityInstance`进行统一的操作, 那么就需要我们自己写一个子类来继承`RegisterActivity`. +操作`ActivityInstance`需要重写: +```csharp +/// +/// 该函数在物体实例化后调用, 可用于一些自定义操作, 参数为实例对象 +/// +public virtual void CustomHandler(ActivityObject instance) +{ +} +``` + +例子: 注册武器, [RegisterWeapon.cs](../DungeonShooting_Godot/src/game/item/weapon/RegisterWeapon.cs) +由于创建武器必须指定武器属性数据, 那么原来的`[RegisterActivity()]`就不适用了, `RegisterWeapon`重写了构造函数, 改变了初始化参数, 并且重写`CustomHandler()`, 对`ActivityInstance`进行初始化属性操作 + +#### 3.2.5.ActivityObject常用功能 + +##### 自定义组件 +这个功能类似于`Unity`的`MonoBehaviour`, 组件必须继承`Component`类, 组件的作用是拆分功能代码, 开发者可以将相同功能的代码放入同一个组件中, 与`Godot`的`Node`不同的是, 挂载到`ActivityObject`上的组件并不会生成一个`Node`节点, 它相比于`Node`更加轻量 + +自定义组件代码: +```csharp +public class MyComponent : Component +{ + +} +``` +调用`ActivityObject.AddComponent()`添加组件: +```csharp +var component = activityInstance.AddComponent(); +``` +注意: 一个`ActivityObject`上不允许挂载多个相同的组件 + +##### 运动控制 +`ActivityObject`的移动由自身的`MoveController`组件控制, 非特殊情况下不要直接修改`ActivityObject`的位置, 而是使用`MoveController.AddConstantForce()`函数来添加外力 +```csharp +//添加一个向右的外力, 速度为100 +var force = activityInstance.MoveController.AddConstantForce("ForceName"); //外力必须起名称, 而且在运动控制器中必须唯一 +force.Velocity = new Vector2(0, 100); +//以下为精简写法 +var force = activityInstance.MoveController.AddConstantForce(new Vector2(0, 100), 0); //创建匿名外力, 但是与上面不同的是当速率变为 0 时自动销毁 +``` +物体的运动方向就是所有外力总和的方向, 通过`MoveController.Velocity`可以获取当前运动速度 + +##### 垂直方向运动 +当游戏中需要制作飞行物体或者模拟投抛运动时, 就需要控制物体纵轴所处高度, `ActivityObject`中提供了一系列控制纵轴方向运动的属性和函数, 以下列举几个关键属性和函数: +```csharp +/// +/// 当前物体的海拔高度, 如果大于0, 则会做自由落体运动, 也就是执行投抛代码 +/// +public float Altitude { get; set; } = 0; + +/// +/// 物体纵轴移动速度, 如果设置大于0, 就可以营造向上投抛物体的效果, 该值会随着重力加速度衰减 +/// +public float VerticalSpeed { get; set; } = 0; + +/// +/// 物体下坠回弹的强度 +/// +public float BounceStrength { get; set; } = 0.5f; + +/// +/// 物体下坠回弹后的运动速度衰减量 +/// +public float BounceSpeed { get; set; } = 0.75f; + +/// +/// 是否启用垂直方向上的运动模拟, 默认开启, 如果禁用, 那么下落和投抛效果, 同样 Throw() 函数也将失效 +/// +public bool EnableVerticalMotion { get; set; } = true; +``` +垂直运动也提供了一些可供重写的虚函数: +```csharp +/// +/// 开始投抛该物体时调用 +/// +protected virtual void OnThrowStart() +{ +} + +/// +/// 投抛该物体达到最高点时调用 +/// +protected virtual void OnThrowMaxHeight(float height) +{ +} + +/// +/// 投抛状态下第一次接触地面时调用, 之后的回弹落地将不会调用该函数 +/// +protected virtual void OnFirstFallToGround() +{ +} + +/// +/// 投抛状态下每次接触地面时调用 +/// +protected virtual void OnFallToGround() +{ +} + +/// +/// 投抛结束时调用 +/// +protected virtual void OnThrowOver() +{ +} +``` +如果需要模拟飞行效果则需要设置`Altitude`值大于0, 并且将`EnableVerticalMotion`设置为`false` +如果需要自由落体, 则直接设置`Altitude`值大于0 +如果需要上抛运动, 则直接设置`VerticalSpeed`值大于0 +如果值`BounceStrength`和`BounceSpeed`设置成1, 则投抛的物体在地上会一直朝一个方向弹跳 +如果需要投抛物体不需要每个关键值都设置一遍信息, 只需要调用`ActivityObject.Throw()`函数即可: +```csharp +/// +/// 将该节点投抛出去 +/// +/// 初始高度 +/// 旋转速度 +/// 移动速率 +/// 纵轴速度 +public void Throw(float altitude, float verticalSpeed, Vector2 velocity, float rotate); +``` +调用示例, 模拟弹壳投抛落在地上弹跳的过程 +```csharp +var startPos = GlobalPosition; +var startHeight = 6; +var direction = GlobalRotationDegrees + Utils.RandomRangeInt(-30, 30) + 180; +var verticalSpeed = Utils.RandomRangeInt(60, 120); +var velocity = new Vector2(Utils.RandomRangeInt(20, 60), 0).Rotated(direction * Mathf.Pi / 180); +var rotate = Utils.RandomRangeInt(-720, 720); +var shell = ActivityObject.Create(ActivityIdPrefix.Shell + "0001"); +shell.Throw(startPos, startHeight, verticalSpeed, velocity, rotate); +``` + +##### 协程 +该功能与`Unity`的协程功能类似, 在协程函数中通过`yield`关键字暂停执行后面的代码, 并将控制权返还给`ActivityObject`, 协程常被用在动画处理和资源异步加载 +`ActivityObject`中协程相关函数: +```csharp +/// +/// 开启一个协程, 返回协程 id, 协程是在普通帧执行的, 支持: 协程嵌套, WaitForSeconds, WaitForFixedProcess +/// +public long StartCoroutine(IEnumerator able); + +/// +/// 根据协程 id 停止协程 +/// +public void StopCoroutine(long coroutineId); + +/// +/// 停止所有协程 +/// +public void StopAllCoroutine(); +``` +协程`yield return`返回特殊值类型如下: +* **WaitForSeconds**: 当前协程等待秒数 +* **WaitForFixedProcess**: 当前协程等待帧数 +* **IEnumerator**: 嵌套执行子协程, 等子协程执行完毕后才会继续执行后面的代码 + +协程`yield return`如果返回除以上数据类型以外的数据, 将忽略返回值 + +调用实例, 以下代码在`ActivityInstance`初始化时执行协程`StartRotation`, 协程在60帧内让物体每帧角度加1 +```csharp +public override void OnInit() +{ + StartCoroutine(StartRotation()); +} + +private IEnumerator StartRotation() +{ + for (int i = 0; i < 60; i++) + { + RotationDegrees += 1; + //结束这一帧, 返回0会被忽略返回值 + yield return 0; + } +} +``` + +### 3.3.地牢 +#### 3.3.1.地牢概述 +游戏中的地牢由若干层组成, 每一层地牢又由数个小房间随机拼接而成, 由起始房间开始, 成树状连接; 每一层地牢有一个起始房间, 和至少一个通向另一层的结束房间, 房间与房间之间由过道连接, 过道不会交叉和重叠 + +房间有以下类别 (目前代码还未完成区分类型的功能): +* **起始房间**: 由上一层地牢的结束房间进入该房间, 每层包含一个起始房间 +* **结束房间**: 进入另一层地牢, 每层只是包含一个结束房间 +* **普通战斗房间**: 进入该房间时会关上门, 并刷出若干波敌人, 消灭所有敌人后开门 +* **boss战房间**: 进入房间时会关上没, 刷出boss, 消灭boss后开门 +* **奖励房间**: 给予玩家武器或者道具奖励的房间 +* **商店**: 玩家买卖道具装备的房间 +* **事件房间**: 触发剧情或者解锁NPC的房间 + +#### 3.3.2.创建模板房间 +图块层级概述(后续补上, 先默认使用`resource/map/tileset/TileSet1.tres`) + +##### 创建模板房间 +项目提供了一套创建模板房间的工具, 点击`tools`页签, 找到`创建地牢房间`这一项, 输入模板房间名称(注意房间名称不能重复), 即可创建房间, 创建房间完成后会创建房间配置数据, 路径为`resource/map/tiledata/xxx.json`, 并将配置数据注册到`resource/map/RoomConfig.json`中 +![](文档资源/image_7.png) + +##### 绘制房间 +创建好的房间会自动在编辑器中打开, 为场景的根节点选好`TileSet`后就可以画房间了 +![](文档资源/image_8.png) +编辑器会自动计算出房间位置轮廓(绿色线)和导航区域(红色和黄色线), 并绘制出来, 按下`ctrs`+`s`, 编辑器就会将位置轮廓和导航信息存入`resource/map/tiledata/xxx.json`下 +注意, 为了避免Ai运动时卡墙角, 所以计算导航轮廓时特意与墙预留了半个格子的距离, 也就是说如果存在单格的道路, 导航计算就会出错, 所以在画道路时必须为两格以上的宽度, 像下面这两种情况就是不被允许的, 编辑器会绘制出错误的格子 +![](文档资源/image_9.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`保存, 以免造成数据丢失 + +##### ActivityMark标记 + +`ActivityMark`用于模板房间中创建`ActivityObject`对象, 并支配置指定的物体, 第几波生成该物体以及生成物体延时时间 +源代码: [ActivityMark.cs](../DungeonShooting_Godot/src/framework/map/mark/ActivityMark.cs) + +在房间根节点中创建`ActivityMark`对象 +![](文档资源/image_18.png) +创建完成后可以看到地图上多了一个`X`, 这个叉就是生成物体的位置, 可自由调整位置 +![](文档资源/image_19.png) +然后就可以在编辑器中设置`ActivityMark`数据了, `ActivityMark`有以下可以导出的属性: +```csharp +/// +/// 物体类型 +/// +[Export] +public ActivityIdPrefix.ActivityPrefixType Type = ActivityIdPrefix.ActivityPrefixType.NonePrefix; + +/// +/// 物体id +/// +[Export] +public string ItemId; + +/// +/// 所在层级 +/// +[Export] +public RoomLayerEnum Layer = RoomLayerEnum.NormalLayer; + +/// +/// 该标记在第几波调用 BeReady, +/// 一个房间内所以敌人清完即可进入下一波 +/// +[Export] +public int WaveNumber = 1; + +/// +/// 延时执行时间,单位:秒 +/// +[Export] +public float DelayTime = 0; +``` + +###### 扩展ActivityMark标记 +项目中提供了以下几个扩展`ActivityMark`属性的节点: +* [WeaponMark](../DungeonShooting_Godot/src/framework/map/mark/WeaponMark.cs): 创建武器设置弹药等 +* [EnemyMark](../DungeonShooting_Godot/src/framework/map/mark/EnemyMark.cs): 创建敌人并设置武器和弹药 + + +### 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` +源代码: [UiBase.cs](../DungeonShooting_Godot/src/framework/ui/UiBase.cs), [UiManager.cs](../DungeonShooting_Godot/src/framework/ui/UiManager.cs) +打开指定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 +![](文档资源/image_14.png) +创建完毕后编辑器会离开打开该UI场景 +观察文件系统可以注意到, 编辑器为我创建并保存了场景和代码, 并且还生成了一个`MyUiPanel.cs`的文件, 该文件就是我们写UI逻辑代码的地方, 并且命名方式为`UI名称`+`Panel`, 这个Panel类继承了自动生成出来的UI类 +![](文档资源/image_15.png) +![](文档资源/image_16.png) + +动态生成的UI代码的节点对象由`IUiNode`包裹, 为了子节点与内助属性区分方便, 生成出来的代码会为每一层的名称加上前缀`L_`, 同理如果需要获取子节点则直接寻找以`L_`开始的属性 +例如节点在编辑器的路径为`Group/Button`, 那么在代码里就是`L_Group.L_Button` +源代码: [IUiNode.cs](../DungeonShooting_Godot/src/framework/ui/IUiNode.cs) + +通过以下这个gif就可以直观感受到该功能的便捷之处 +![](文档资源/gif_4.gif) + +##### 打开UI +创建完成UI后, 编辑器也会在`UiManager`中生成打开该UI和获取UI实例的Api +![](文档资源/image_17.png) +那么可以直接调用`UiManager`中的函数打开该UI +```csharp +UiManager.Open_MyUi(); +``` + +#### 3.4.3.常用功能 + +##### 生命周期 +`UiBase`包含4个生命周期函数: +```csharp +/// +/// 创建当前ui时调用 +/// +public virtual void OnCreateUi() +{ +} + +/// +/// 当前ui显示时调用 +/// +public abstract void OnShowUi(); + +/// +/// 当前ui隐藏时调用 +/// +public abstract void OnHideUi(); + +/// +/// 销毁当前ui时调用 +/// +public virtual void OnDisposeUi() +{ +} +``` + +#### 包裹UI节点的IUiNode +获取`Node`实例: 使用例如`L_Group.L_Button`的代码获取的节点并不是`Godot`节点对象, 而是包裹对象, 需要从`Instance`属性中获取原生`Node`对象 +克隆节点: 使用`IUiNode.Clone()`可以完整的克隆当前节点以及子节点 +嵌套UI: 使用`IUiNode.OpenNestedUi()`即可以当前节点为根节点打开子级UI diff --git a/DungeonShooting_Godot/DungeonShooting.csproj b/DungeonShooting_Godot/DungeonShooting.csproj index 4d20267..48063c3 100644 --- a/DungeonShooting_Godot/DungeonShooting.csproj +++ b/DungeonShooting_Godot/DungeonShooting.csproj @@ -1,8 +1,10 @@ - + net6.0 true + + diff --git a/DungeonShooting_Godot/DungeonShooting.csproj.old b/DungeonShooting_Godot/DungeonShooting.csproj.old new file mode 100644 index 0000000..4d20267 --- /dev/null +++ b/DungeonShooting_Godot/DungeonShooting.csproj.old @@ -0,0 +1,9 @@ + + + net6.0 + true + + + + + \ No newline at end of file diff --git a/DungeonShooting_Godot/DungeonShooting.csproj.old.1 b/DungeonShooting_Godot/DungeonShooting.csproj.old.1 new file mode 100644 index 0000000..38f974b --- /dev/null +++ b/DungeonShooting_Godot/DungeonShooting.csproj.old.1 @@ -0,0 +1,12 @@ + + + net6.0 + true + + + D:\GameProject\DungeonShooting\DungeonShooting_Godot\.godot\mono\temp\bin\Debug\DungeonShooting.xml + + + + + \ No newline at end of file diff --git a/DungeonShooting_Godot/DungeonShooting.csproj.old.2 b/DungeonShooting_Godot/DungeonShooting.csproj.old.2 new file mode 100644 index 0000000..fc5c59a --- /dev/null +++ b/DungeonShooting_Godot/DungeonShooting.csproj.old.2 @@ -0,0 +1,11 @@ + + + net6.0 + true + + + + + + + \ No newline at end of file diff --git a/DungeonShooting_Godot/prefab/ui/MyUi.tscn b/DungeonShooting_Godot/prefab/ui/MyUi.tscn new file mode 100644 index 0000000..560b4ae --- /dev/null +++ b/DungeonShooting_Godot/prefab/ui/MyUi.tscn @@ -0,0 +1,27 @@ +[gd_scene load_steps=2 format=3 uid="uid://buxit3x615xu3"] + +[ext_resource type="Script" path="res://src/game/ui/myUi/MyUiPanel.cs" id="1_bhjxh"] + +[node name="MyUi" 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_bhjxh") + +[node name="Button" type="Button" parent="."] +layout_mode = 0 +offset_right = 12.0 +offset_bottom = 8.0 + +[node name="Control" type="Control" parent="."] +anchors_preset = 0 +offset_right = 40.0 +offset_bottom = 40.0 + +[node name="Label" type="Label" parent="Control"] +layout_mode = 0 +offset_right = 9.0 +offset_bottom = 49.0 diff --git a/DungeonShooting_Godot/project.godot b/DungeonShooting_Godot/project.godot index 1c92e97..aa774e3 100644 --- a/DungeonShooting_Godot/project.godot +++ b/DungeonShooting_Godot/project.godot @@ -23,7 +23,6 @@ window/size/viewport_width=1920 window/size/viewport_height=1080 -window/size/resizable=false window/stretch/aspect="keep_width" window/vsync/use_vsync=false diff --git a/DungeonShooting_Godot/resource/map/RoomConfig.json b/DungeonShooting_Godot/resource/map/RoomConfig.json index 7f313b7..d7e2650 100644 --- a/DungeonShooting_Godot/resource/map/RoomConfig.json +++ b/DungeonShooting_Godot/resource/map/RoomConfig.json @@ -14,5 +14,13 @@ { "ScenePath": "res://resource/map/tileMaps/Room4.tscn", "ConfigPath": "res://resource/map/tiledata/Room4.json" + }, + { + "ScenePath": "res://resource/map/tileMaps/Room5.tscn", + "ConfigPath": "res://resource/map/tiledata/Room5.json" + }, + { + "ScenePath": "res://resource/map/tileMaps/Room6.tscn", + "ConfigPath": "res://resource/map/tiledata/Room6.json" } ] \ No newline at end of file diff --git a/DungeonShooting_Godot/resource/map/tileMaps/Room4.tscn b/DungeonShooting_Godot/resource/map/tileMaps/Room4.tscn index ca484b5..3bf0a43 100644 --- a/DungeonShooting_Godot/resource/map/tileMaps/Room4.tscn +++ b/DungeonShooting_Godot/resource/map/tileMaps/Room4.tscn @@ -8,7 +8,7 @@ [node name="Room4" type="TileMap"] tile_set = ExtResource("1_pxj2g") format = 2 -layer_0/tile_data = PackedInt32Array(1179686, 0, 8, 1114150, 0, 8, 1048614, 0, 8, 983078, 0, 8, 917542, 0, 8, 852006, 0, 8, 786470, 0, 8, 720934, 0, 8, 655398, 0, 8, 589862, 0, 8, 524326, 0, 8, 458790, 0, 8, 1179685, 0, 8, 1114149, 0, 8, 1048613, 0, 8, 983077, 0, 8, 917541, 0, 8, 852005, 0, 8, 786469, 0, 8, 720933, 0, 8, 655397, 0, 8, 589861, 0, 8, 524325, 0, 8, 458789, 0, 8, 1179684, 0, 8, 1114148, 0, 8, 1048612, 0, 8, 983076, 0, 8, 917540, 0, 8, 852004, 0, 8, 786468, 0, 8, 720932, 0, 8, 655396, 0, 8, 589860, 0, 8, 524324, 0, 8, 458788, 0, 8, 1179683, 0, 8, 1114147, 0, 8, 1048611, 0, 8, 983075, 0, 8, 917539, 0, 8, 852003, 0, 8, 786467, 0, 8, 720931, 0, 8, 655395, 0, 8, 589859, 0, 8, 524323, 0, 8, 458787, 0, 8, 1179682, 0, 8, 1114146, 0, 8, 1048610, 0, 8, 983074, 0, 8, 917538, 0, 8, 852002, 0, 8, 786466, 0, 8, 720930, 0, 8, 655394, 0, 8, 589858, 0, 8, 524322, 0, 8, 458786, 0, 8, 1507361, 0, 8, 1441825, 0, 8, 1376289, 0, 8, 1310753, 0, 8, 1245217, 0, 8, 1179681, 0, 8, 1114145, 0, 8, 1048609, 0, 8, 983073, 0, 8, 917537, 0, 8, 852001, 0, 8, 786465, 0, 8, 720929, 0, 8, 655393, 0, 8, 589857, 0, 8, 524321, 0, 8, 458785, 0, 8, 393249, 0, 8, 327713, 0, 8, 262177, 0, 8, 196641, 0, 8, 131105, 0, 8, 1507360, 0, 8, 1441824, 0, 8, 1376288, 0, 8, 1310752, 0, 8, 1245216, 0, 8, 1179680, 0, 8, 1114144, 0, 8, 1048608, 0, 8, 983072, 0, 8, 917536, 0, 8, 852000, 0, 8, 786464, 0, 8, 720928, 0, 8, 655392, 0, 8, 589856, 0, 8, 524320, 0, 8, 458784, 0, 8, 393248, 0, 8, 327712, 0, 8, 262176, 0, 8, 196640, 0, 8, 131104, 0, 8, 1507359, 0, 8, 1441823, 0, 8, 1376287, 0, 8, 1310751, 0, 8, 1245215, 0, 8, 1179679, 0, 8, 1114143, 0, 8, 1048607, 0, 8, 983071, 0, 8, 917535, 0, 8, 851999, 0, 8, 786463, 0, 8, 720927, 0, 8, 655391, 0, 8, 589855, 0, 8, 524319, 0, 8, 458783, 0, 8, 393247, 0, 8, 327711, 0, 8, 262175, 0, 8, 196639, 0, 8, 131103, 0, 8, 1507358, 0, 8, 1441822, 0, 8, 1376286, 0, 8, 1310750, 0, 8, 1245214, 0, 8, 1179678, 0, 8, 1114142, 0, 8, 1048606, 0, 8, 983070, 0, 8, 917534, 0, 8, 851998, 0, 8, 786462, 0, 8, 720926, 0, 8, 655390, 0, 8, 589854, 0, 8, 524318, 0, 8, 458782, 0, 8, 393246, 0, 8, 327710, 0, 8, 262174, 0, 8, 196638, 0, 8, 131102, 0, 8, 1507357, 0, 8, 1441821, 0, 8, 1376285, 0, 8, 1310749, 0, 8, 1245213, 0, 8, 1179677, 0, 8, 1114141, 0, 8, 1048605, 0, 8, 983069, 0, 8, 917533, 0, 8, 851997, 0, 8, 786461, 0, 8, 720925, 0, 8, 655389, 0, 8, 589853, 0, 8, 524317, 0, 8, 458781, 0, 8, 393245, 0, 8, 327709, 0, 8, 262173, 0, 8, 196637, 0, 8, 131101, 0, 8, 1507356, 0, 8, 1441820, 0, 8, 1376284, 0, 8, 1310748, 0, 8, 1245212, 0, 8, 1179676, 0, 8, 1114140, 0, 8, 1048604, 0, 8, 983068, 0, 8, 917532, 0, 8, 851996, 0, 8, 786460, 0, 8, 720924, 0, 8, 655388, 0, 8, 589852, 0, 8, 524316, 0, 8, 458780, 0, 8, 393244, 0, 8, 327708, 0, 8, 262172, 0, 8, 196636, 0, 8, 131100, 0, 8, 1507355, 0, 8, 1441819, 0, 8, 1376283, 0, 8, 1310747, 0, 8, 1245211, 0, 8, 1179675, 0, 8, 1114139, 0, 8, 1048603, 0, 8, 983067, 0, 8, 917531, 0, 8, 851995, 0, 8, 786459, 0, 8, 720923, 0, 8, 655387, 0, 8, 589851, 0, 8, 524315, 0, 8, 458779, 0, 8, 393243, 0, 8, 327707, 0, 8, 262171, 0, 8, 196635, 0, 8, 131099, 0, 8, 1507354, 0, 8, 1441818, 0, 8, 1376282, 0, 8, 1310746, 0, 8, 1245210, 0, 8, 1179674, 0, 8, 1114138, 0, 8, 1048602, 0, 8, 983066, 0, 8, 917530, 0, 8, 851994, 0, 8, 786458, 0, 8, 720922, 0, 8, 655386, 0, 8, 589850, 0, 8, 524314, 0, 8, 458778, 0, 8, 393242, 0, 8, 327706, 0, 8, 262170, 0, 8, 196634, 0, 8, 131098, 0, 8, 1507353, 0, 8, 1441817, 0, 8, 1376281, 0, 8, 1310745, 0, 8, 1245209, 0, 8, 1179673, 0, 8, 1114137, 0, 8, 1048601, 0, 8, 983065, 0, 8, 917529, 0, 8, 851993, 0, 8, 786457, 0, 8, 720921, 0, 8, 655385, 0, 8, 589849, 0, 8, 524313, 0, 8, 458777, 0, 8, 393241, 0, 8, 327705, 0, 8, 262169, 0, 8, 196633, 0, 8, 131097, 0, 8, 917528, 0, 8, 851992, 0, 8, 786456, 0, 8, 720920, 0, 8, 655384, 0, 8, 917527, 0, 8, 851991, 0, 8, 786455, 0, 8, 720919, 0, 8, 655383, 0, 8, 917526, 0, 8, 851990, 0, 8, 786454, 0, 8, 720918, 0, 8, 655382, 0, 8, 917525, 0, 8, 851989, 0, 8, 786453, 0, 8, 720917, 0, 8, 655381, 0, 8, 917524, 0, 8, 851988, 0, 8, 786452, 0, 8, 720916, 0, 8, 655380, 0, 8, 917523, 0, 8, 851987, 0, 8, 786451, 0, 8, 720915, 0, 8, 655379, 0, 8, 917522, 0, 8, 851986, 0, 8, 786450, 0, 8, 720914, 0, 8, 655378, 0, 8, 917521, 0, 8, 851985, 0, 8, 786449, 0, 8, 720913, 0, 8, 655377, 0, 8, 917520, 0, 8, 851984, 0, 8, 786448, 0, 8, 720912, 0, 8, 655376, 0, 8, 589840, 0, 8, 524304, 0, 8, 458768, 0, 8, 393232, 0, 8, 327696, 0, 8, 262160, 0, 8, 196624, 0, 8, 131088, 0, 8, 1507343, 0, 8, 1441807, 0, 8, 1376271, 0, 8, 1310735, 0, 8, 1245199, 0, 8, 1179663, 0, 8, 1114127, 0, 8, 1048591, 0, 8, 983055, 0, 8, 917519, 0, 8, 851983, 0, 8, 786447, 0, 8, 720911, 0, 8, 655375, 0, 8, 589839, 0, 8, 524303, 0, 8, 458767, 0, 8, 393231, 0, 8, 327695, 0, 8, 262159, 0, 8, 196623, 0, 8, 131087, 0, 8, 1507342, 0, 8, 1441806, 0, 8, 1376270, 0, 8, 1310734, 0, 8, 1245198, 0, 8, 1179662, 0, 8, 1114126, 0, 8, 1048590, 0, 8, 983054, 0, 8, 917518, 0, 8, 851982, 0, 8, 786446, 0, 8, 720910, 0, 8, 655374, 0, 8, 589838, 0, 8, 524302, 0, 8, 458766, 0, 8, 393230, 0, 8, 327694, 0, 8, 262158, 0, 8, 196622, 0, 8, 131086, 0, 8, 1507341, 0, 8, 1441805, 0, 8, 1376269, 0, 8, 1310733, 0, 8, 1245197, 0, 8, 1179661, 0, 8, 1114125, 0, 8, 1048589, 0, 8, 983053, 0, 8, 917517, 0, 8, 851981, 0, 8, 786445, 0, 8, 720909, 0, 8, 655373, 0, 8, 589837, 0, 8, 524301, 0, 8, 458765, 0, 8, 393229, 0, 8, 327693, 0, 8, 262157, 0, 8, 196621, 0, 8, 131085, 0, 8, 1507340, 0, 8, 1441804, 0, 8, 1376268, 0, 8, 1310732, 0, 8, 1245196, 0, 8, 1179660, 0, 8, 1114124, 0, 8, 1048588, 0, 8, 983052, 0, 8, 917516, 0, 8, 851980, 0, 8, 786444, 0, 8, 720908, 0, 8, 655372, 0, 8, 589836, 0, 8, 524300, 0, 8, 458764, 0, 8, 393228, 0, 8, 327692, 0, 8, 262156, 0, 8, 196620, 0, 8, 131084, 0, 8, 1507339, 0, 8, 1441803, 0, 8, 1376267, 0, 8, 1310731, 0, 8, 1245195, 0, 8, 1179659, 0, 8, 1114123, 0, 8, 1048587, 0, 8, 983051, 0, 8, 917515, 0, 8, 851979, 0, 8, 786443, 0, 8, 720907, 0, 8, 655371, 0, 8, 589835, 0, 8, 524299, 0, 8, 458763, 0, 8, 393227, 0, 8, 327691, 0, 8, 262155, 0, 8, 196619, 0, 8, 131083, 0, 8, 1507338, 0, 8, 1441802, 0, 8, 1376266, 0, 8, 1310730, 0, 8, 1245194, 0, 8, 1179658, 0, 8, 1114122, 0, 8, 1048586, 0, 8, 983050, 0, 8, 917514, 0, 8, 851978, 0, 8, 786442, 0, 8, 720906, 0, 8, 655370, 0, 8, 589834, 0, 8, 524298, 0, 8, 458762, 0, 8, 393226, 0, 8, 327690, 0, 8, 262154, 0, 8, 196618, 0, 8, 131082, 0, 8, 1507337, 0, 8, 1441801, 0, 8, 1376265, 0, 8, 1310729, 0, 8, 1245193, 0, 8, 1179657, 0, 8, 1114121, 0, 8, 1048585, 0, 8, 983049, 0, 8, 917513, 0, 8, 851977, 0, 8, 786441, 0, 8, 720905, 0, 8, 655369, 0, 8, 589833, 0, 8, 524297, 0, 8, 458761, 0, 8, 393225, 0, 8, 327689, 0, 8, 262153, 0, 8, 196617, 0, 8, 131081, 0, 8, 1507336, 0, 8, 1441800, 0, 8, 1376264, 0, 8, 1310728, 0, 8, 1245192, 0, 8, 1179656, 0, 8, 1114120, 0, 8, 1048584, 0, 8, 983048, 0, 8, 917512, 0, 8, 851976, 0, 8, 786440, 0, 8, 720904, 0, 8, 655368, 0, 8, 589832, 0, 8, 524296, 0, 8, 458760, 0, 8, 393224, 0, 8, 327688, 0, 8, 262152, 0, 8, 196616, 0, 8, 131080, 0, 8, 1179655, 0, 8, 1114119, 0, 8, 1048583, 0, 8, 983047, 0, 8, 917511, 0, 8, 851975, 0, 8, 786439, 0, 8, 720903, 0, 8, 655367, 0, 8, 589831, 0, 8, 524295, 0, 8, 458759, 0, 8, 1179654, 0, 8, 1114118, 0, 8, 1048582, 0, 8, 983046, 0, 8, 917510, 0, 8, 851974, 0, 8, 786438, 0, 8, 720902, 0, 8, 655366, 0, 8, 589830, 0, 8, 524294, 0, 8, 458758, 0, 8, 1179653, 0, 8, 1114117, 0, 8, 1048581, 0, 8, 983045, 0, 8, 917509, 0, 8, 851973, 0, 8, 786437, 0, 8, 720901, 0, 8, 655365, 0, 8, 589829, 0, 8, 524293, 0, 8, 458757, 0, 8, 1179652, 0, 8, 1114116, 0, 8, 1048580, 0, 8, 983044, 0, 8, 917508, 0, 8, 851972, 0, 8, 786436, 0, 8, 720900, 0, 8, 655364, 0, 8, 589828, 0, 8, 524292, 0, 8, 458756, 0, 8, 1179651, 0, 8, 1114115, 0, 8, 1048579, 0, 8, 983043, 0, 8, 917507, 0, 8, 851971, 0, 8, 786435, 0, 8, 720899, 0, 8, 655363, 0, 8, 589827, 0, 8, 524291, 0, 8, 458755, 0, 8, 65543, 131072, 7, 65544, 131072, 7, 1572872, 131072, 2, 65545, 131072, 7, 1572873, 131072, 2, 65546, 131072, 7, 1572874, 131072, 2, 65547, 131072, 7, 1572875, 131072, 2, 65548, 131072, 7, 1572876, 131072, 2, 65549, 131072, 7, 1572877, 131072, 2, 65550, 131072, 7, 1572878, 131072, 2, 65551, 131072, 7, 1572879, 131072, 2, 65552, 131072, 7, 65561, 131072, 7, 1572889, 131072, 2, 65562, 131072, 7, 1572890, 131072, 2, 65563, 131072, 7, 1572891, 131072, 2, 65564, 131072, 7, 1572892, 131072, 2, 65565, 131072, 7, 1572893, 131072, 2, 65566, 131072, 7, 1572894, 131072, 2, 65567, 131072, 7, 1572895, 131072, 2, 65568, 131072, 7, 1572896, 131072, 2, 65569, 131072, 7, 1572897, 131072, 2, 458791, 65536, 3, 524327, 65536, 3, 589863, 65536, 3, 655399, 65536, 3, 720935, 65536, 3, 786471, 65536, 3, 852007, 65536, 3, 917543, 65536, 3, 983079, 65536, 3, 1048615, 65536, 3, 1114151, 65536, 3, 1179687, 65536, 3, 983064, 0, 8, 983063, 0, 8, 983062, 0, 8, 983061, 0, 8, 983060, 0, 8, 983059, 0, 8, 983058, 0, 8, 983057, 0, 8, 1572880, 131072, 2, 1507344, 0, 8, 1441808, 0, 8, 1376272, 0, 8, 1310736, 0, 8, 1245200, 0, 8, 1179664, 0, 8, 1114128, 0, 8, 1048592, 0, 8, 983056, 0, 8, 1048593, 65536, 2, 1048594, 131072, 2, 1048595, 131072, 2, 1048596, 131072, 2, 1048597, 131072, 2, 1048598, 131072, 2, 1048599, 131072, 2, 1048600, 196608, 2, 1114136, 196608, 3, 1179672, 196608, 3, 1245208, 196608, 3, 1310744, 196608, 3, 1376280, 196608, 3, 1441816, 196608, 3, 1507352, 196608, 3, 1572888, 720896, 2, 1114129, 65536, 3, 1179665, 65536, 3, 1245201, 65536, 3, 1310737, 65536, 3, 1376273, 65536, 3, 1441809, 65536, 3, 1507345, 65536, 3, 1572881, 851968, 2, 589841, 65536, 7, 524305, 65536, 3, 458769, 65536, 3, 393233, 65536, 3, 327697, 65536, 3, 262161, 65536, 3, 196625, 65536, 3, 131089, 65536, 3, 589842, 131072, 7, 589843, 131072, 7, 589844, 131072, 7, 589845, 131072, 7, 589846, 131072, 7, 589847, 131072, 7, 589848, 196608, 7, 524312, 196608, 3, 458776, 196608, 3, 393240, 196608, 3, 327704, 196608, 3, 262168, 196608, 3, 196632, 196608, 3, 131096, 196608, 3, 65560, 196608, 4, 65553, 65536, 4, 131106, 65536, 3, 196642, 65536, 3, 65570, 65536, 4, 262178, 65536, 3, 327714, 65536, 3, 393250, 65536, 7, 393252, 131072, 7, 393253, 131072, 7, 393254, 131072, 7, 393255, 65536, 4, 393251, 131072, 7, 1245223, 851968, 2, 1245222, 131072, 2, 1245221, 131072, 2, 1245220, 131072, 2, 1245219, 131072, 2, 1245218, 65536, 2, 1310754, 65536, 3, 1376290, 65536, 3, 1441826, 65536, 3, 1507362, 65536, 3, 1572898, 851968, 2, 458754, 196608, 3, 196615, 0, 8, 131079, 0, 8, 262151, 0, 8, 327687, 0, 8, 393223, 0, 8, 393222, 0, 8, 393221, 0, 8, 393220, 0, 8, 393219, 0, 8, 524290, 196608, 3, 393218, 196608, 3, 589826, 196608, 3, 655362, 196608, 3, 720898, 196608, 3, 786434, 196608, 3, 851970, 196608, 3, 917506, 196608, 3, 983042, 196608, 3, 1048578, 196608, 3, 1114114, 196608, 3, 1179650, 196608, 3, 1245188, 131072, 2, 1245187, 131072, 2, 1245186, 720896, 2, 1245189, 131072, 2, 1245190, 131072, 2, 1245191, 196608, 2, 1310727, 196608, 3, 1376263, 196608, 3, 1441799, 196608, 3, 1507335, 196608, 3, 1572871, 720896, 2, 131075, 0, 8, 196611, 0, 8, 262147, 0, 8, 327683, 0, 8, 327682, 196608, 3, 327684, 0, 8, 262146, 196608, 3, 262148, 0, 8, 196610, 196608, 3, 196612, 0, 8, 131074, 196608, 3, 131076, 0, 8, 65538, 196608, 4, 65539, 131072, 7, 65540, 131072, 7, 131078, 0, 8, 131077, 0, 8, 196613, 0, 8, 65541, 131072, 7, 196614, 0, 8, 65542, 131072, 7, 262149, 0, 8, 262150, 0, 8, 327686, 0, 8, 327685, 0, 8) +layer_0/tile_data = PackedInt32Array(1179686, 0, 8, 1114150, 0, 8, 1048614, 0, 8, 983078, 0, 8, 917542, 0, 8, 852006, 0, 8, 786470, 0, 8, 720934, 0, 8, 655398, 0, 8, 589862, 0, 8, 524326, 0, 8, 458790, 0, 8, 1179685, 0, 8, 1114149, 0, 8, 1048613, 0, 8, 983077, 0, 8, 917541, 0, 8, 852005, 0, 8, 786469, 0, 8, 720933, 0, 8, 655397, 0, 8, 589861, 0, 8, 524325, 0, 8, 458789, 0, 8, 1179684, 0, 8, 1114148, 0, 8, 1048612, 0, 8, 983076, 0, 8, 917540, 0, 8, 852004, 0, 8, 786468, 0, 8, 720932, 0, 8, 655396, 0, 8, 589860, 0, 8, 524324, 0, 8, 458788, 0, 8, 1179683, 0, 8, 1114147, 0, 8, 1048611, 0, 8, 983075, 0, 8, 917539, 0, 8, 852003, 0, 8, 786467, 0, 8, 720931, 0, 8, 655395, 0, 8, 589859, 0, 8, 524323, 0, 8, 458787, 0, 8, 1179682, 0, 8, 1114146, 0, 8, 1048610, 0, 8, 983074, 0, 8, 917538, 0, 8, 852002, 0, 8, 786466, 0, 8, 720930, 0, 8, 655394, 0, 8, 589858, 0, 8, 524322, 0, 8, 458786, 0, 8, 1507361, 0, 8, 1441825, 0, 8, 1376289, 0, 8, 1310753, 0, 8, 1245217, 0, 8, 1179681, 0, 8, 1114145, 0, 8, 1048609, 0, 8, 983073, 0, 8, 917537, 0, 8, 852001, 0, 8, 786465, 0, 8, 720929, 0, 8, 655393, 0, 8, 589857, 0, 8, 524321, 0, 8, 458785, 0, 8, 393249, 0, 8, 327713, 0, 8, 262177, 0, 8, 196641, 0, 8, 131105, 0, 8, 1507360, 0, 8, 1441824, 0, 8, 1376288, 0, 8, 1310752, 0, 8, 1245216, 0, 8, 1179680, 0, 8, 1114144, 0, 8, 1048608, 0, 8, 983072, 0, 8, 917536, 0, 8, 852000, 0, 8, 786464, 0, 8, 720928, 0, 8, 655392, 0, 8, 589856, 0, 8, 524320, 0, 8, 458784, 0, 8, 393248, 0, 8, 327712, 0, 8, 262176, 0, 8, 196640, 0, 8, 131104, 0, 8, 1507359, 0, 8, 1441823, 0, 8, 1376287, 0, 8, 1310751, 0, 8, 1245215, 0, 8, 1179679, 0, 8, 1114143, 0, 8, 1048607, 0, 8, 983071, 0, 8, 917535, 0, 8, 851999, 0, 8, 786463, 0, 8, 720927, 0, 8, 655391, 0, 8, 589855, 0, 8, 524319, 0, 8, 458783, 0, 8, 393247, 0, 8, 327711, 0, 8, 262175, 0, 8, 196639, 0, 8, 131103, 0, 8, 1507358, 0, 8, 1441822, 0, 8, 1376286, 0, 8, 1310750, 0, 8, 1245214, 0, 8, 1179678, 0, 8, 1114142, 0, 8, 1048606, 0, 8, 983070, 0, 8, 917534, 0, 8, 851998, 0, 8, 786462, 0, 8, 720926, 0, 8, 655390, 0, 8, 589854, 0, 8, 524318, 0, 8, 458782, 0, 8, 393246, 0, 8, 327710, 0, 8, 262174, 0, 8, 196638, 0, 8, 131102, 0, 8, 1507357, 0, 8, 1441821, 0, 8, 1376285, 0, 8, 1310749, 0, 8, 1245213, 0, 8, 1179677, 0, 8, 1114141, 0, 8, 1048605, 0, 8, 983069, 0, 8, 917533, 0, 8, 851997, 0, 8, 786461, 0, 8, 720925, 0, 8, 655389, 0, 8, 589853, 0, 8, 524317, 0, 8, 458781, 0, 8, 393245, 0, 8, 327709, 0, 8, 262173, 0, 8, 196637, 0, 8, 131101, 0, 8, 1507356, 0, 8, 1441820, 0, 8, 1376284, 0, 8, 1310748, 0, 8, 1245212, 0, 8, 1179676, 0, 8, 1114140, 0, 8, 1048604, 0, 8, 983068, 0, 8, 917532, 0, 8, 851996, 0, 8, 786460, 0, 8, 720924, 0, 8, 655388, 0, 8, 589852, 0, 8, 524316, 0, 8, 458780, 0, 8, 393244, 0, 8, 327708, 0, 8, 262172, 0, 8, 196636, 0, 8, 131100, 0, 8, 1507355, 0, 8, 1441819, 0, 8, 1376283, 0, 8, 1310747, 0, 8, 1245211, 0, 8, 1179675, 0, 8, 1114139, 0, 8, 1048603, 0, 8, 983067, 0, 8, 917531, 0, 8, 851995, 0, 8, 786459, 0, 8, 720923, 0, 8, 655387, 0, 8, 589851, 0, 8, 524315, 0, 8, 458779, 0, 8, 393243, 0, 8, 327707, 0, 8, 262171, 0, 8, 196635, 0, 8, 131099, 0, 8, 1507354, 0, 8, 1441818, 0, 8, 1376282, 0, 8, 1310746, 0, 8, 1245210, 0, 8, 1179674, 0, 8, 1114138, 0, 8, 1048602, 0, 8, 983066, 0, 8, 917530, 0, 8, 851994, 0, 8, 786458, 0, 8, 720922, 0, 8, 655386, 0, 8, 589850, 0, 8, 524314, 0, 8, 458778, 0, 8, 393242, 0, 8, 327706, 0, 8, 262170, 0, 8, 196634, 0, 8, 131098, 0, 8, 1507353, 0, 8, 1441817, 0, 8, 1376281, 0, 8, 1310745, 0, 8, 1245209, 0, 8, 1179673, 0, 8, 1114137, 0, 8, 1048601, 0, 8, 983065, 0, 8, 917529, 0, 8, 851993, 0, 8, 786457, 0, 8, 720921, 0, 8, 655385, 0, 8, 589849, 0, 8, 524313, 0, 8, 458777, 0, 8, 393241, 0, 8, 327705, 0, 8, 262169, 0, 8, 196633, 0, 8, 131097, 0, 8, 917528, 0, 8, 851992, 0, 8, 786456, 0, 8, 720920, 0, 8, 655384, 0, 8, 917527, 0, 8, 851991, 0, 8, 786455, 0, 8, 720919, 0, 8, 655383, 0, 8, 917526, 0, 8, 851990, 0, 8, 786454, 0, 8, 720918, 0, 8, 655382, 0, 8, 917525, 0, 8, 851989, 0, 8, 786453, 0, 8, 720917, 0, 8, 655381, 0, 8, 917524, 0, 8, 851988, 0, 8, 786452, 0, 8, 720916, 0, 8, 655380, 0, 8, 917523, 0, 8, 851987, 0, 8, 786451, 0, 8, 720915, 0, 8, 655379, 0, 8, 917522, 0, 8, 851986, 0, 8, 786450, 0, 8, 720914, 0, 8, 655378, 0, 8, 917521, 0, 8, 851985, 0, 8, 786449, 0, 8, 720913, 0, 8, 655377, 0, 8, 917520, 0, 8, 851984, 0, 8, 786448, 0, 8, 720912, 0, 8, 655376, 0, 8, 589840, 0, 8, 524304, 0, 8, 458768, 0, 8, 393232, 0, 8, 327696, 0, 8, 262160, 0, 8, 196624, 0, 8, 131088, 0, 8, 1507343, 0, 8, 1441807, 0, 8, 1376271, 0, 8, 1310735, 0, 8, 1245199, 0, 8, 1179663, 0, 8, 1114127, 0, 8, 1048591, 0, 8, 983055, 0, 8, 917519, 0, 8, 851983, 0, 8, 786447, 0, 8, 720911, 0, 8, 655375, 0, 8, 589839, 0, 8, 524303, 0, 8, 458767, 0, 8, 393231, 0, 8, 327695, 0, 8, 262159, 0, 8, 196623, 0, 8, 131087, 0, 8, 1507342, 0, 8, 1441806, 0, 8, 1376270, 0, 8, 1310734, 0, 8, 1245198, 0, 8, 1179662, 0, 8, 1114126, 0, 8, 1048590, 0, 8, 983054, 0, 8, 917518, 0, 8, 851982, 0, 8, 786446, 0, 8, 720910, 0, 8, 655374, 0, 8, 589838, 0, 8, 524302, 0, 8, 458766, 0, 8, 393230, 0, 8, 327694, 0, 8, 262158, 0, 8, 196622, 0, 8, 131086, 0, 8, 1507341, 0, 8, 1441805, 0, 8, 1376269, 0, 8, 1310733, 0, 8, 1245197, 0, 8, 1179661, 0, 8, 1114125, 0, 8, 1048589, 0, 8, 983053, 0, 8, 917517, 0, 8, 851981, 0, 8, 786445, 0, 8, 720909, 0, 8, 655373, 0, 8, 589837, 0, 8, 524301, 0, 8, 458765, 0, 8, 393229, 0, 8, 327693, 0, 8, 262157, 0, 8, 196621, 0, 8, 131085, 0, 8, 1507340, 0, 8, 1441804, 0, 8, 1376268, 0, 8, 1310732, 0, 8, 1245196, 0, 8, 1179660, 0, 8, 1114124, 0, 8, 1048588, 0, 8, 983052, 0, 8, 917516, 0, 8, 851980, 0, 8, 786444, 0, 8, 720908, 0, 8, 655372, 0, 8, 589836, 0, 8, 524300, 0, 8, 458764, 0, 8, 393228, 0, 8, 327692, 0, 8, 262156, 0, 8, 196620, 0, 8, 131084, 0, 8, 1507339, 0, 8, 1441803, 0, 8, 1376267, 0, 8, 1310731, 0, 8, 1245195, 0, 8, 1179659, 0, 8, 1114123, 0, 8, 1048587, 0, 8, 983051, 0, 8, 917515, 0, 8, 851979, 0, 8, 786443, 0, 8, 720907, 0, 8, 655371, 0, 8, 589835, 0, 8, 524299, 0, 8, 458763, 0, 8, 393227, 0, 8, 327691, 0, 8, 262155, 0, 8, 196619, 0, 8, 131083, 0, 8, 1507338, 0, 8, 1441802, 0, 8, 1376266, 0, 8, 1310730, 0, 8, 1245194, 0, 8, 1179658, 0, 8, 1114122, 0, 8, 1048586, 0, 8, 983050, 0, 8, 917514, 0, 8, 851978, 0, 8, 786442, 0, 8, 720906, 0, 8, 655370, 0, 8, 589834, 0, 8, 524298, 0, 8, 458762, 0, 8, 393226, 0, 8, 327690, 0, 8, 262154, 0, 8, 196618, 0, 8, 131082, 0, 8, 1507337, 0, 8, 1441801, 0, 8, 1376265, 0, 8, 1310729, 0, 8, 1245193, 0, 8, 1179657, 0, 8, 1114121, 0, 8, 1048585, 0, 8, 983049, 0, 8, 917513, 0, 8, 851977, 0, 8, 786441, 0, 8, 720905, 0, 8, 655369, 0, 8, 589833, 0, 8, 524297, 0, 8, 458761, 0, 8, 393225, 0, 8, 327689, 0, 8, 262153, 0, 8, 196617, 0, 8, 131081, 0, 8, 1507336, 0, 8, 1441800, 0, 8, 1376264, 0, 8, 1310728, 0, 8, 1245192, 0, 8, 1179656, 0, 8, 1114120, 0, 8, 1048584, 0, 8, 983048, 0, 8, 917512, 0, 8, 851976, 0, 8, 786440, 0, 8, 720904, 0, 8, 655368, 0, 8, 589832, 0, 8, 524296, 0, 8, 458760, 0, 8, 393224, 0, 8, 327688, 0, 8, 262152, 0, 8, 196616, 0, 8, 131080, 0, 8, 1179655, 0, 8, 1114119, 0, 8, 1048583, 0, 8, 983047, 0, 8, 917511, 0, 8, 851975, 0, 8, 786439, 0, 8, 720903, 0, 8, 655367, 0, 8, 589831, 0, 8, 524295, 0, 8, 458759, 0, 8, 1179654, 0, 8, 1114118, 0, 8, 1048582, 0, 8, 983046, 0, 8, 917510, 0, 8, 851974, 0, 8, 786438, 0, 8, 720902, 0, 8, 655366, 0, 8, 589830, 0, 8, 524294, 0, 8, 458758, 0, 8, 1179653, 0, 8, 1114117, 0, 8, 1048581, 0, 8, 983045, 0, 8, 917509, 0, 8, 851973, 0, 8, 786437, 0, 8, 720901, 0, 8, 655365, 0, 8, 589829, 0, 8, 524293, 0, 8, 458757, 0, 8, 1179652, 0, 8, 1114116, 0, 8, 1048580, 0, 8, 983044, 0, 8, 917508, 0, 8, 851972, 0, 8, 786436, 0, 8, 720900, 0, 8, 655364, 0, 8, 589828, 0, 8, 524292, 0, 8, 458756, 0, 8, 1179651, 0, 8, 1114115, 0, 8, 1048579, 0, 8, 983043, 0, 8, 917507, 0, 8, 851971, 0, 8, 786435, 0, 8, 720899, 0, 8, 655363, 0, 8, 589827, 0, 8, 524291, 0, 8, 458755, 0, 8, 65543, 131072, 7, 65544, 131072, 7, 1572872, 131072, 2, 65545, 131072, 7, 1572873, 131072, 2, 65546, 131072, 7, 1572874, 131072, 2, 65547, 131072, 7, 1572875, 131072, 2, 65548, 131072, 7, 1572876, 131072, 2, 65549, 131072, 7, 1572877, 131072, 2, 65550, 131072, 7, 1572878, 131072, 2, 65551, 131072, 7, 1572879, 131072, 2, 65552, 131072, 7, 65561, 131072, 7, 1572889, 131072, 2, 65562, 131072, 7, 1572890, 131072, 2, 65563, 131072, 7, 1572891, 131072, 2, 65564, 131072, 7, 1572892, 131072, 2, 65565, 131072, 7, 1572893, 131072, 2, 65566, 131072, 7, 1572894, 131072, 2, 65567, 131072, 7, 1572895, 131072, 2, 65568, 131072, 7, 1572896, 131072, 2, 65569, 131072, 7, 1572897, 131072, 2, 458791, 65536, 3, 524327, 65536, 3, 589863, 65536, 3, 655399, 65536, 3, 720935, 65536, 3, 786471, 65536, 3, 852007, 65536, 3, 917543, 65536, 3, 983079, 65536, 3, 1048615, 65536, 3, 1114151, 65536, 3, 1179687, 65536, 3, 983064, 0, 8, 983063, 0, 8, 983062, 0, 8, 983061, 0, 8, 983060, 0, 8, 983059, 0, 8, 983058, 0, 8, 983057, 0, 8, 1572880, 131072, 2, 1507344, 0, 8, 1441808, 0, 8, 1376272, 0, 8, 1310736, 0, 8, 1245200, 0, 8, 1179664, 0, 8, 1114128, 0, 8, 1048592, 0, 8, 983056, 0, 8, 1048593, 65536, 2, 1048594, 131072, 2, 1048595, 131072, 2, 1048596, 131072, 2, 1048597, 131072, 2, 1048598, 131072, 2, 1048599, 131072, 2, 1048600, 196608, 2, 1114136, 196608, 3, 1179672, 196608, 3, 1245208, 196608, 3, 1310744, 196608, 3, 1376280, 196608, 3, 1441816, 196608, 3, 1507352, 196608, 3, 1572888, 720896, 2, 1114129, 65536, 3, 1179665, 65536, 3, 1245201, 65536, 3, 1310737, 65536, 3, 1376273, 65536, 3, 1441809, 65536, 3, 1507345, 65536, 3, 1572881, 851968, 2, 589841, 65536, 7, 524305, 65536, 3, 458769, 65536, 3, 393233, 65536, 3, 196625, 65536, 3, 131089, 65536, 3, 589842, 131072, 7, 589843, 131072, 7, 589844, 131072, 7, 589845, 131072, 7, 589846, 131072, 7, 589847, 131072, 7, 196632, 196608, 3, 131096, 196608, 3, 65560, 196608, 4, 65553, 65536, 4, 131106, 65536, 3, 196642, 65536, 3, 65570, 65536, 4, 262178, 65536, 3, 327714, 65536, 3, 393250, 65536, 7, 393252, 131072, 7, 393253, 131072, 7, 393254, 131072, 7, 393255, 65536, 4, 393251, 131072, 7, 1245223, 851968, 2, 1245222, 131072, 2, 1245221, 131072, 2, 1245220, 131072, 2, 1245219, 131072, 2, 1245218, 65536, 2, 1310754, 65536, 3, 1376290, 65536, 3, 1441826, 65536, 3, 1507362, 65536, 3, 1572898, 851968, 2, 458754, 196608, 3, 196615, 0, 8, 131079, 0, 8, 262151, 0, 8, 327687, 0, 8, 393223, 0, 8, 393222, 0, 8, 393221, 0, 8, 393220, 0, 8, 393219, 0, 8, 524290, 196608, 3, 393218, 196608, 3, 589826, 196608, 3, 655362, 196608, 3, 720898, 196608, 3, 786434, 196608, 3, 851970, 196608, 3, 917506, 196608, 3, 983042, 196608, 3, 1048578, 196608, 3, 1114114, 196608, 3, 1179650, 196608, 3, 1245188, 131072, 2, 1245187, 131072, 2, 1245186, 720896, 2, 1245189, 131072, 2, 1245190, 131072, 2, 1245191, 196608, 2, 1310727, 196608, 3, 1376263, 196608, 3, 1441799, 196608, 3, 1507335, 196608, 3, 1572871, 720896, 2, 131075, 0, 8, 196611, 0, 8, 262147, 0, 8, 327683, 0, 8, 327682, 196608, 3, 327684, 0, 8, 262146, 196608, 3, 262148, 0, 8, 196610, 196608, 3, 196612, 0, 8, 131074, 196608, 3, 131076, 0, 8, 65538, 196608, 4, 65539, 131072, 7, 65540, 131072, 7, 131078, 0, 8, 131077, 0, 8, 196613, 0, 8, 65541, 131072, 7, 196614, 0, 8, 65542, 131072, 7, 262149, 0, 8, 262150, 0, 8, 327686, 0, 8, 327685, 0, 8, 262161, 65536, 3, 327697, 65536, 3, 589848, 196608, 7, 524312, 196608, 3, 458776, 196608, 3, 393240, 196608, 3, 327704, 196608, 3, 262168, 196608, 3) script = ExtResource("dungeonRoomTemplate") [node name="Level1" type="Node" parent="."] diff --git a/DungeonShooting_Godot/resource/map/tileMaps/Room5.tscn b/DungeonShooting_Godot/resource/map/tileMaps/Room5.tscn new file mode 100644 index 0000000..65bdeb8 --- /dev/null +++ b/DungeonShooting_Godot/resource/map/tileMaps/Room5.tscn @@ -0,0 +1,11 @@ +[gd_scene load_steps=3 format=3 uid="uid://ctbfg0p66xirw"] + +[ext_resource type="TileSet" uid="uid://b00g22o1cqhe8" path="res://resource/map/tileset/TileSet1.tres" id="1_mx0vc"] +[ext_resource type="Script" path="res://src/framework/map/DungeonRoomTemplate.cs" id="dungeonRoomTemplate"] + +[node name="Room5" type="TileMap"] +tile_set = ExtResource("1_mx0vc") +format = 2 +layer_0/tile_data = PackedInt32Array(65533, 0, 8, 131069, 0, 8, 196605, 0, 8, 262141, 0, 8, 327677, 131072, 2, 65534, 0, 8, 131070, 0, 8, 196606, 0, 8, 262142, 0, 8, 327678, 196608, 2, 393214, 720896, 2, -1, 0, 8, 65535, 0, 8, 131071, 0, 8, 196607, 0, 8, 262143, 0, 8, 327679, 0, 8, 393215, 196608, 2, 458751, 196608, 3, -196608, 0, 8, -131072, 0, 8, -65536, 0, 8, 0, 0, 8, 65536, 0, 8, 131072, 0, 8, 196608, 0, 8, 262144, 0, 8, 327680, 0, 8, 393216, 0, 8, 458752, 131072, 2, -196607, 0, 8, -131071, 0, 8, -65535, 0, 8, 1, 0, 8, 65537, 65536, 2, 131073, 65536, 7, 196609, 0, 8, 262145, 0, 8, 327681, 0, 8, 393217, 0, 8, 458753, 131072, 2, -196606, 0, 8, -131070, 0, 8, -65534, 0, 8, 2, 0, 8, 65538, 196608, 2, 131074, 196608, 7, 196610, 0, 8, 262146, 0, 8, 327682, 0, 8, 393218, 0, 8, 458754, 131072, 2, -196605, 0, 8, -131069, 0, 8, -65533, 0, 8, 3, 0, 8, 65539, 0, 8, 131075, 0, 8, 196611, 0, 8, 262147, 0, 8, 327683, 0, 8, 393219, 0, 8, 458755, 131072, 2, -196604, 65536, 3, -131068, 65536, 7, -65532, 0, 8, 4, 0, 8, 65540, 0, 8, 131076, 0, 8, 196612, 0, 8, 262148, 0, 8, 327684, 65536, 2, 393220, 65536, 3, 458756, 851968, 2, -131067, 65536, 4, -65531, 65536, 7, 5, 0, 8, 65541, 0, 8, 131077, 0, 8, 196613, 0, 8, 262149, 65536, 2, 327685, 851968, 2, -65530, 131072, 7, 6, 0, 8, 65542, 0, 8, 131078, 0, 8, 196614, 0, 8, 262150, 131072, 2, 7, 65536, 3, 65543, 65536, 3, 131079, 65536, 3, 196615, 65536, 3, 262151, 851968, 2, -4, 196608, 4, 65532, 196608, 3, 131068, 196608, 3, 196604, 196608, 3, 262140, 196608, 3, 327676, 720896, 2, -3, 131072, 7, -65538, 196608, 4, -2, 196608, 7, -196609, 196608, 4, -131073, 196608, 3, -65537, 196608, 7, 524287, 720896, 2, -262144, 131072, 7, -262143, 131072, 7, -262142, 131072, 7, -262141, 131072, 7, -262140, 65536, 4, -65529, 65536, 4) +script = ExtResource("dungeonRoomTemplate") +EnableEdit = true diff --git a/DungeonShooting_Godot/resource/map/tileMaps/Room6.tscn b/DungeonShooting_Godot/resource/map/tileMaps/Room6.tscn new file mode 100644 index 0000000..0407379 --- /dev/null +++ b/DungeonShooting_Godot/resource/map/tileMaps/Room6.tscn @@ -0,0 +1,11 @@ +[gd_scene load_steps=3 format=3 uid="uid://enbdu7o247o2"] + +[ext_resource type="TileSet" uid="uid://b00g22o1cqhe8" path="res://resource/map/tileset/TileSet1.tres" id="1_0o1o2"] +[ext_resource type="Script" path="res://src/framework/map/DungeonRoomTemplate.cs" id="dungeonRoomTemplate"] + +[node name="Room6" type="TileMap"] +tile_set = ExtResource("1_0o1o2") +format = 2 +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 diff --git a/DungeonShooting_Godot/resource/map/tiledata/Room4.json b/DungeonShooting_Godot/resource/map/tiledata/Room4.json index 7d8140c..b9516e3 100644 --- a/DungeonShooting_Godot/resource/map/tiledata/Room4.json +++ b/DungeonShooting_Godot/resource/map/tiledata/Room4.json @@ -25,7 +25,7 @@ }, { "Direction": 0, - "Start": 80, + "Start": 96, "End": 288 }, { diff --git a/DungeonShooting_Godot/resource/map/tiledata/Room5.json b/DungeonShooting_Godot/resource/map/tiledata/Room5.json new file mode 100644 index 0000000..8a34298 --- /dev/null +++ b/DungeonShooting_Godot/resource/map/tiledata/Room5.json @@ -0,0 +1,140 @@ +{ + "Position": { + "X": -4, + "Y": -4 + }, + "Size": { + "X": 12, + "Y": 12 + }, + "DoorAreaInfos": [ + { + "Direction": 0, + "Start": 64, + "End": 128 + }, + { + "Direction": 3, + "Start": 64, + "End": 128 + }, + { + "Direction": 2, + "Start": 64, + "End": 128 + }, + { + "Direction": 1, + "Start": 64, + "End": 128 + } + ], + "NavigationList": [ + { + "Type": 0, + "Points": [ + { + "X": 8, + "Y": -40 + }, + { + "X": 56, + "Y": -40 + }, + { + "X": 56, + "Y": -8 + }, + { + "X": 72, + "Y": -8 + }, + { + "X": 72, + "Y": 8 + }, + { + "X": 104, + "Y": 8 + }, + { + "X": 104, + "Y": 56 + }, + { + "X": 72, + "Y": 56 + }, + { + "X": 72, + "Y": 72 + }, + { + "X": 56, + "Y": 72 + }, + { + "X": 56, + "Y": 104 + }, + { + "X": 8, + "Y": 104 + }, + { + "X": 8, + "Y": 72 + }, + { + "X": -8, + "Y": 72 + }, + { + "X": -8, + "Y": 56 + }, + { + "X": -40, + "Y": 56 + }, + { + "X": -40, + "Y": 8 + }, + { + "X": -8, + "Y": 8 + }, + { + "X": -8, + "Y": -8 + }, + { + "X": 8, + "Y": -8 + } + ] + }, + { + "Type": 1, + "Points": [ + { + "X": 8, + "Y": 8 + }, + { + "X": 56, + "Y": 8 + }, + { + "X": 56, + "Y": 56 + }, + { + "X": 8, + "Y": 56 + } + ] + } + ] +} \ No newline at end of file diff --git a/DungeonShooting_Godot/resource/map/tiledata/Room6.json b/DungeonShooting_Godot/resource/map/tiledata/Room6.json new file mode 100644 index 0000000..45502d3 --- /dev/null +++ b/DungeonShooting_Godot/resource/map/tiledata/Room6.json @@ -0,0 +1,71 @@ +{ + "Position": { + "X": -3, + "Y": -3 + }, + "Size": { + "X": 14, + "Y": 12 + }, + "DoorAreaInfos": [ + { + "Direction": 1, + "Start": 16, + "End": 112 + }, + { + "Direction": 3, + "Start": 16, + "End": 144 + }, + { + "Direction": 0, + "Start": 80, + "End": 176 + }, + { + "Direction": 2, + "Start": 112, + "End": 208 + } + ], + "NavigationList": [ + { + "Type": 0, + "Points": [ + { + "X": -24, + "Y": -24 + }, + { + "X": 88, + "Y": -24 + }, + { + "X": 88, + "Y": 40 + }, + { + "X": 152, + "Y": 40 + }, + { + "X": 152, + "Y": 120 + }, + { + "X": 72, + "Y": 120 + }, + { + "X": 72, + "Y": 56 + }, + { + "X": -24, + "Y": 56 + } + ] + } + ] +} \ No newline at end of file diff --git a/DungeonShooting_Godot/resource/theme/mainTheme.tres b/DungeonShooting_Godot/resource/theme/mainTheme.tres index 581dab1..569551f 100644 --- a/DungeonShooting_Godot/resource/theme/mainTheme.tres +++ b/DungeonShooting_Godot/resource/theme/mainTheme.tres @@ -352,7 +352,7 @@ [sub_resource type="ImageTexture" id="58"] -[sub_resource type="Image" id="Image_6layu"] +[sub_resource type="Image" id="Image_gh73t"] 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 @@ } [sub_resource type="ImageTexture" id="60"] -image = SubResource("Image_6layu") +image = SubResource("Image_gh73t") [sub_resource type="StyleBoxTexture" id="61"] content_margin_left = 2.0 @@ -372,7 +372,7 @@ texture = SubResource("60") region_rect = Rect2(0, 0, 12, 12) -[sub_resource type="Image" id="Image_x1jp8"] +[sub_resource type="Image" id="Image_aw4tu"] 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 @@ } [sub_resource type="ImageTexture" id="63"] -image = SubResource("Image_x1jp8") +image = SubResource("Image_aw4tu") [sub_resource type="StyleBoxTexture" id="64"] content_margin_left = 2.0 @@ -392,7 +392,7 @@ texture = SubResource("63") region_rect = Rect2(0, 0, 12, 12) -[sub_resource type="Image" id="Image_k3p0a"] +[sub_resource type="Image" id="Image_rekcc"] 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 @@ } [sub_resource type="ImageTexture" id="66"] -image = SubResource("Image_k3p0a") +image = SubResource("Image_rekcc") [sub_resource type="StyleBoxTexture" id="67"] content_margin_left = 2.0 @@ -412,7 +412,7 @@ texture = SubResource("66") region_rect = Rect2(0, 0, 12, 12) -[sub_resource type="Image" id="Image_tuih0"] +[sub_resource type="Image" id="Image_2n3rv"] 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 @@ } [sub_resource type="ImageTexture" id="69"] -image = SubResource("Image_tuih0") +image = SubResource("Image_2n3rv") [sub_resource type="StyleBoxTexture" id="70"] content_margin_left = 0.0 @@ -446,7 +446,7 @@ content_margin_right = 4.0 content_margin_bottom = 4.0 -[sub_resource type="Image" id="Image_227kg"] +[sub_resource type="Image" id="Image_ermnm"] 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 @@ } [sub_resource type="ImageTexture" id="56"] -image = SubResource("Image_227kg") +image = SubResource("Image_ermnm") [sub_resource type="StyleBoxFlat" id="57"] content_margin_left = 6.0 diff --git a/DungeonShooting_Godot/scene/Main.tscn b/DungeonShooting_Godot/scene/Main.tscn index 5b225e8..21417bf 100644 --- a/DungeonShooting_Godot/scene/Main.tscn +++ b/DungeonShooting_Godot/scene/Main.tscn @@ -32,15 +32,9 @@ [node name="SubViewportContainer" type="SubViewportContainer" parent="ViewCanvas"] material = SubResource("2") -anchors_preset = 15 -anchor_right = 1.0 -anchor_bottom = 1.0 -offset_right = -1440.0 -offset_bottom = -810.0 -grow_horizontal = 2 -grow_vertical = 2 +offset_right = 480.0 +offset_bottom = 270.0 scale = Vector2(4, 4) -stretch = true [node name="SubViewport" type="SubViewport" parent="ViewCanvas/SubViewportContainer"] handle_input_locally = false diff --git a/DungeonShooting_Godot/src/framework/activity/ActivityObject.cs b/DungeonShooting_Godot/src/framework/activity/ActivityObject.cs index 7b63117..6434c9d 100644 --- a/DungeonShooting_Godot/src/framework/activity/ActivityObject.cs +++ b/DungeonShooting_Godot/src/framework/activity/ActivityObject.cs @@ -41,12 +41,7 @@ /// 是否调用过 Destroy() 函数 /// public bool IsDestroyed { get; private set; } - - /// - /// 是否正在投抛过程中 - /// - public bool IsThrowing => _fallData != null && !_isFallOver; - + /// /// 阴影偏移 /// @@ -83,6 +78,11 @@ } /// + /// 是否正在投抛过程中 + /// + public bool IsThrowing => _fallData != null && !_isFallOver; + + /// /// 当前物体的海拔高度, 如果大于0, 则会做自由落体运动, 也就是执行投抛代码 /// public float Altitude diff --git a/DungeonShooting_Godot/src/framework/activity/ExternalForce.cs b/DungeonShooting_Godot/src/framework/activity/ExternalForce.cs index e6b1d2f..53fe1c9 100644 --- a/DungeonShooting_Godot/src/framework/activity/ExternalForce.cs +++ b/DungeonShooting_Godot/src/framework/activity/ExternalForce.cs @@ -19,7 +19,7 @@ /// /// 阻力大小, 也就是速度每秒衰减的量 /// - public float Resistance { get; set; } = 5; + public float Resistance { get; set; } = 0; /// /// 当速度到达 0 后是否自动销毁, 默认 true diff --git a/DungeonShooting_Godot/src/framework/activity/WaitForFixedProcess.cs b/DungeonShooting_Godot/src/framework/activity/WaitForFixedProcess.cs deleted file mode 100644 index 6bcb96e..0000000 --- a/DungeonShooting_Godot/src/framework/activity/WaitForFixedProcess.cs +++ /dev/null @@ -1,19 +0,0 @@ - -/// -/// 用于协程返回, 表示当前协程等待指定帧数 -/// -public class WaitForFixedProcess -{ - private float _frames; - private float _current = 0; - - public WaitForFixedProcess(int frames) - { - _frames = frames; - } - - public bool NextStep() - { - return _current++ >= _frames; - } -} \ No newline at end of file diff --git a/DungeonShooting_Godot/src/framework/activity/WaitForSeconds.cs b/DungeonShooting_Godot/src/framework/activity/WaitForSeconds.cs deleted file mode 100644 index 3da00fc..0000000 --- a/DungeonShooting_Godot/src/framework/activity/WaitForSeconds.cs +++ /dev/null @@ -1,25 +0,0 @@ - -/// -/// 用于协程返回, 表示当前协程等待指定秒数 -/// -public class WaitForSeconds -{ - private float _timer; - private float _current = 0; - - public WaitForSeconds(float time) - { - _timer = time; - } - - public bool NextStep(float delta) - { - if (_current >= _timer) - { - return true; - } - - _current += delta; - return false; - } -} \ No newline at end of file diff --git a/DungeonShooting_Godot/src/framework/common/Utils.cs b/DungeonShooting_Godot/src/framework/common/Utils.cs index b3e2910..887510f 100644 --- a/DungeonShooting_Godot/src/framework/common/Utils.cs +++ b/DungeonShooting_Godot/src/framework/common/Utils.cs @@ -110,7 +110,7 @@ /// /// 使用定的 canvasItem 绘制导航区域, 注意, 该函数只能在 draw 函数中调用 /// - public static void DrawNavigationPolygon(CanvasItem canvasItem, NavigationPolygonData[] polygonData) + public static void DrawNavigationPolygon(CanvasItem canvasItem, NavigationPolygonData[] polygonData, int width = 1) { for (var i = 0; i < polygonData.Length; i++) { @@ -121,11 +121,11 @@ array.Add(array[0]); if (item.Type == NavigationPolygonType.In) { - canvasItem.DrawPolyline(array.ToArray(), Colors.Yellow); + canvasItem.DrawPolyline(array.ToArray(), Colors.Yellow, width); } else { - canvasItem.DrawPolyline(array.ToArray(), Colors.Red); + canvasItem.DrawPolyline(array.ToArray(), Colors.Red, width); } } } diff --git a/DungeonShooting_Godot/src/framework/coroutine/WaitForFixedProcess.cs b/DungeonShooting_Godot/src/framework/coroutine/WaitForFixedProcess.cs new file mode 100644 index 0000000..6bcb96e --- /dev/null +++ b/DungeonShooting_Godot/src/framework/coroutine/WaitForFixedProcess.cs @@ -0,0 +1,19 @@ + +/// +/// 用于协程返回, 表示当前协程等待指定帧数 +/// +public class WaitForFixedProcess +{ + private float _frames; + private float _current = 0; + + public WaitForFixedProcess(int frames) + { + _frames = frames; + } + + public bool NextStep() + { + return _current++ >= _frames; + } +} \ No newline at end of file diff --git a/DungeonShooting_Godot/src/framework/coroutine/WaitForSeconds.cs b/DungeonShooting_Godot/src/framework/coroutine/WaitForSeconds.cs new file mode 100644 index 0000000..3da00fc --- /dev/null +++ b/DungeonShooting_Godot/src/framework/coroutine/WaitForSeconds.cs @@ -0,0 +1,25 @@ + +/// +/// 用于协程返回, 表示当前协程等待指定秒数 +/// +public class WaitForSeconds +{ + private float _timer; + private float _current = 0; + + public WaitForSeconds(float time) + { + _timer = time; + } + + public bool NextStep(float delta) + { + if (_current >= _timer) + { + return true; + } + + _current += delta; + return false; + } +} \ No newline at end of file diff --git a/DungeonShooting_Godot/src/framework/generator/UiGenerator.cs b/DungeonShooting_Godot/src/framework/generator/UiGenerator.cs index 23c24a8..7f7e6fa 100644 --- a/DungeonShooting_Godot/src/framework/generator/UiGenerator.cs +++ b/DungeonShooting_Godot/src/framework/generator/UiGenerator.cs @@ -31,7 +31,7 @@ $"public partial class {uiName}Panel : {uiName}\n" + $"{{\n" + $"\n" + - $" public override void OnShowUi(params object[] args)\n" + + $" public override void OnShowUi()\n" + $" {{\n" + $" \n" + $" }}\n" + diff --git a/DungeonShooting_Godot/src/framework/map/DungeonRoomTemplate.cs b/DungeonShooting_Godot/src/framework/map/DungeonRoomTemplate.cs index 7b0b16c..df8ecb3 100644 --- a/DungeonShooting_Godot/src/framework/map/DungeonRoomTemplate.cs +++ b/DungeonShooting_Godot/src/framework/map/DungeonRoomTemplate.cs @@ -30,8 +30,7 @@ //选中左/右点 private byte _activePointType = 0; private DoorAreaInfo _activeArea = null; - - + //拖拽 private bool _isDrag = false; private float _startDragValue; @@ -44,15 +43,179 @@ private List _doorConfigs; private Rect2 _prevRect; - //是否能保存 - private bool _canSave = false; + //是否能是否按下 private bool _clickSave = false; private DungeonTile _dungeonTile; + private TileDrawHandler _tileDrawHandler; //计算导航的计时器 private float _calcTileNavTimer = 0; + private partial class TileDrawHandler : Node2D + { + public DungeonRoomTemplate RoomTemplate; + + public override void _Draw() + { + if (!Engine.IsEditorHint() || RoomTemplate == null) + { + return; + } + if (RoomTemplate.TileSet != null) + { + //绘制地图轮廓 + var mapRange = CalcTileRange(RoomTemplate); + mapRange.Position -= new Vector2(2, 2); + mapRange.Size += new Vector2(4, 4); + DrawRect(mapRange, RoomTemplate._hover ? Colors.Green : new Color(0.03137255F, 0.59607846F, 0.03137255F), false, 2); + + //绘制悬停 + if (RoomTemplate._hover && !RoomTemplate._isDrag) + { + if (!RoomTemplate._hasActivePoint) //这里判断是否悬停在拖动点上 + { + var color = RoomTemplate._canPut ? new Color(0, 1, 0, 0.2f) : new Color(1, 0, 0, 0.2f); + switch (RoomTemplate._hoverDirection) + { + case DoorDirection.E: + DrawRect( + new Rect2(new Vector2(RoomTemplate._hoverPoint1.X + 2, RoomTemplate._hoverPoint1.Y), 30, + RoomTemplate._hoverPoint2.Y - RoomTemplate._hoverPoint1.Y), color); + DrawCircle(new Vector2(RoomTemplate._hoverPoint1.X + 2, RoomTemplate._hoverPoint1.Y), 5, color); + DrawCircle(new Vector2(RoomTemplate._hoverPoint2.X + 2, RoomTemplate._hoverPoint2.Y), 5, color); + break; + case DoorDirection.W: + DrawRect( + new Rect2(new Vector2(RoomTemplate._hoverPoint1.X - 2 - 30, RoomTemplate._hoverPoint1.Y), 30, + RoomTemplate._hoverPoint2.Y - RoomTemplate._hoverPoint1.Y), color); + DrawCircle(new Vector2(RoomTemplate._hoverPoint1.X - 2, RoomTemplate._hoverPoint1.Y), 5, color); + DrawCircle(new Vector2(RoomTemplate._hoverPoint2.X - 2, RoomTemplate._hoverPoint2.Y), 5, color); + break; + case DoorDirection.S: + DrawRect( + new Rect2(new Vector2(RoomTemplate._hoverPoint1.X, RoomTemplate._hoverPoint1.Y + 2), + RoomTemplate._hoverPoint2.X - RoomTemplate._hoverPoint1.X, 30), color); + DrawCircle(new Vector2(RoomTemplate._hoverPoint1.X, RoomTemplate._hoverPoint1.Y + 2), 5, color); + DrawCircle(new Vector2(RoomTemplate._hoverPoint2.X, RoomTemplate._hoverPoint2.Y + 2), 5, color); + break; + case DoorDirection.N: + DrawRect( + new Rect2(new Vector2(RoomTemplate._hoverPoint1.X, RoomTemplate._hoverPoint1.Y - 30 - 2), + RoomTemplate._hoverPoint2.X - RoomTemplate._hoverPoint1.X, 30), color); + DrawCircle(new Vector2(RoomTemplate._hoverPoint1.X, RoomTemplate._hoverPoint1.Y - 2), 5, color); + DrawCircle(new Vector2(RoomTemplate._hoverPoint2.X, RoomTemplate._hoverPoint2.Y - 2), 5, color); + break; + } + } + } + + //绘制区域 + if (RoomTemplate._doorConfigs != null) + { + var color2 = new Color(0, 1, 0, 0.8f); + //绘制已经存在的 + foreach (var doorAreaInfo in RoomTemplate._doorConfigs) + { + var flag = RoomTemplate._hasActivePoint && RoomTemplate._activeArea == doorAreaInfo; + var color3 = (flag && RoomTemplate._activePointType == 0) + ? (RoomTemplate._isDrag + ? (RoomTemplate._dragHasCollision + ? new Color(1, 0, 0, 0.8f) + : new Color(0.2F, 0.4117647F, 0.8392157F, 0.8f)) + : new Color(1, 1, 1, 0.8f)) + : color2; + var color4 = (flag && RoomTemplate._activePointType == 1) + ? (RoomTemplate._isDrag + ? (RoomTemplate._dragHasCollision + ? new Color(1, 0, 0, 0.8f) + : new Color(0.2F, 0.4117647F, 0.8392157F, 0.8f)) + : new Color(1, 1, 1, 0.8f)) + : color2; + switch (doorAreaInfo.Direction) + { + case DoorDirection.E: + DrawRect( + new Rect2( + new Vector2(mapRange.Position.X + mapRange.Size.X, + mapRange.Position.Y + doorAreaInfo.Start + 2), 30, + doorAreaInfo.End - doorAreaInfo.Start), color2); + DrawCircle( + new Vector2(mapRange.Position.X + mapRange.Size.X, + mapRange.Position.Y + doorAreaInfo.Start + 2), 5, color3); + DrawCircle( + new Vector2(mapRange.Position.X + mapRange.Size.X, + mapRange.Position.Y + doorAreaInfo.End + 2), + 5, color4); + break; + case DoorDirection.W: + DrawRect( + new Rect2( + new Vector2(mapRange.Position.X - 30, mapRange.Position.Y + doorAreaInfo.Start + 2), + 30, doorAreaInfo.End - doorAreaInfo.Start), color2); + DrawCircle(new Vector2(mapRange.Position.X, mapRange.Position.Y + doorAreaInfo.Start + 2), + 5, + color3); + DrawCircle(new Vector2(mapRange.Position.X, mapRange.Position.Y + doorAreaInfo.End + 2), 5, + color4); + break; + case DoorDirection.S: + DrawRect( + new Rect2( + new Vector2(mapRange.Position.X + doorAreaInfo.Start + 2, + mapRange.Position.Y + mapRange.Size.Y), doorAreaInfo.End - doorAreaInfo.Start, + 30), + color2); + DrawCircle( + new Vector2(mapRange.Position.X + doorAreaInfo.Start + 2, + mapRange.Position.Y + mapRange.Size.Y), 5, color3); + DrawCircle( + new Vector2(mapRange.Position.X + doorAreaInfo.End + 2, + mapRange.Position.Y + mapRange.Size.Y), + 5, color4); + break; + case DoorDirection.N: + DrawRect( + new Rect2( + new Vector2(mapRange.Position.X + doorAreaInfo.Start + 2, mapRange.Position.Y - 30), + doorAreaInfo.End - doorAreaInfo.Start, 30), color2); + DrawCircle(new Vector2(mapRange.Position.X + doorAreaInfo.Start + 2, mapRange.Position.Y), + 5, + color3); + DrawCircle(new Vector2(mapRange.Position.X + doorAreaInfo.End + 2, mapRange.Position.Y), 5, + color4); + break; + } + } + } + + //绘制导航, 现在有点问题, 绘制的内容会被自身的 tile 所挡住 + if (RoomTemplate._dungeonTile != null) + { + var result = RoomTemplate._dungeonTile.GetGenerateNavigationResult(); + if (result != null) + { + if (result.Success) + { + var polygonData = RoomTemplate._dungeonTile.GetPolygonData(); + Utils.DrawNavigationPolygon(this, polygonData, 2); + } + else + { + var color = new Color(1, 0, 0, 0.5f); + var tileCellSize = GameConfig.TileCellSize; + var point = (result.Exception.Point + new Vector2(0.5f, 0.5f)) * tileCellSize; + DrawCircle(point, 4, color); + DrawLine(point + new Vector2(-tileCellSize / 2f, -tileCellSize / 2f), point + new Vector2(tileCellSize / 2f, tileCellSize / 2f), color, 2); + DrawLine(point + new Vector2(-tileCellSize / 2f, tileCellSize / 2f), point + new Vector2(tileCellSize / 2f, -tileCellSize / 2f), color, 2); + } + } + } + } + } + + } + public override void _Ready() { if (!Engine.IsEditorHint()) @@ -85,6 +248,23 @@ Connect("changed", callable); } } + + if (_tileDrawHandler == null) + { + _tileDrawHandler = GetNodeOrNull("TileDrawHandler"); + if (_tileDrawHandler == null) + { + _tileDrawHandler = new TileDrawHandler(); + _tileDrawHandler.RoomTemplate = this; + _tileDrawHandler.Name = "TileDrawHandler"; + _tileDrawHandler.ZIndex = 100; + AddChild(_tileDrawHandler); + } + else + { + _tileDrawHandler.RoomTemplate = this; + } + } //导航计算 if (_calcTileNavTimer > 0) @@ -351,7 +531,7 @@ } } - OnDoorAreaChange(); + //OnDoorAreaChange(); } _dragHasCollision = false; @@ -362,7 +542,7 @@ ClearState(); } - QueueRedraw(); + _tileDrawHandler.QueueRedraw(); } else { @@ -372,172 +552,24 @@ //按下 ctrl + s 保存 if (Input.IsKeyPressed(Key.Ctrl) && Input.IsKeyPressed(Key.S)) { - _clickSave = true; - if (_canSave) + if (!_clickSave) { - _canSave = false; TriggerSave(); } + _clickSave = true; + + // if (_canSave) + // { + // _canSave = false; + // TriggerSave(); + // } } else { _clickSave = false; } } - - public override void _Draw() - { - if (!Engine.IsEditorHint()) - { - return; - } - if (TileSet != null) - { - //绘制地图轮廓 - var mapRange = CalcTileRange(this); - mapRange.Position -= new Vector2(2, 2); - mapRange.Size += new Vector2(4, 4); - DrawRect(mapRange, _hover ? Colors.Green : new Color(0.03137255F, 0.59607846F, 0.03137255F), false, 2); - - //绘制悬停 - if (_hover && !_isDrag) - { - if (!_hasActivePoint) //这里判断是否悬停在拖动点上 - { - var color = _canPut ? new Color(0, 1, 0, 0.2f) : new Color(1, 0, 0, 0.2f); - switch (_hoverDirection) - { - case DoorDirection.E: - DrawRect( - new Rect2(new Vector2(_hoverPoint1.X + 2, _hoverPoint1.Y), 30, - _hoverPoint2.Y - _hoverPoint1.Y), color); - DrawCircle(new Vector2(_hoverPoint1.X + 2, _hoverPoint1.Y), 5, color); - DrawCircle(new Vector2(_hoverPoint2.X + 2, _hoverPoint2.Y), 5, color); - break; - case DoorDirection.W: - DrawRect( - new Rect2(new Vector2(_hoverPoint1.X - 2 - 30, _hoverPoint1.Y), 30, - _hoverPoint2.Y - _hoverPoint1.Y), color); - DrawCircle(new Vector2(_hoverPoint1.X - 2, _hoverPoint1.Y), 5, color); - DrawCircle(new Vector2(_hoverPoint2.X - 2, _hoverPoint2.Y), 5, color); - break; - case DoorDirection.S: - DrawRect( - new Rect2(new Vector2(_hoverPoint1.X, _hoverPoint1.Y + 2), - _hoverPoint2.X - _hoverPoint1.X, 30), color); - DrawCircle(new Vector2(_hoverPoint1.X, _hoverPoint1.Y + 2), 5, color); - DrawCircle(new Vector2(_hoverPoint2.X, _hoverPoint2.Y + 2), 5, color); - break; - case DoorDirection.N: - DrawRect( - new Rect2(new Vector2(_hoverPoint1.X, _hoverPoint1.Y - 30 - 2), - _hoverPoint2.X - _hoverPoint1.X, 30), color); - DrawCircle(new Vector2(_hoverPoint1.X, _hoverPoint1.Y - 2), 5, color); - DrawCircle(new Vector2(_hoverPoint2.X, _hoverPoint2.Y - 2), 5, color); - break; - } - } - } - - //绘制区域 - if (_doorConfigs != null) - { - var color2 = new Color(0, 1, 0, 0.8f); - //绘制已经存在的 - foreach (var doorAreaInfo in _doorConfigs) - { - var flag = _hasActivePoint && _activeArea == doorAreaInfo; - var color3 = (flag && _activePointType == 0) - ? (_isDrag - ? (_dragHasCollision - ? new Color(1, 0, 0, 0.8f) - : new Color(0.2F, 0.4117647F, 0.8392157F, 0.8f)) - : new Color(1, 1, 1, 0.8f)) - : color2; - var color4 = (flag && _activePointType == 1) - ? (_isDrag - ? (_dragHasCollision - ? new Color(1, 0, 0, 0.8f) - : new Color(0.2F, 0.4117647F, 0.8392157F, 0.8f)) - : new Color(1, 1, 1, 0.8f)) - : color2; - switch (doorAreaInfo.Direction) - { - case DoorDirection.E: - DrawRect( - new Rect2( - new Vector2(mapRange.Position.X + mapRange.Size.X, - mapRange.Position.Y + doorAreaInfo.Start + 2), 30, - doorAreaInfo.End - doorAreaInfo.Start), color2); - DrawCircle( - new Vector2(mapRange.Position.X + mapRange.Size.X, - mapRange.Position.Y + doorAreaInfo.Start + 2), 5, color3); - DrawCircle( - new Vector2(mapRange.Position.X + mapRange.Size.X, - mapRange.Position.Y + doorAreaInfo.End + 2), - 5, color4); - break; - case DoorDirection.W: - DrawRect( - new Rect2( - new Vector2(mapRange.Position.X - 30, mapRange.Position.Y + doorAreaInfo.Start + 2), - 30, doorAreaInfo.End - doorAreaInfo.Start), color2); - DrawCircle(new Vector2(mapRange.Position.X, mapRange.Position.Y + doorAreaInfo.Start + 2), - 5, - color3); - DrawCircle(new Vector2(mapRange.Position.X, mapRange.Position.Y + doorAreaInfo.End + 2), 5, - color4); - break; - case DoorDirection.S: - DrawRect( - new Rect2( - new Vector2(mapRange.Position.X + doorAreaInfo.Start + 2, - mapRange.Position.Y + mapRange.Size.Y), doorAreaInfo.End - doorAreaInfo.Start, - 30), - color2); - DrawCircle( - new Vector2(mapRange.Position.X + doorAreaInfo.Start + 2, - mapRange.Position.Y + mapRange.Size.Y), 5, color3); - DrawCircle( - new Vector2(mapRange.Position.X + doorAreaInfo.End + 2, - mapRange.Position.Y + mapRange.Size.Y), - 5, color4); - break; - case DoorDirection.N: - DrawRect( - new Rect2( - new Vector2(mapRange.Position.X + doorAreaInfo.Start + 2, mapRange.Position.Y - 30), - doorAreaInfo.End - doorAreaInfo.Start, 30), color2); - DrawCircle(new Vector2(mapRange.Position.X + doorAreaInfo.Start + 2, mapRange.Position.Y), - 5, - color3); - DrawCircle(new Vector2(mapRange.Position.X + doorAreaInfo.End + 2, mapRange.Position.Y), 5, - color4); - break; - } - } - } - - //绘制导航, 现在有点问题, 绘制的内容会被自身的 tile 所挡住 - if (_dungeonTile != null) - { - var result = _dungeonTile.GetGenerateNavigationResult(); - if (result != null) - { - if (result.Success) - { - var polygonData = _dungeonTile.GetPolygonData(); - Utils.DrawNavigationPolygon(this, polygonData); - } - else - { - DrawCircle(result.Exception.Point * GameConfig.TileCellSize, 10, Colors.Red); - } - } - } - } - } - + private void ClearState() { _hover = false; @@ -573,14 +605,14 @@ } _doorConfigs.Add(doorAreaInfo); - OnDoorAreaChange(); + //OnDoorAreaChange(); } //移除门 private void RemoveDoorArea(DoorAreaInfo doorAreaInfo) { _doorConfigs.Remove(doorAreaInfo); - OnDoorAreaChange(); + //OnDoorAreaChange(); } //检查门是否有碰撞 @@ -713,14 +745,14 @@ _canPut = false; _hasActivePoint = false; _activeArea = null; - OnDoorAreaChange(); + //OnDoorAreaChange(); } - //区域数据修改 - private void OnDoorAreaChange() - { - _canSave = true; - } + // //区域数据修改 + // private void OnDoorAreaChange() + // { + // _canSave = true; + // } //触发保存操作 private void TriggerSave() diff --git a/DungeonShooting_Godot/src/framework/map/DungeonTile.cs b/DungeonShooting_Godot/src/framework/map/DungeonTile.cs index fe022e8..0ec5459 100644 --- a/DungeonShooting_Godot/src/framework/map/DungeonTile.cs +++ b/DungeonShooting_Godot/src/framework/map/DungeonTile.cs @@ -843,7 +843,7 @@ break; } - return null; + throw new NavigationPointInterleavingException(new Vector2(tempI, tempJ), "生成导航多边形发生错误! 点: " + new Vector2(tempI, tempJ) + "发生交错!"); } case 1: //下 { @@ -897,7 +897,7 @@ break; } - return null; + throw new NavigationPointInterleavingException(new Vector2(tempI, tempJ), "生成导航多边形发生错误! 点: " + new Vector2(tempI, tempJ) + "发生交错!"); } case 2: //左 { @@ -951,7 +951,7 @@ break; } - return null; + throw new NavigationPointInterleavingException(new Vector2(tempI, tempJ), "生成导航多边形发生错误! 点: " + new Vector2(tempI, tempJ) + "发生交错!"); } case 3: //上 { @@ -1005,7 +1005,7 @@ break; } - return null; + throw new NavigationPointInterleavingException(new Vector2(tempI, tempJ), "生成导航多边形发生错误! 点: " + new Vector2(tempI, tempJ) + "发生交错!"); } } } @@ -1082,7 +1082,7 @@ break; } - return null; + throw new NavigationPointInterleavingException(new Vector2(tempI, tempJ), "生成导航多边形发生错误! 点: " + new Vector2(tempI, tempJ) + "发生交错!"); } case 1: //下 { @@ -1136,7 +1136,7 @@ break; } - return null; + throw new NavigationPointInterleavingException(new Vector2(tempI, tempJ), "生成导航多边形发生错误! 点: " + new Vector2(tempI, tempJ) + "发生交错!"); } case 2: //左 { @@ -1190,7 +1190,7 @@ break; } - return null; + throw new NavigationPointInterleavingException(new Vector2(tempI, tempJ), "生成导航多边形发生错误! 点: " + new Vector2(tempI, tempJ) + "发生交错!"); } case 3: //上 { @@ -1244,7 +1244,7 @@ break; } - return null; + throw new NavigationPointInterleavingException(new Vector2(tempI, tempJ), "生成导航多边形发生错误! 点: " + new Vector2(tempI, tempJ) + "发生交错!"); } } } diff --git a/DungeonShooting_Godot/src/framework/map/mark/ActivityMark.cs b/DungeonShooting_Godot/src/framework/map/mark/ActivityMark.cs index 431a890..e1e170a 100644 --- a/DungeonShooting_Godot/src/framework/map/mark/ActivityMark.cs +++ b/DungeonShooting_Godot/src/framework/map/mark/ActivityMark.cs @@ -119,6 +119,7 @@ instance.PutDown(GlobalPosition, Layer); } +#if TOOLS public override void _Draw() { if (Engine.IsEditorHint() || GameApplication.Instance.Debug) @@ -127,6 +128,7 @@ DrawLine(new Vector2(-5, 5), new Vector2(5, -5), DrawColor, 2f); } } +#endif /// /// 设置当前节点是否是活动状态 diff --git a/DungeonShooting_Godot/src/framework/ui/IUiNode.cs b/DungeonShooting_Godot/src/framework/ui/IUiNode.cs index 2d7ce1c..bf384b7 100644 --- a/DungeonShooting_Godot/src/framework/ui/IUiNode.cs +++ b/DungeonShooting_Godot/src/framework/ui/IUiNode.cs @@ -26,14 +26,14 @@ /// /// 嵌套打开子ui /// - public UiBase OpenNestedUi(string uiName, params object[] args) + public UiBase OpenNestedUi(string uiName) { var packedScene = ResourceManager.Load("res://" + GameConfig.UiPrefabDir + uiName + ".tscn"); var uiBase = packedScene.Instantiate(); Instance.AddChild(uiBase); uiBase.OnCreateUi(); - uiBase.ShowUi(args); + uiBase.ShowUi(); return uiBase; } diff --git a/DungeonShooting_Godot/src/framework/ui/UiBase.cs b/DungeonShooting_Godot/src/framework/ui/UiBase.cs index de19aca..e67b7da 100644 --- a/DungeonShooting_Godot/src/framework/ui/UiBase.cs +++ b/DungeonShooting_Godot/src/framework/ui/UiBase.cs @@ -15,7 +15,7 @@ public UiLayer Layer = UiLayer.Middle; /// - /// Ui 模式 + /// Ui 模式, 单例/正常模式 /// [Export] public UiMode Mode = UiMode.Normal; @@ -59,9 +59,9 @@ } /// - /// 当前ui显示时调用,并接收参数 + /// 当前ui显示时调用 /// - public abstract void OnShowUi(params object[] args); + public abstract void OnShowUi(); /// /// 当前ui隐藏时调用 @@ -83,9 +83,9 @@ } /// - /// 显示ui, 并传入参数 + /// 显示ui /// - public void ShowUi(params object[] args) + public void ShowUi() { if (IsOpen) { @@ -94,11 +94,11 @@ IsOpen = true; Visible = true; - OnShowUi(args); + OnShowUi(); } /// - /// 隐藏ui + /// 隐藏ui, 不会执行销毁 /// public void HideUi() { diff --git a/DungeonShooting_Godot/src/framework/ui/UiManager.cs b/DungeonShooting_Godot/src/framework/ui/UiManager.cs index c3b86f1..ee32c42 100644 --- a/DungeonShooting_Godot/src/framework/ui/UiManager.cs +++ b/DungeonShooting_Godot/src/framework/ui/UiManager.cs @@ -111,23 +111,23 @@ /// /// 根据Ui资源路径打开Ui, 并返回Ui实例, 该Ui资源的场景根节点必须继承 /// - public static UiBase OpenUi(string uiName, params object[] args) + public static UiBase OpenUi(string uiName) { var packedScene = ResourceManager.Load("res://" + GameConfig.UiPrefabDir + uiName + ".tscn"); var uiBase = packedScene.Instantiate(); var canvasLayer = GetUiLayer(uiBase.Layer); canvasLayer.AddChild(uiBase); uiBase.OnCreateUi(); - uiBase.ShowUi(args); + uiBase.ShowUi(); return uiBase; } /// /// 根据Ui资源路径打开Ui, 并返回Ui实例, 该Ui资源的场景根节点必须继承 /// - public static T OpenUi(string uiName, params object[] args) where T : UiBase + public static T OpenUi(string uiName) where T : UiBase { - return (T)OpenUi(uiName, args); + return (T)OpenUi(uiName); } /// diff --git a/DungeonShooting_Godot/src/game/GameApplication.cs b/DungeonShooting_Godot/src/game/GameApplication.cs index 393a861..3fc4d09 100644 --- a/DungeonShooting_Godot/src/game/GameApplication.cs +++ b/DungeonShooting_Godot/src/game/GameApplication.cs @@ -46,6 +46,16 @@ /// 房间配置 /// public List RoomConfig { get; private set; } + + /// + /// 游戏视图大小 + /// + public Vector2 ViewportSize { get; private set; } = new Vector2(480, 270); + + /// + /// 像素缩放 + /// + public int PixelScale { get; private set; } = 4; public GameApplication() { @@ -67,6 +77,10 @@ ActivityObject.IsDebug = Debug; //Engine.TimeScale = 0.2f; + //窗体大小改变 + GetWindow().SizeChanged += OnWindowSizeChanged; + RefreshSubViewportSize(); + //初始化ui UiManager.Init(); @@ -97,7 +111,7 @@ public Vector2 GlobalToViewPosition(Vector2 globalPos) { //return globalPos; - return globalPos / GameConfig.WindowScale - (GameConfig.ViewportSize / 2) + GameCamera.Main.GlobalPosition; + return globalPos / PixelScale - (ViewportSize / 2) + GameCamera.Main.GlobalPosition; } /// @@ -107,7 +121,7 @@ { // 3.5写法 //return (viewPos - GameCamera.Main.GlobalPosition + (GameConfig.ViewportSize / 2)) * GameConfig.WindowScale - GameCamera.Main.SubPixelPosition; - return (viewPos - (GameCamera.Main.GlobalPosition + GameCamera.Main.Offset) + (GameConfig.ViewportSize / 2)) * GameConfig.WindowScale; + return (viewPos - (GameCamera.Main.GlobalPosition + GameCamera.Main.Offset) + (ViewportSize / 2)) * PixelScale; } //初始化房间配置 @@ -119,4 +133,23 @@ RoomConfig = JsonSerializer.Deserialize>(asText); file.Dispose(); } + + //窗体大小改变 + private void OnWindowSizeChanged() + { + var size = GetWindow().Size; + ViewportSize = size / PixelScale; + RefreshSubViewportSize(); + } + + //刷新视窗大小 + private void RefreshSubViewportSize() + { + var s = new Vector2I((int)ViewportSize.X, (int)ViewportSize.Y); + s.X = s.X / 2 * 2; + s.Y = s.Y / 2 * 2; + SubViewport.Size = s; + SubViewportContainer.Scale = new Vector2(PixelScale, PixelScale); + SubViewportContainer.Size = s; + } } diff --git a/DungeonShooting_Godot/src/game/GameConfig.cs b/DungeonShooting_Godot/src/game/GameConfig.cs index 53f94c4..1afcb77 100644 --- a/DungeonShooting_Godot/src/game/GameConfig.cs +++ b/DungeonShooting_Godot/src/game/GameConfig.cs @@ -18,15 +18,6 @@ // ----------------------- 常量 ----------------------- /// - /// 像素缩放 - /// - public const int WindowScale = 4; - /// - /// 游戏视图大小 - /// - public static readonly Vector2 ViewportSize = new Vector2(480, 270); - //public static Vector2 ViewportSize => OS.WindowSize / WindowScale; - /// /// 连接房间的过道宽度 /// public const int CorridorWidth = 4; diff --git a/DungeonShooting_Godot/src/game/manager/ResourceManager.cs b/DungeonShooting_Godot/src/game/manager/ResourceManager.cs index 513b205..9460334 100644 --- a/DungeonShooting_Godot/src/game/manager/ResourceManager.cs +++ b/DungeonShooting_Godot/src/game/manager/ResourceManager.cs @@ -1,6 +1,9 @@ using System.Collections.Generic; using Godot; +/// +/// 资源管理器 +/// public static class ResourceManager { /// diff --git a/DungeonShooting_Godot/src/game/manager/ResourcePath.cs b/DungeonShooting_Godot/src/game/manager/ResourcePath.cs index ba1e64c..415bfb9 100644 --- a/DungeonShooting_Godot/src/game/manager/ResourcePath.cs +++ b/DungeonShooting_Godot/src/game/manager/ResourcePath.cs @@ -17,6 +17,7 @@ public const string prefab_test_MoveComponent_tscn = "res://prefab/test/MoveComponent.tscn"; public const string prefab_test_TestActivity_tscn = "res://prefab/test/TestActivity.tscn"; public const string prefab_ui_EditorTools_tscn = "res://prefab/ui/EditorTools.tscn"; + public const string prefab_ui_MyUi_tscn = "res://prefab/ui/MyUi.tscn"; public const string prefab_ui_RoomUI_tscn = "res://prefab/ui/RoomUI.tscn"; public const string prefab_weapon_Knife_tscn = "res://prefab/weapon/Knife.tscn"; public const string prefab_weapon_Weapon_tscn = "res://prefab/weapon/Weapon.tscn"; @@ -37,9 +38,15 @@ public const string resource_map_tiledata_Room1_json = "res://resource/map/tiledata/Room1.json"; public const string resource_map_tiledata_Room2_json = "res://resource/map/tiledata/Room2.json"; public const string resource_map_tiledata_Room3_json = "res://resource/map/tiledata/Room3.json"; + public const string resource_map_tiledata_Room4_json = "res://resource/map/tiledata/Room4.json"; + public const string resource_map_tiledata_Room5_json = "res://resource/map/tiledata/Room5.json"; + public const string resource_map_tiledata_Room6_json = "res://resource/map/tiledata/Room6.json"; public const string resource_map_tileMaps_Room1_tscn = "res://resource/map/tileMaps/Room1.tscn"; public const string resource_map_tileMaps_Room2_tscn = "res://resource/map/tileMaps/Room2.tscn"; public const string resource_map_tileMaps_Room3_tscn = "res://resource/map/tileMaps/Room3.tscn"; + public const string resource_map_tileMaps_Room4_tscn = "res://resource/map/tileMaps/Room4.tscn"; + public const string resource_map_tileMaps_Room5_tscn = "res://resource/map/tileMaps/Room5.tscn"; + public const string resource_map_tileMaps_Room6_tscn = "res://resource/map/tileMaps/Room6.tscn"; public const string resource_map_tileset_TileSet1_tres = "res://resource/map/tileset/TileSet1.tres"; public const string resource_materlal_Blend_gdshader = "res://resource/materlal/Blend.gdshader"; public const string resource_materlal_Blend_tres = "res://resource/materlal/Blend.tres"; diff --git a/DungeonShooting_Godot/src/game/manager/UiManager_Methods.cs b/DungeonShooting_Godot/src/game/manager/UiManager_Methods.cs index 91aaa92..f6fa6c3 100644 --- a/DungeonShooting_Godot/src/game/manager/UiManager_Methods.cs +++ b/DungeonShooting_Godot/src/game/manager/UiManager_Methods.cs @@ -7,6 +7,7 @@ public static class UiName { public const string EditorTools = "EditorTools"; + public const string MyUi = "MyUi"; public const string RoomUI = "RoomUI"; } @@ -27,6 +28,22 @@ } /// + /// 打开 MyUi, 并返回UI实例 + /// + public static UI.MyUi.MyUiPanel Open_MyUi() + { + return OpenUi(UiName.MyUi); + } + + /// + /// 获取所有 MyUi 的实例, 如果没有实例, 则返回一个空数组 + /// + public static UI.MyUi.MyUiPanel[] Get_MyUi_Instance() + { + return GetUiInstance(nameof(UI.MyUi.MyUi)); + } + + /// /// 打开 RoomUI, 并返回UI实例 /// public static UI.RoomUI.RoomUIPanel Open_RoomUI() diff --git a/DungeonShooting_Godot/src/game/ui/editorTools/EditorToolsPanel.cs b/DungeonShooting_Godot/src/game/ui/editorTools/EditorToolsPanel.cs index 9d69408..8cc8c54 100644 --- a/DungeonShooting_Godot/src/game/ui/editorTools/EditorToolsPanel.cs +++ b/DungeonShooting_Godot/src/game/ui/editorTools/EditorToolsPanel.cs @@ -15,7 +15,7 @@ //询问窗口关闭 private Action _onConfirmClose; - public override void OnShowUi(params object[] args) + public override void OnShowUi() { //tips _onTipsClose = null; diff --git a/DungeonShooting_Godot/src/game/ui/myUi/MyUi.cs b/DungeonShooting_Godot/src/game/ui/myUi/MyUi.cs new file mode 100644 index 0000000..65f9437 --- /dev/null +++ b/DungeonShooting_Godot/src/game/ui/myUi/MyUi.cs @@ -0,0 +1,79 @@ +namespace UI.MyUi; + +/// +/// Ui代码, 该类是根据ui场景自动生成的, 请不要手动编辑该类, 以免造成代码丢失 +/// +public abstract partial class MyUi : UiBase +{ + /// + /// 使用 Instance 属性获取当前节点实例对象, 节点类型: , 节点路径: MyUi.Button + /// + public UiNode_Button L_Button + { + get + { + if (_L_Button == null) _L_Button = new UiNode_Button(GetNodeOrNull("Button")); + return _L_Button; + } + } + private UiNode_Button _L_Button; + + /// + /// 使用 Instance 属性获取当前节点实例对象, 节点类型: , 节点路径: MyUi.Control + /// + public UiNode_Control L_Control + { + get + { + if (_L_Control == null) _L_Control = new UiNode_Control(GetNodeOrNull("Control")); + return _L_Control; + } + } + private UiNode_Control _L_Control; + + + public MyUi() : base(nameof(MyUi)) + { + } + + /// + /// 类型: , 路径: MyUi.Button + /// + public class UiNode_Button : IUiNode + { + public UiNode_Button(Godot.Button node) : base(node) { } + public override UiNode_Button Clone() => new ((Godot.Button)Instance.Duplicate()); + } + + /// + /// 类型: , 路径: MyUi.Control.Label + /// + public class UiNode_Label : IUiNode + { + public UiNode_Label(Godot.Label node) : base(node) { } + public override UiNode_Label Clone() => new ((Godot.Label)Instance.Duplicate()); + } + + /// + /// 类型: , 路径: MyUi.Control + /// + public class UiNode_Control : IUiNode + { + /// + /// 使用 Instance 属性获取当前节点实例对象, 节点类型: , 节点路径: MyUi.Label + /// + public UiNode_Label L_Label + { + get + { + if (_L_Label == null) _L_Label = new UiNode_Label(Instance.GetNodeOrNull("Label")); + return _L_Label; + } + } + private UiNode_Label _L_Label; + + public UiNode_Control(Godot.Control node) : base(node) { } + public override UiNode_Control Clone() => new ((Godot.Control)Instance.Duplicate()); + } + +} diff --git a/DungeonShooting_Godot/src/game/ui/myUi/MyUiPanel.cs b/DungeonShooting_Godot/src/game/ui/myUi/MyUiPanel.cs new file mode 100644 index 0000000..f6d0a04 --- /dev/null +++ b/DungeonShooting_Godot/src/game/ui/myUi/MyUiPanel.cs @@ -0,0 +1,22 @@ +using Godot; + +namespace UI.MyUi; + +public partial class MyUiPanel : MyUi +{ + + public override void OnShowUi() + { + L_Control.L_Label.Instance.Text = "文本"; + L_Button.Instance.Pressed += () => + { + + }; + } + + public override void OnHideUi() + { + + } + +} diff --git a/DungeonShooting_Godot/src/game/ui/roomUI/RoomUIPanel.cs b/DungeonShooting_Godot/src/game/ui/roomUI/RoomUIPanel.cs index e1dba97..cbf1e66 100644 --- a/DungeonShooting_Godot/src/game/ui/roomUI/RoomUIPanel.cs +++ b/DungeonShooting_Godot/src/game/ui/roomUI/RoomUIPanel.cs @@ -22,7 +22,7 @@ _gunBar = new GunBar(L_Control.L_GunBar); } - public override void OnShowUi(params object[] args) + public override void OnShowUi() { _reloadBar.OnShow(); _interactiveTipBar.OnShow(); diff --git a/README.md b/README.md index f7365b1..dbe7f3c 100644 --- a/README.md +++ b/README.md @@ -1,12 +1,12 @@ -一款由Godot开发的地牢射击类型的游戏, 脚本语言使用的是C#, 当前项目使用的Godot版本: Godot_v4.0.1.rc1 +一款由Godot开发的地牢射击类型的游戏, 脚本语言使用的是C#, 当前项目使用的Godot版本: Godot_v4.0.1 --- ### 游戏定义 **游戏名称:** 待定 **美术风格:** 2D像素(完美像素) -**游戏类型:** Roguelite, 俯视角, 地牢射击 +**游戏类型:** Roguelite, 俯视角, 地牢探索, 双摇杆射击 **参考游戏:** 挺进地牢, 元气骑士, 废土之王 **核心简介:** 游戏整体流程由数层地牢组成, 每层又由数个房间组成, 每个房间有一堵门隔开, 玩家每进入一个房间, 需要清理房间内所有的敌人, 方可离开和进入下一个房间, 玩家需要在这些房间中探索, 战斗, 收集掉落的道具和被动, 一步步成长, 击败boss, 进入下一层, 如此往复, 直到击败最后一层boss即可通关. @@ -16,7 +16,7 @@ --- ### 启动项目 -项目的目录结构如下 +git仓库的目录结构如下 > ├ DungeonShooting_Art (美术资源存放目录) > ├ DungeonShooting_Document (项目帮助文档, 更新日志相关的目录) > └ DungeonShooting_Godot (Godot工程目录) @@ -25,5 +25,6 @@ --- ### 其他 -开发日志: [开发日志.md](DungeonShooting_Document/开发日志.md) -项目看板: https://trello.com/b/a8UGxnTl/dungeonshooting \ No newline at end of file +**开发日志:** [开发日志.md](DungeonShooting_Document/开发日志.md) +**项目帮助文档:** [帮助文档.md](DungeonShooting_Document/项目帮助文档.md) +**项目看板:** https://trello.com/b/a8UGxnTl/dungeonshooting \ No newline at end of file