调整剧情的character data
This commit is contained in:
6
.idea/.idea.Continentis/.idea/copilot.data.migration.agent.xml
generated
Normal file
6
.idea/.idea.Continentis/.idea/copilot.data.migration.agent.xml
generated
Normal file
@@ -0,0 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="AgentMigrationStateService">
|
||||
<option name="migrationStatus" value="COMPLETED" />
|
||||
</component>
|
||||
</project>
|
||||
@@ -10,7 +10,7 @@ MonoBehaviour:
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 9a4129cdd7011ca46b83d8c17d9f3623, type: 3}
|
||||
m_Name: CardData_Basic_CommomHolyWater
|
||||
m_Name: CardData_Basic_CommonHolyWater
|
||||
m_EditorClassIdentifier: Assembly-CSharp::Continentis.MainGame.Card.CardData
|
||||
modName: Basic
|
||||
className: CommonHolyWater
|
||||
@@ -55,5 +55,5 @@ MonoBehaviour:
|
||||
customDescriptions: []
|
||||
prefabRefs: []
|
||||
derivativeCardDataRefs:
|
||||
- CardData_Basic_CommomHolyWater
|
||||
- CardData_Basic_CommonHolyWater
|
||||
derivativeCharacterDataRefs: []
|
||||
|
||||
@@ -139,7 +139,7 @@ namespace Continentis.MainGame
|
||||
|
||||
public OrderedDictionary<string, PrioritizedAction<BuffBase<T>>> onOtherBuffApplied; //Buff被添加时,参数为被添加的Buff实例
|
||||
public OrderedDictionary<string, PrioritizedAction<BuffBase<T>>> onOtherBuffFirstApplied; //Buff被新添加时,参数为被添加的Buff实例
|
||||
public OrderedDictionary<string, PrioritizedAction<BuffBase<T>>> onOtherBuffRemoved; //Buff被移除时,参数为被移除的Buff实例
|
||||
public OrderedDictionary<string, PrioritizedAction<BuffBase<T>>> onOtherBuffRemoved; //Buff被移除后,参数为被移除的Buff实例
|
||||
|
||||
public OrderedDictionary<string, PrioritizedAction<CharacterBase, IntendedCard, CharacterBase>> onOpponentDecideAction; //对手AI决定行动时,参数为对手,和原定的目标角色
|
||||
|
||||
|
||||
@@ -97,7 +97,7 @@ namespace Continentis.Mods
|
||||
}
|
||||
}
|
||||
|
||||
Debug.Log($"Collected {collectedDataIDList.Count} CardData assets.");
|
||||
Debug.Log($"Collected {collectedDataIDList.Count} {typeof(T).Name} assets.");
|
||||
return collectedDataIDList;
|
||||
}
|
||||
|
||||
|
||||
@@ -34,10 +34,10 @@ namespace SLSFramework.StorySystem.Dialog
|
||||
// -- 角色名 --
|
||||
_characterField = new ObjectField("Character")
|
||||
{
|
||||
objectType = typeof(CharacterData),
|
||||
objectType = typeof(StoryCharacterData),
|
||||
allowSceneObjects = false
|
||||
};
|
||||
_characterField.SetValueWithoutNotify(_data.characterData);
|
||||
_characterField.SetValueWithoutNotify(_data.storyCharacterData);
|
||||
_characterField.RegisterValueChangedCallback(OnCharacterDataChanged);
|
||||
extensionContainer.Add(_characterField);
|
||||
|
||||
@@ -88,7 +88,7 @@ namespace SLSFramework.StorySystem.Dialog
|
||||
// --- 6. 核心逻辑:当 ObjectField 变化时调用 ---
|
||||
private void OnCharacterDataChanged(ChangeEvent<Object> evt)
|
||||
{
|
||||
_data.characterData = evt.newValue as CharacterData;
|
||||
_data.storyCharacterData = evt.newValue as StoryCharacterData;
|
||||
|
||||
// 清空旧的表情
|
||||
_data.expressionKey = null;
|
||||
@@ -110,7 +110,7 @@ namespace SLSFramework.StorySystem.Dialog
|
||||
// 清空旧选项
|
||||
_expressionField.choices.Clear();
|
||||
|
||||
if (_data.characterData == null)
|
||||
if (_data.storyCharacterData == null)
|
||||
{
|
||||
// 如果没有角色,禁用下拉框
|
||||
_expressionField.SetValueWithoutNotify(null);
|
||||
@@ -119,7 +119,7 @@ namespace SLSFramework.StorySystem.Dialog
|
||||
}
|
||||
|
||||
// 从 CharacterData 中提取所有表情的 "name"
|
||||
List<string> expressionKeys = _data.characterData.expressions
|
||||
List<string> expressionKeys = _data.storyCharacterData.expressions
|
||||
.Select(expr => expr.key)
|
||||
.ToList();
|
||||
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
using UnityEngine.Serialization;
|
||||
|
||||
namespace SLSFramework.StorySystem.Dialog
|
||||
{
|
||||
@@ -11,7 +12,7 @@ namespace SLSFramework.StorySystem.Dialog
|
||||
[Serializable]
|
||||
public class DialogNodeData : BaseNodeData
|
||||
{
|
||||
public CharacterData characterData;
|
||||
[FormerlySerializedAs("characterData")] public StoryCharacterData storyCharacterData;
|
||||
public string expressionKey; // 用于存储所选表情的 name
|
||||
public Vector2 characterPosition;
|
||||
[TextArea(3, 10)] public string dialogueText;
|
||||
|
||||
@@ -2,17 +2,17 @@ using System;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
|
||||
namespace SLSFramework.StorySystem.Dialog
|
||||
namespace SLSFramework.StorySystem
|
||||
{
|
||||
[CreateAssetMenu(fileName = "NewCharacterData", menuName = "StorySystem/Dialog/Character Data")]
|
||||
public partial class CharacterData : ScriptableObject
|
||||
[CreateAssetMenu(fileName = "NewCharacterData", menuName = "StorySystem/Character Data")]
|
||||
public partial class StoryCharacterData : ScriptableObject
|
||||
{
|
||||
public string characterName;
|
||||
|
||||
public List<Expression> expressions = new List<Expression>();
|
||||
}
|
||||
|
||||
public partial class CharacterData
|
||||
public partial class StoryCharacterData
|
||||
{
|
||||
[Serializable]
|
||||
public class Expression
|
||||
Reference in New Issue
Block a user