Merge branch 'bugfix/art-replace' into 'develop'
对话修复 See merge request aibis-dream/aibis-dream!300
This commit is contained in:
@@ -8082,7 +8082,7 @@ GameObject:
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
m_IsActive: 0
|
||||
--- !u!224 &614046222
|
||||
RectTransform:
|
||||
m_ObjectHideFlags: 0
|
||||
@@ -9436,7 +9436,7 @@ GameObject:
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
m_IsActive: 0
|
||||
--- !u!224 &731599308
|
||||
RectTransform:
|
||||
m_ObjectHideFlags: 0
|
||||
|
||||
@@ -54,7 +54,6 @@ namespace AibisDream.Kit
|
||||
{
|
||||
_ambInstance = RuntimeManager.CreateInstance(ambEvent);
|
||||
_ambInstance.start();
|
||||
_ambInstance.set3DAttributes(transform.position.To3DAttributes());
|
||||
}
|
||||
|
||||
public void ChangeAmb(AmbState state)
|
||||
@@ -135,11 +134,11 @@ namespace AibisDream.Kit
|
||||
_voiceInstance.release();
|
||||
}
|
||||
|
||||
if (string.IsNullOrEmpty(dialogText.actor.voicePath) || FModEx.IsEventExist(dialogText.actor.VoicePath))
|
||||
if (string.IsNullOrEmpty(dialogText.actor.voicePath) || !FModEx.IsEventExist(dialogText.actor.VoicePath))
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
_voiceInstance = RuntimeManager.CreateInstance(dialogText.actor.VoicePath);
|
||||
_voiceInstance.start();
|
||||
}
|
||||
|
||||
@@ -59,10 +59,18 @@ namespace AibisDream.Framework
|
||||
// 再新建
|
||||
InstantiateGroup();
|
||||
// 把PSD名字填进去
|
||||
config = new SpriteGroupConfig
|
||||
// 加载配置文件,没有就空着
|
||||
if (ConfigUtil.Instance.TryGetSpriteConfig(config.key, out var oldConfig))
|
||||
{
|
||||
key = spriteGroup.name
|
||||
};
|
||||
config = oldConfig;
|
||||
}
|
||||
else
|
||||
{
|
||||
config = new SpriteGroupConfig()
|
||||
{
|
||||
key = spriteGroup.name
|
||||
};
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
@@ -16,11 +16,10 @@ namespace AibisDream
|
||||
{
|
||||
#region 运行模式相关
|
||||
|
||||
[Header("可用so合集")]
|
||||
public TalkSceneSO[] totalSceneSos;
|
||||
[Header("可用so合集")] public TalkSceneSO[] totalSceneSos;
|
||||
|
||||
public RunMode runMode;
|
||||
|
||||
|
||||
[Header("生产环境数据(一般不动)")] public TalkSceneSO firstTalkSo;
|
||||
[Header("单场景测试")] public TalkSceneSO testTalkSo;
|
||||
[Header("存档测试")] public string saveFileName;
|
||||
@@ -28,13 +27,13 @@ namespace AibisDream
|
||||
#endregion
|
||||
|
||||
private TalkSceneSO _currentTalkSceneSo;
|
||||
|
||||
|
||||
public void Start()
|
||||
{
|
||||
|
||||
#if UNITY_EDITOR
|
||||
if (runMode == RunMode.SingleScene)
|
||||
{
|
||||
MainUIController.Instance.TVFadeOut(1);
|
||||
StartMenu.Instance.HideStartMenu();
|
||||
StartSingleSceneTest();
|
||||
}
|
||||
@@ -44,16 +43,27 @@ namespace AibisDream
|
||||
StartMenu.Instance.HideStartMenu();
|
||||
StartCoroutine(LoadSaveFile($"{TestSaveFilePath}/{saveFileName}"));
|
||||
}
|
||||
else
|
||||
{
|
||||
StartCoroutine(LoadClinicOut());
|
||||
}
|
||||
#else
|
||||
StartCoroutine(LoadClinicScene())
|
||||
runMode = RunMode.Product;
|
||||
#endif
|
||||
}
|
||||
|
||||
private IEnumerator LoadClinicOut()
|
||||
{
|
||||
yield return SceneLoader.Instance.LoadSceneAsync("ClinicOut");
|
||||
FindObjectOfType<EnvironmentManager>().SetTimeOfDayCommand("day");
|
||||
yield return FindObjectOfType<ActorManager>().FadeInActorByName("医生", 0.1f);
|
||||
}
|
||||
|
||||
public void StartWithTalkSceneSO(TalkSceneSO sceneSO)
|
||||
{
|
||||
_currentTalkSceneSo = sceneSO;
|
||||
StartCoroutine(LoadScene());
|
||||
|
||||
|
||||
}
|
||||
|
||||
public void StartNewGame()
|
||||
@@ -74,13 +84,12 @@ namespace AibisDream
|
||||
StartMenu.Instance.HideStartMenu();
|
||||
DialogController.Instance.StartDialog(_currentTalkSceneSo.yarnProject);
|
||||
}
|
||||
|
||||
private IEnumerator LoadScene()
|
||||
{
|
||||
yield return SceneLoader.Instance.LoadSceneAsync(_currentTalkSceneSo.firstSceneName);
|
||||
StartMenu.Instance.HideStartMenu();
|
||||
DialogController.Instance.StartDialog(_currentTalkSceneSo.yarnProject);
|
||||
MainUIController.Instance.TVFadeOut(1);
|
||||
//MainUIController.Instance.HideMainUI();
|
||||
}
|
||||
|
||||
public IEnumerator NextSceneSo()
|
||||
@@ -116,7 +125,7 @@ namespace AibisDream
|
||||
// 状态机
|
||||
private string _fixStateArgs;
|
||||
private FixState _fixState;
|
||||
|
||||
|
||||
public override void OnSingletonInit()
|
||||
{
|
||||
_dialogStorage = FindObjectOfType<VariableStorageBehaviour>();
|
||||
@@ -168,7 +177,7 @@ namespace AibisDream
|
||||
_fixState = saveFile["fixState"]!.ToObject<FixState>();
|
||||
_fixStateArgs = saveFile["fixStateArgs"]!.ToString();
|
||||
yield return FixSystemCenter.StateMachine.SwitchState(_fixState, _fixStateArgs);
|
||||
|
||||
|
||||
// 开启对话
|
||||
DialogController.Instance.LoadDialog(_currentTalkSceneSo.yarnProject);
|
||||
}
|
||||
@@ -190,9 +199,9 @@ namespace AibisDream
|
||||
// 保存场景数据
|
||||
saveFile["curSceneKey"] = _curSceneKey;
|
||||
saveFile["curTalkSceneSo"] = _currentTalkSceneSo.name;
|
||||
|
||||
|
||||
// 保存状态机数据
|
||||
saveFile["fixState"] = (int) _fixState;
|
||||
saveFile["fixState"] = (int)_fixState;
|
||||
saveFile["fixStateArgs"] = _fixStateArgs;
|
||||
|
||||
// 存为Json
|
||||
@@ -212,7 +221,7 @@ namespace AibisDream
|
||||
_dialogStorage.TryGetValue("$gameStage", out string gameStage);
|
||||
gameStageStr = gameStage;
|
||||
}
|
||||
|
||||
|
||||
return $"{SaveFilePath}/{_currentTalkSceneSo.name}_{gameStageStr}_{DateTime.Now:yyyyMMdd_HHmmss}";
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user