80 lines
2.8 KiB
C#
80 lines
2.8 KiB
C#
using UnityEngine;
|
|
using System.Collections.Generic;
|
|
|
|
[CreateAssetMenu(fileName = "NewGalSO", menuName = "Galgame/galSO")]
|
|
public class ingame_galgame_so : ScriptableObject
|
|
{
|
|
[System.Serializable]
|
|
public class DialogueText
|
|
{
|
|
[TextArea(3, 10)]
|
|
[Tooltip("文本内容")]
|
|
public string content; // 文本内容
|
|
|
|
[Tooltip("队列中第几个文本")]
|
|
public int textNumber; // 队列中第几个文本
|
|
|
|
[Tooltip("从 speakersDataSO 中选择发言者")]
|
|
public int senderIndex = -1; // 改为索引,通过下拉选择
|
|
|
|
public enum ImagePosition { Left, Right }
|
|
[Tooltip("对象图片左右位置")]
|
|
public ImagePosition imagePos; // 对象图片左右位置
|
|
[Tooltip("对象图片是否水平翻转")]
|
|
public bool flipX;
|
|
|
|
[Tooltip("文本出现时间")]
|
|
public float appearTime; // 文本出现时间
|
|
[Tooltip("文本持续时间")]
|
|
public float duration; // 文本持续时间
|
|
|
|
public enum StepMethod { ClickToNext, WaitForDuration }
|
|
[Tooltip("文本步进方法:点击后下一步 / 等待时长结束")]
|
|
public StepMethod stepMethod; // 文本步进方法
|
|
|
|
public enum TimeAction { None, SlowMotion, Pause }
|
|
[Tooltip("文本出现时动作:无/慢动作/暂停")]
|
|
public TimeAction timeAction; // 文本出现时动作
|
|
|
|
[Tooltip("文本播放期间时间流速,0为暂停")]
|
|
[Range(0f, 1f)]
|
|
public float slowMotionScale = 0.5f; // 慢动作允许TimeScale设置值
|
|
|
|
public enum EndAction { NextText, PauseQueue, EndPerformance }
|
|
[Tooltip("文本结束动作")]
|
|
public EndAction endAction; // 文本结束动作
|
|
}
|
|
|
|
[System.Serializable]
|
|
public class DialogueElement
|
|
{
|
|
public enum PositionTag { RoleHost, RoleHint, Narration, HintOrLyrics }
|
|
|
|
[Header("位置配置")]
|
|
public PositionTag positionTag;
|
|
[HideInInspector]
|
|
public List<Vector2> customPositions;
|
|
|
|
[Header("文本内容配置")]
|
|
public List<DialogueText> textList; // 文字列表
|
|
}
|
|
|
|
public enum TimelineBase { MusicTime, SceneStartTime, CustomTimer }
|
|
public enum TriggerMethod { CodeTrigger, TimerTrigger, MixedTrigger }
|
|
public enum DialogueType { Galgame, Lyrics }
|
|
|
|
[Header("全局配置")]
|
|
[Tooltip("对话类型")]
|
|
public DialogueType dialogueType;
|
|
[Tooltip("触发方式")]
|
|
public TriggerMethod triggerMethod;
|
|
[Tooltip("时间线基准")]
|
|
public TimelineBase timelineStandard;
|
|
|
|
[Header("角色数据")]
|
|
[Tooltip("引用 Speaker 配置 ScriptableObject")]
|
|
public galgame_speakers_so speakersDataSO;
|
|
|
|
public List<DialogueElement> dialogueList = new List<DialogueElement>();
|
|
}
|