修复了背景切换路径的Bug

This commit is contained in:
张子健
2024-02-06 23:05:16 +08:00
parent a007385a5b
commit e67f5af114
8 changed files with 25 additions and 11 deletions

View File

@@ -269,7 +269,7 @@ namespace ScenesScripts.GalPlot
case "ChangeBackImg"://更换背景图片
{
var _Path = PlotData.NowPlotDataNode.Attribute("Path").Value;
Gal_BackImg.SetImage(GameAPI.LoadTextureByIO(_Path));
Gal_BackImg.SetImage(GameAPI.LoadTextureByIO($"{GameAPI.GetWritePath()}/HGF/Texture2D/Back/{_Path}"));
Button_Click_NextPlot();
break;
}

View File

@@ -1,5 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- -->
<!--剧情数据,需要包含一个根节点-->
<data>
<!--本章剧情标题-->
@@ -20,7 +19,7 @@
<!--以下才属于正式剧情-->
<MainPlot>
<!-- 添加一个角色这个角色的ID为1 有关所有角色ID需要到相关的配置文件修改 -->
<AddCharacter CharacterID="1" From="C1" SendMessage="Outside-ToLef"></AddCharacter>
<AddCharacter CharacterID="1" From="C1" SendMessage="Outside-ToLeft"></AddCharacter>
<!--开始发言角色ID为1的角色发言你好啊 同时发送消息,我需要执行入场动画:从屏幕左侧滑进-->
<Speak CharacterID="1" Content="你好啊!!! 我是不是从左侧进入的?"></Speak>
<!--分支剧情,这句话结束后会自动弹出选项-->
@@ -30,7 +29,7 @@
<Choice JumpID="S2">选项二(直接结束游戏)</Choice>
</Speak>
<!--分支剧情结束后自动继续游戏-->
<ChangeBackImg Path="D:\UserData\图片\壁纸\5552152969857735952.png"></ChangeBackImg>
<ChangeBackImg Path="home.png"></ChangeBackImg>
<Speak CharacterID="1" Content="接下来我们继续" SendMessage="Shake-Y-Once"></Speak>
<!--AudioPath表示语音路径可以使资源文件夹的也可以是外部路径但不支持URL路径以后或许会支持-->
<Speak CharacterID="1" SendMessage="Shake" AudioPath="HYKB/1.mp3" Content="是不是为我的突然说话感到意外?"></Speak>

View File

@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 4d96535e65aae2346ad2d86a1f21c885
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 MiB

View File

@@ -0,0 +1,7 @@
fileFormatVersion: 2
guid: 983da072bae22c6409fa89dce20e5e10
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -1,8 +1,8 @@
{
"dependencies": {
"com.unity.collab-proxy": "2.2.0",
"com.unity.ide.rider": "3.0.25",
"com.unity.ide.visualstudio": "2.0.21",
"com.unity.ide.rider": "3.0.26",
"com.unity.ide.visualstudio": "2.0.22",
"com.unity.ide.vscode": "1.2.5",
"com.unity.nuget.newtonsoft-json": "3.2.1",
"com.unity.render-pipelines.universal": "12.1.13",

View File

@@ -1,7 +1,7 @@
{
"dependencies": {
"com.unity.burst": {
"version": "1.8.9",
"version": "1.8.11",
"depth": 1,
"source": "registry",
"dependencies": {
@@ -24,7 +24,7 @@
"url": "https://packages.unity.cn"
},
"com.unity.ide.rider": {
"version": "3.0.25",
"version": "3.0.26",
"depth": 0,
"source": "registry",
"dependencies": {
@@ -33,7 +33,7 @@
"url": "https://packages.unity.cn"
},
"com.unity.ide.visualstudio": {
"version": "2.0.21",
"version": "2.0.22",
"depth": 0,
"source": "registry",
"dependencies": {

View File

@@ -1,2 +1,2 @@
m_EditorVersion: 2021.3.32f1c1
m_EditorVersionWithRevision: 2021.3.32f1c1 (fa19b96eeab7)
m_EditorVersion: 2021.3.33f1c1
m_EditorVersionWithRevision: 2021.3.33f1c1 (682b9db7927c)