Passion & UI

This commit is contained in:
SoulliesOfficial
2026-06-12 17:11:39 -04:00
parent 7bc1e1722c
commit 6d7ebc5825
3444 changed files with 865284 additions and 463132 deletions

View File

@@ -25,30 +25,30 @@ namespace SLSUtilities.Narrative
[SerializeField]
[Tooltip("是否仅能触发一次")]
protected bool oneShot = true;
protected bool once = true;
[ShowInInspector]
[ReadOnly]
[Tooltip("该触发器当前是否已经激活过")]
protected bool hasFired;
protected bool hasTriggered;
/// <summary>获取触发的目标故事 ID。</summary>
public string StoryId => storyId;
/// <summary>是否是一次性触发器。</summary>
public bool OneShot => oneShot;
public bool Once => once;
/// <summary>该触发器是否已经激活过。</summary>
public bool HasFired => hasFired;
public bool HasTriggered => hasTriggered;
/// <summary>
/// 激活触发器,通知订阅者启动剧情。
/// </summary>
[Button("测试触发 (Fire)", ButtonSizes.Small)]
[Button("测试触发 (Trigger)", ButtonSizes.Small)]
[GUIColor(0.3f, 0.8f, 1f)]
public virtual void Fire()
public virtual void Trigger()
{
if (oneShot && hasFired)
if (once && hasTriggered)
{
return;
}
@@ -59,7 +59,7 @@ namespace SLSUtilities.Narrative
return;
}
hasFired = true;
hasTriggered = true;
OnNarrativeTriggerFired?.Invoke(storyId);
}
@@ -69,7 +69,7 @@ namespace SLSUtilities.Narrative
[Button("重置激活状态 (Reset)", ButtonSizes.Small)]
public virtual void ResetTrigger()
{
hasFired = false;
hasTriggered = false;
}
}
}

View File

@@ -1,5 +1,5 @@
{
"name": "SLSUtilities.StorySystem.Editor",
"name": "SLSUtilities.Narrative.Editor",
"rootNamespace": "",
"references": [
"GUID:a90d8dd10608d4c4b8c31b27fb8289dd",

View File

@@ -1,5 +1,5 @@
{
"name": "SLSUtilities.StorySystem",
"name": "SLSUtilities.Narrative",
"rootNamespace": "",
"references": [
"GUID:a90d8dd10608d4c4b8c31b27fb8289dd",