75 lines
2.7 KiB
C#
75 lines
2.7 KiB
C#
using UnityEngine;
|
|
using System.Collections.Generic;
|
|
|
|
[CreateAssetMenu(fileName = "NewGalSO", menuName = "Galgame/galSO")]
|
|
public class ingame_galgame_so : ScriptableObject
|
|
{
|
|
[System.Serializable]
|
|
public class CharacterInfo
|
|
{
|
|
public string characterName;
|
|
public Sprite characterImage;
|
|
public Color themeColor;
|
|
}
|
|
|
|
[System.Serializable]
|
|
public class DialogueElement
|
|
{
|
|
[Header("位置配置")]
|
|
public List<Vector2> customPositions; // 自定义位置列表
|
|
|
|
[Header("文本内容配置")]
|
|
public List<DialogueText> textList; // 文字列表
|
|
}
|
|
|
|
[System.Serializable]
|
|
public class DialogueText
|
|
{
|
|
[TextArea(3, 10)]
|
|
[Tooltip("文本内容")]
|
|
public string content; // 文本内容
|
|
|
|
[Tooltip("队列中第几个文本")]
|
|
public int textNumber; // 队列中第几个文本
|
|
[Tooltip("请填写characterList中的Character Name(不区分大小写)")]
|
|
public string sender; // 文本发出者角色名
|
|
|
|
public enum ImagePosition { Left, Right }
|
|
[Tooltip("对象图片左右位置")]
|
|
public ImagePosition imagePos; // 对象图片左右位置
|
|
|
|
[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; // 文本结束动作
|
|
}
|
|
|
|
public enum TimelineBase { MusicTime, SceneStartTime, CustomTimer }
|
|
public enum TriggerMethod { CodeTrigger, TimerTrigger, MixedTrigger }
|
|
|
|
[Header("全局配置")]
|
|
[Tooltip("触发方式")]
|
|
public TriggerMethod triggerMethod;
|
|
[Tooltip("时间线基准")]
|
|
public TimelineBase timelineStandard;
|
|
|
|
public List<CharacterInfo> characterList = new List<CharacterInfo>();
|
|
public List<DialogueElement> dialogueList = new List<DialogueElement>();
|
|
}
|