net.dreditor.dialogues.implementation 0.1.6 → 0.1.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.attestation.p7m +0 -0
- package/DREditor.Dialogues.Implementation.asmdef +15 -15
- package/DREditor.Dialogues.Implementation.asmdef.meta +7 -7
- package/DialogueAssetDataClearer.cs +49 -49
- package/DialogueAssetDataClearer.cs.meta +11 -11
- package/DialogueAssetEndEventHandler.cs +57 -57
- package/DialogueAssetEndEventHandler.cs.meta +11 -11
- package/DialogueAssetEnder.cs +239 -239
- package/DialogueAssetEnder.cs.meta +11 -11
- package/DialogueAssetFinisher.cs +89 -89
- package/DialogueAssetFinisher.cs.meta +11 -11
- package/DialogueAssetFinisherBase.cs +82 -82
- package/DialogueAssetFinisherBase.cs.meta +11 -11
- package/DialogueAssetManager.cs +65 -65
- package/DialogueAssetManager.cs.meta +11 -11
- package/DialogueAssetReader.cs +377 -377
- package/DialogueAssetReader.cs.meta +11 -11
- package/DialogueAssetStarter.cs +254 -254
- package/DialogueAssetStarter.cs.meta +11 -11
- package/DialogueAssetStarterDebugger.cs +40 -40
- package/DialogueAssetStarterDebugger.cs.meta +11 -11
- package/DialogueAssetWaiter.cs +93 -93
- package/DialogueAssetWaiter.cs.meta +11 -11
- package/DialogueLineReader.cs +391 -391
- package/DialogueLineReader.cs.meta +11 -11
- package/DialogueManager.cs +83 -83
- package/DialogueManager.cs.meta +11 -11
- package/DialogueNameSaver.cs +45 -45
- package/DialogueNameSaver.cs.meta +11 -11
- package/FastForwardToLine.cs +102 -102
- package/FastForwardToLine.cs.meta +11 -11
- package/InstantDialogueEnder.cs +91 -91
- package/InstantDialogueEnder.cs.meta +11 -11
- package/InstantDialogueFinisher.cs +132 -132
- package/InstantDialogueFinisher.cs.meta +11 -11
- package/InstantDialogueStarter.cs +82 -82
- package/InstantDialogueStarter.cs.meta +11 -11
- package/NotLeavingOnDialogueFinish.cs +44 -44
- package/NotLeavingOnDialogueFinish.cs.meta +11 -11
- package/PreparableDialogueStarter.cs +88 -88
- package/PreparableDialogueStarter.cs.meta +11 -11
- package/{Samples → Samples~}/Dialogue_Asset_End_Event_Handler.prefab +685 -685
- package/{Samples → Samples~}/Dialogue_Asset_End_Event_Handler.prefab.meta +7 -7
- package/{Samples → Samples~}/Dialogue_Asset_Ender.prefab +858 -858
- package/{Samples → Samples~}/Dialogue_Asset_Ender.prefab.meta +7 -7
- package/{Samples → Samples~}/Dialogue_Asset_Finisher.prefab +301 -301
- package/{Samples → Samples~}/Dialogue_Asset_Finisher.prefab.meta +7 -7
- package/{Samples → Samples~}/Dialogue_Asset_Load_Identifier.prefab +48 -48
- package/{Samples → Samples~}/Dialogue_Asset_Load_Identifier.prefab.meta +7 -7
- package/{Samples → Samples~}/Dialogue_Asset_Loader.prefab +231 -231
- package/{Samples → Samples~}/Dialogue_Asset_Loader.prefab.meta +7 -7
- package/{Samples → Samples~}/Dialogue_Asset_Reader_DRE.prefab +511 -511
- package/{Samples → Samples~}/Dialogue_Asset_Reader_DRE.prefab.meta +7 -7
- package/{Samples → Samples~}/Dialogue_Asset_Reader_Shell.prefab +252 -252
- package/{Samples → Samples~}/Dialogue_Asset_Reader_Shell.prefab.meta +7 -7
- package/{Samples → Samples~}/Dialogue_Asset_Reader_Template.prefab +193 -193
- package/{Samples → Samples~}/Dialogue_Asset_Reader_Template.prefab.meta +7 -7
- package/{Samples → Samples~}/Dialogue_Asset_Starter.prefab +613 -613
- package/{Samples → Samples~}/Dialogue_Asset_Starter.prefab.meta +7 -7
- package/{Samples → Samples~}/Dialogue_Asset_Waiter.prefab +50 -50
- package/{Samples → Samples~}/Dialogue_Asset_Waiter.prefab.meta +7 -7
- package/{Samples → Samples~}/Dialogue_Events_Shell.prefab +458 -458
- package/{Samples → Samples~}/Dialogue_Events_Shell.prefab.meta +7 -7
- package/{Samples → Samples~}/Dialogue_Events_Template.prefab +302 -302
- package/{Samples → Samples~}/Dialogue_Events_Template.prefab.meta +7 -7
- package/{Samples → Samples~}/Dialogue_Line_Loader.prefab +1282 -1282
- package/{Samples → Samples~}/Dialogue_Line_Loader.prefab.meta +7 -7
- package/{Samples → Samples~}/Dialogue_Line_Reader.prefab +3688 -3688
- package/{Samples → Samples~}/Dialogue_Line_Reader.prefab.meta +7 -7
- package/{Samples → Samples~}/Dialogue_Name_Saver.prefab +48 -48
- package/{Samples → Samples~}/Dialogue_Name_Saver.prefab.meta +7 -7
- package/{Samples → Samples~}/Dialogue_System_Shell.prefab +325 -325
- package/{Samples → Samples~}/Dialogue_System_Shell.prefab.meta +7 -7
- package/{Samples → Samples~}/Dialogue_System_Template.prefab +1138 -1138
- package/{Samples → Samples~}/Dialogue_System_Template.prefab.meta +7 -7
- package/{Samples → Samples~}/Fast_Forward_To_Line_Tool.prefab +53 -53
- package/{Samples → Samples~}/Fast_Forward_To_Line_Tool.prefab.meta +7 -7
- package/{Samples → Samples~}/Instant_Dialogue_Ender.prefab +141 -141
- package/{Samples → Samples~}/Instant_Dialogue_Ender.prefab.meta +7 -7
- package/{Samples → Samples~}/Instant_Dialogue_Finisher.prefab +172 -172
- package/{Samples → Samples~}/Instant_Dialogue_Finisher.prefab.meta +7 -7
- package/{Samples → Samples~}/Instant_Dialogue_Starter.prefab +55 -55
- package/{Samples → Samples~}/Instant_Dialogue_Starter.prefab.meta +7 -7
- package/{Samples → Samples~}/On_Loading_Through_Scene_Transition.prefab +48 -48
- package/{Samples → Samples~}/On_Loading_Through_Scene_Transition.prefab.meta +7 -7
- package/{Samples → Samples~}/Scene_Event_On_Text_Display.prefab +47 -47
- package/{Samples → Samples~}/Scene_Event_On_Text_Display.prefab.meta +7 -7
- package/{Samples → Samples~}/Trial_Dialogue_Asset_Reader.prefab +561 -561
- package/{Samples → Samples~}/Trial_Dialogue_Asset_Reader.prefab.meta +7 -7
- package/{Samples → Samples~}/Trial_Dialogue_Asset_Starter.prefab +239 -239
- package/{Samples → Samples~}/Trial_Dialogue_Asset_Starter.prefab.meta +7 -7
- package/{Samples → Samples~}/Trial_Dialogue_Line_Loader.prefab +941 -941
- package/{Samples → Samples~}/Trial_Dialogue_Line_Loader.prefab.meta +7 -7
- package/{Samples → Samples~}/Trial_Dialogue_Loader.prefab +232 -232
- package/{Samples → Samples~}/Trial_Dialogue_Loader.prefab.meta +7 -7
- package/{Samples → Samples~}/Tween_Waiter_Handler.prefab +46 -46
- package/{Samples → Samples~}/Tween_Waiter_Handler.prefab.meta +7 -7
- package/package.json +39 -34
- package/package.json.meta +7 -7
- package/Samples.meta +0 -8
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
fileFormatVersion: 2
|
|
2
|
-
guid: 79305aaf00be360499d44468f3a265a0
|
|
3
|
-
MonoImporter:
|
|
4
|
-
externalObjects: {}
|
|
5
|
-
serializedVersion: 2
|
|
6
|
-
defaultReferences: []
|
|
7
|
-
executionOrder: 0
|
|
8
|
-
icon: {instanceID: 0}
|
|
9
|
-
userData:
|
|
10
|
-
assetBundleName:
|
|
11
|
-
assetBundleVariant:
|
|
1
|
+
fileFormatVersion: 2
|
|
2
|
+
guid: 79305aaf00be360499d44468f3a265a0
|
|
3
|
+
MonoImporter:
|
|
4
|
+
externalObjects: {}
|
|
5
|
+
serializedVersion: 2
|
|
6
|
+
defaultReferences: []
|
|
7
|
+
executionOrder: 0
|
|
8
|
+
icon: {instanceID: 0}
|
|
9
|
+
userData:
|
|
10
|
+
assetBundleName:
|
|
11
|
+
assetBundleVariant:
|
package/DialogueManager.cs
CHANGED
|
@@ -1,84 +1,84 @@
|
|
|
1
|
-
//Author: Benjamin "Sweden" Jillson : Discord: sweden_gaming For Project Eden's Garden
|
|
2
|
-
using DREditor.Dialogues.Ending;
|
|
3
|
-
using DREditor.Dialogues.Finishing;
|
|
4
|
-
using DREditor.Dialogues.Starting;
|
|
5
|
-
using DREditor.EventObjects;
|
|
6
|
-
using UnityEngine;
|
|
7
|
-
|
|
8
|
-
namespace DREditor.Dialogues.Implementation
|
|
9
|
-
{
|
|
10
|
-
/// <summary>
|
|
11
|
-
///
|
|
12
|
-
/// </summary>
|
|
13
|
-
[DefaultExecutionOrder(-1)]
|
|
14
|
-
public abstract class DialogueManager : MonoBehaviour, IDialogueManager
|
|
15
|
-
{
|
|
16
|
-
/// <summary>
|
|
17
|
-
///
|
|
18
|
-
/// </summary>
|
|
19
|
-
[Header("")]
|
|
20
|
-
[Divider]
|
|
21
|
-
[Tooltip("")]
|
|
22
|
-
[SerializeField] protected DialogueStarterDebugger DialogueStarterDebugger = null;
|
|
23
|
-
|
|
24
|
-
/// <summary>
|
|
25
|
-
///
|
|
26
|
-
/// </summary>
|
|
27
|
-
[Tooltip("")]
|
|
28
|
-
[SerializeField] protected DialogueStarter DialogueStarter = null;
|
|
29
|
-
|
|
30
|
-
/// <summary>
|
|
31
|
-
///
|
|
32
|
-
/// </summary>
|
|
33
|
-
[Tooltip("")]
|
|
34
|
-
[SerializeField] protected DialogueReader DialogueReader = null;
|
|
35
|
-
|
|
36
|
-
/// <summary>
|
|
37
|
-
///
|
|
38
|
-
/// </summary>
|
|
39
|
-
[Tooltip("")]
|
|
40
|
-
[SerializeField] protected DialogueEnder DialogueEnder = null;
|
|
41
|
-
|
|
42
|
-
/// <summary>
|
|
43
|
-
///
|
|
44
|
-
/// </summary>
|
|
45
|
-
[Tooltip("")]
|
|
46
|
-
[SerializeField] protected DialogueFinisher DialogueFinisher = null;
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
/// <inheritdoc/>
|
|
50
|
-
public virtual void DebugNoCharacterDialogueCall(SelectableObject actor, DialogueCore DebugNoDialogue = null)
|
|
51
|
-
=> DialogueStarterDebugger.DebugNoCharacterDialogueCall(actor, DebugNoDialogue);
|
|
52
|
-
|
|
53
|
-
/// <inheritdoc/>
|
|
54
|
-
public virtual void StartDialogue<T>(SelectableObject actor, DialogueBase<T>[] dialogues, bool inleaving = false) where T : Line
|
|
55
|
-
=> DialogueStarter.StartDialogue(actor, dialogues, inleaving);
|
|
56
|
-
|
|
57
|
-
/// <inheritdoc/>
|
|
58
|
-
public virtual void StartDialogue<T>(SelectableObject actor, DialogueBase<T> dialogue, bool inleaving = false) where T : Line
|
|
59
|
-
=> DialogueStarter.StartDialogue(actor, dialogue, inleaving);
|
|
60
|
-
|
|
61
|
-
/// <inheritdoc/>
|
|
62
|
-
public virtual GameObject GetManagerObject() => gameObject;
|
|
63
|
-
|
|
64
|
-
/// <inheritdoc/>
|
|
65
|
-
public virtual DialogueReader GetReader() => DialogueReader;
|
|
66
|
-
|
|
67
|
-
/// <inheritdoc/>
|
|
68
|
-
public virtual IDialogueEnder GetEnder() => DialogueEnder;
|
|
69
|
-
|
|
70
|
-
/// <inheritdoc/>
|
|
71
|
-
public virtual IDialogueFinisher GetFinisher() => DialogueFinisher;
|
|
72
|
-
|
|
73
|
-
/// <inheritdoc/>
|
|
74
|
-
public virtual T GetManagerComponent<T>() where T : MonoBehaviour => GetComponentInChildren<T>();
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
/// <inheritdoc/>
|
|
78
|
-
public virtual void Invoke<T>(DialogueCore dialogue) where T : Line
|
|
79
|
-
{
|
|
80
|
-
if (dialogue is DialogueBase<T> dia)
|
|
81
|
-
StartDialogue(null, dia);
|
|
82
|
-
}
|
|
83
|
-
}
|
|
1
|
+
//Author: Benjamin "Sweden" Jillson : Discord: sweden_gaming For Project Eden's Garden
|
|
2
|
+
using DREditor.Dialogues.Ending;
|
|
3
|
+
using DREditor.Dialogues.Finishing;
|
|
4
|
+
using DREditor.Dialogues.Starting;
|
|
5
|
+
using DREditor.EventObjects;
|
|
6
|
+
using UnityEngine;
|
|
7
|
+
|
|
8
|
+
namespace DREditor.Dialogues.Implementation
|
|
9
|
+
{
|
|
10
|
+
/// <summary>
|
|
11
|
+
///
|
|
12
|
+
/// </summary>
|
|
13
|
+
[DefaultExecutionOrder(-1)]
|
|
14
|
+
public abstract class DialogueManager : MonoBehaviour, IDialogueManager
|
|
15
|
+
{
|
|
16
|
+
/// <summary>
|
|
17
|
+
///
|
|
18
|
+
/// </summary>
|
|
19
|
+
[Header("")]
|
|
20
|
+
[Divider]
|
|
21
|
+
[Tooltip("")]
|
|
22
|
+
[SerializeField] protected DialogueStarterDebugger DialogueStarterDebugger = null;
|
|
23
|
+
|
|
24
|
+
/// <summary>
|
|
25
|
+
///
|
|
26
|
+
/// </summary>
|
|
27
|
+
[Tooltip("")]
|
|
28
|
+
[SerializeField] protected DialogueStarter DialogueStarter = null;
|
|
29
|
+
|
|
30
|
+
/// <summary>
|
|
31
|
+
///
|
|
32
|
+
/// </summary>
|
|
33
|
+
[Tooltip("")]
|
|
34
|
+
[SerializeField] protected DialogueReader DialogueReader = null;
|
|
35
|
+
|
|
36
|
+
/// <summary>
|
|
37
|
+
///
|
|
38
|
+
/// </summary>
|
|
39
|
+
[Tooltip("")]
|
|
40
|
+
[SerializeField] protected DialogueEnder DialogueEnder = null;
|
|
41
|
+
|
|
42
|
+
/// <summary>
|
|
43
|
+
///
|
|
44
|
+
/// </summary>
|
|
45
|
+
[Tooltip("")]
|
|
46
|
+
[SerializeField] protected DialogueFinisher DialogueFinisher = null;
|
|
47
|
+
|
|
48
|
+
|
|
49
|
+
/// <inheritdoc/>
|
|
50
|
+
public virtual void DebugNoCharacterDialogueCall(SelectableObject actor, DialogueCore DebugNoDialogue = null)
|
|
51
|
+
=> DialogueStarterDebugger.DebugNoCharacterDialogueCall(actor, DebugNoDialogue);
|
|
52
|
+
|
|
53
|
+
/// <inheritdoc/>
|
|
54
|
+
public virtual void StartDialogue<T>(SelectableObject actor, DialogueBase<T>[] dialogues, bool inleaving = false) where T : Line
|
|
55
|
+
=> DialogueStarter.StartDialogue(actor, dialogues, inleaving);
|
|
56
|
+
|
|
57
|
+
/// <inheritdoc/>
|
|
58
|
+
public virtual void StartDialogue<T>(SelectableObject actor, DialogueBase<T> dialogue, bool inleaving = false) where T : Line
|
|
59
|
+
=> DialogueStarter.StartDialogue(actor, dialogue, inleaving);
|
|
60
|
+
|
|
61
|
+
/// <inheritdoc/>
|
|
62
|
+
public virtual GameObject GetManagerObject() => gameObject;
|
|
63
|
+
|
|
64
|
+
/// <inheritdoc/>
|
|
65
|
+
public virtual DialogueReader GetReader() => DialogueReader;
|
|
66
|
+
|
|
67
|
+
/// <inheritdoc/>
|
|
68
|
+
public virtual IDialogueEnder GetEnder() => DialogueEnder;
|
|
69
|
+
|
|
70
|
+
/// <inheritdoc/>
|
|
71
|
+
public virtual IDialogueFinisher GetFinisher() => DialogueFinisher;
|
|
72
|
+
|
|
73
|
+
/// <inheritdoc/>
|
|
74
|
+
public virtual T GetManagerComponent<T>() where T : MonoBehaviour => GetComponentInChildren<T>();
|
|
75
|
+
|
|
76
|
+
|
|
77
|
+
/// <inheritdoc/>
|
|
78
|
+
public virtual void Invoke<T>(DialogueCore dialogue) where T : Line
|
|
79
|
+
{
|
|
80
|
+
if (dialogue is DialogueBase<T> dia)
|
|
81
|
+
StartDialogue(null, dia);
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
84
|
}
|
package/DialogueManager.cs.meta
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
fileFormatVersion: 2
|
|
2
|
-
guid: 5b8b5adcf70ee86498bff6039c598fce
|
|
3
|
-
MonoImporter:
|
|
4
|
-
externalObjects: {}
|
|
5
|
-
serializedVersion: 2
|
|
6
|
-
defaultReferences: []
|
|
7
|
-
executionOrder: 0
|
|
8
|
-
icon: {instanceID: 0}
|
|
9
|
-
userData:
|
|
10
|
-
assetBundleName:
|
|
11
|
-
assetBundleVariant:
|
|
1
|
+
fileFormatVersion: 2
|
|
2
|
+
guid: 5b8b5adcf70ee86498bff6039c598fce
|
|
3
|
+
MonoImporter:
|
|
4
|
+
externalObjects: {}
|
|
5
|
+
serializedVersion: 2
|
|
6
|
+
defaultReferences: []
|
|
7
|
+
executionOrder: 0
|
|
8
|
+
icon: {instanceID: 0}
|
|
9
|
+
userData:
|
|
10
|
+
assetBundleName:
|
|
11
|
+
assetBundleVariant:
|
package/DialogueNameSaver.cs
CHANGED
|
@@ -1,46 +1,46 @@
|
|
|
1
|
-
//Author: Benjamin "Sweden" Jillson : Discord: sweden_gaming For Project Eden's Garden
|
|
2
|
-
using DREditor.EventObjects;
|
|
3
|
-
using DREditor.Saving;
|
|
4
|
-
using DREditor.Services;
|
|
5
|
-
using System;
|
|
6
|
-
using System.Collections.Generic;
|
|
7
|
-
using System.Linq;
|
|
8
|
-
using UnityEngine;
|
|
9
|
-
|
|
10
|
-
namespace DREditor.Dialogues.Implementation
|
|
11
|
-
{
|
|
12
|
-
/// <summary>
|
|
13
|
-
///
|
|
14
|
-
/// </summary>
|
|
15
|
-
[ClassHeader(nameof(DialogueComponent) + ", " + nameof(IClearDialogueSaveData) + ", " + nameof(IDRESaveable) +
|
|
16
|
-
"\n\n")]
|
|
17
|
-
public class DialogueNameSaver : DialogueComponent, IClearDialogueSaveData, IDRESaveable
|
|
18
|
-
{
|
|
19
|
-
/// <summary>
|
|
20
|
-
///
|
|
21
|
-
/// </summary>
|
|
22
|
-
[Header("")]
|
|
23
|
-
[Divider]
|
|
24
|
-
[Tooltip("")]
|
|
25
|
-
[SerializeField] protected string saveDialogueNameKey = "DialogueName";
|
|
26
|
-
|
|
27
|
-
/// <summary>
|
|
28
|
-
///
|
|
29
|
-
/// </summary>
|
|
30
|
-
[Tooltip("")]
|
|
31
|
-
[SerializeField] protected StringWithEvent saveDialogueName = null;
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
/// <inheritdoc/>
|
|
35
|
-
public virtual void ClearSaveData() => saveDialogueName.SetValue("");
|
|
36
|
-
|
|
37
|
-
/// <inheritdoc/>
|
|
38
|
-
public virtual void Save(Dictionary<string, object> saveData)
|
|
39
|
-
{
|
|
40
|
-
if (!ServiceLocator.GetService<IDialogueManager>().GetComponentsInChildren<DialogueComponent>().Contains(this))
|
|
41
|
-
return;
|
|
42
|
-
|
|
43
|
-
saveData.Set(saveDialogueNameKey, saveDialogueName.Value);
|
|
44
|
-
}
|
|
45
|
-
}
|
|
1
|
+
//Author: Benjamin "Sweden" Jillson : Discord: sweden_gaming For Project Eden's Garden
|
|
2
|
+
using DREditor.EventObjects;
|
|
3
|
+
using DREditor.Saving;
|
|
4
|
+
using DREditor.Services;
|
|
5
|
+
using System;
|
|
6
|
+
using System.Collections.Generic;
|
|
7
|
+
using System.Linq;
|
|
8
|
+
using UnityEngine;
|
|
9
|
+
|
|
10
|
+
namespace DREditor.Dialogues.Implementation
|
|
11
|
+
{
|
|
12
|
+
/// <summary>
|
|
13
|
+
///
|
|
14
|
+
/// </summary>
|
|
15
|
+
[ClassHeader(nameof(DialogueComponent) + ", " + nameof(IClearDialogueSaveData) + ", " + nameof(IDRESaveable) +
|
|
16
|
+
"\n\n")]
|
|
17
|
+
public class DialogueNameSaver : DialogueComponent, IClearDialogueSaveData, IDRESaveable
|
|
18
|
+
{
|
|
19
|
+
/// <summary>
|
|
20
|
+
///
|
|
21
|
+
/// </summary>
|
|
22
|
+
[Header("")]
|
|
23
|
+
[Divider]
|
|
24
|
+
[Tooltip("")]
|
|
25
|
+
[SerializeField] protected string saveDialogueNameKey = "DialogueName";
|
|
26
|
+
|
|
27
|
+
/// <summary>
|
|
28
|
+
///
|
|
29
|
+
/// </summary>
|
|
30
|
+
[Tooltip("")]
|
|
31
|
+
[SerializeField] protected StringWithEvent saveDialogueName = null;
|
|
32
|
+
|
|
33
|
+
|
|
34
|
+
/// <inheritdoc/>
|
|
35
|
+
public virtual void ClearSaveData() => saveDialogueName.SetValue("");
|
|
36
|
+
|
|
37
|
+
/// <inheritdoc/>
|
|
38
|
+
public virtual void Save(Dictionary<string, object> saveData)
|
|
39
|
+
{
|
|
40
|
+
if (!ServiceLocator.GetService<IDialogueManager>().GetComponentsInChildren<DialogueComponent>().Contains(this))
|
|
41
|
+
return;
|
|
42
|
+
|
|
43
|
+
saveData.Set(saveDialogueNameKey, saveDialogueName.Value);
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
46
|
}
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
fileFormatVersion: 2
|
|
2
|
-
guid: cd0f9e8ca947fc943b5ef1356a7fb040
|
|
3
|
-
MonoImporter:
|
|
4
|
-
externalObjects: {}
|
|
5
|
-
serializedVersion: 2
|
|
6
|
-
defaultReferences: []
|
|
7
|
-
executionOrder: 0
|
|
8
|
-
icon: {instanceID: 0}
|
|
9
|
-
userData:
|
|
10
|
-
assetBundleName:
|
|
11
|
-
assetBundleVariant:
|
|
1
|
+
fileFormatVersion: 2
|
|
2
|
+
guid: cd0f9e8ca947fc943b5ef1356a7fb040
|
|
3
|
+
MonoImporter:
|
|
4
|
+
externalObjects: {}
|
|
5
|
+
serializedVersion: 2
|
|
6
|
+
defaultReferences: []
|
|
7
|
+
executionOrder: 0
|
|
8
|
+
icon: {instanceID: 0}
|
|
9
|
+
userData:
|
|
10
|
+
assetBundleName:
|
|
11
|
+
assetBundleVariant:
|
package/FastForwardToLine.cs
CHANGED
|
@@ -1,103 +1,103 @@
|
|
|
1
|
-
//Author: Benjamin "Sweden" Jillson : Discord: sweden_gaming For Project Eden's Garden
|
|
2
|
-
using DREditor.EventObjects;
|
|
3
|
-
using DREditor.Services;
|
|
4
|
-
using System.Collections;
|
|
5
|
-
using UnityEngine;
|
|
6
|
-
|
|
7
|
-
namespace DREditor.Dialogues.Implementation
|
|
8
|
-
{
|
|
9
|
-
/// <summary>
|
|
10
|
-
///
|
|
11
|
-
/// </summary>
|
|
12
|
-
[ClassHeader(nameof(ServiceHolder<FastForwardToLine>) + " for type: " + nameof(FastForwardToLine) +
|
|
13
|
-
"\n\n")]
|
|
14
|
-
public class FastForwardToLine : ServiceHolder<FastForwardToLine>
|
|
15
|
-
{
|
|
16
|
-
/// <summary>
|
|
17
|
-
///
|
|
18
|
-
/// </summary>
|
|
19
|
-
[Header("")]
|
|
20
|
-
[Tooltip("")]
|
|
21
|
-
[SerializeField] protected BoolWithEvent inDialogue;
|
|
22
|
-
|
|
23
|
-
/// <summary>
|
|
24
|
-
///
|
|
25
|
-
/// </summary>
|
|
26
|
-
[Tooltip("")]
|
|
27
|
-
[SerializeField] protected BoolWithEvent inFastForwardMode;
|
|
28
|
-
|
|
29
|
-
/// <summary>
|
|
30
|
-
///
|
|
31
|
-
/// </summary>
|
|
32
|
-
[Tooltip("")]
|
|
33
|
-
[SerializeField] protected BoolWithEvent inInstant;
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
/// <summary>
|
|
37
|
-
///
|
|
38
|
-
/// </summary>
|
|
39
|
-
[Header("")]
|
|
40
|
-
[Tooltip("")]
|
|
41
|
-
[SerializeField] protected int toLine = 0;
|
|
42
|
-
|
|
43
|
-
/// <summary>
|
|
44
|
-
///
|
|
45
|
-
/// </summary>
|
|
46
|
-
[Tooltip("")]
|
|
47
|
-
[SerializeField] protected Dialogue dialogue;
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
/// <summary>
|
|
51
|
-
///
|
|
52
|
-
/// </summary>
|
|
53
|
-
protected IDialogueManager dialogueManager;
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
protected virtual void OnEnable() => inDialogue.AddListener(OnDialogueStart);
|
|
57
|
-
|
|
58
|
-
protected virtual void OnDisable() => inDialogue.RemoveListener(OnDialogueStart);
|
|
59
|
-
|
|
60
|
-
protected virtual void Start() => dialogueManager = ServiceLocator.GetService<IDialogueManager>();
|
|
61
|
-
|
|
62
|
-
/// <summary>
|
|
63
|
-
///
|
|
64
|
-
/// </summary>
|
|
65
|
-
/// <param name="inDialogue"></param>
|
|
66
|
-
protected virtual void OnDialogueStart(bool inDialogue)
|
|
67
|
-
{
|
|
68
|
-
if (inDialogue && !inInstant.Value)
|
|
69
|
-
{
|
|
70
|
-
inFastForwardMode.SetValue(true);
|
|
71
|
-
|
|
72
|
-
StartCoroutine(WaitTillLine());
|
|
73
|
-
}
|
|
74
|
-
}
|
|
75
|
-
|
|
76
|
-
/// <summary>
|
|
77
|
-
///
|
|
78
|
-
/// </summary>
|
|
79
|
-
protected virtual IEnumerator WaitTillLine()
|
|
80
|
-
{
|
|
81
|
-
yield return new WaitUntil(() => !inDialogue.Value || (AtTargetDialogue() && AtTargetLine()));
|
|
82
|
-
|
|
83
|
-
inFastForwardMode.SetValue(false);
|
|
84
|
-
|
|
85
|
-
if (AtTargetDialogue() && AtTargetLine())
|
|
86
|
-
enabled = false;
|
|
87
|
-
|
|
88
|
-
yield break;
|
|
89
|
-
}
|
|
90
|
-
|
|
91
|
-
/// <summary>
|
|
92
|
-
///
|
|
93
|
-
/// </summary>
|
|
94
|
-
/// <returns></returns>
|
|
95
|
-
protected virtual bool AtTargetDialogue() => dialogueManager.GetReader().GetCurrentDialogue() == dialogue;
|
|
96
|
-
|
|
97
|
-
/// <summary>
|
|
98
|
-
///
|
|
99
|
-
/// </summary>
|
|
100
|
-
/// <returns></returns>
|
|
101
|
-
protected virtual bool AtTargetLine() => dialogueManager.GetReader().GetCurrentLineNum() == toLine;
|
|
102
|
-
}
|
|
1
|
+
//Author: Benjamin "Sweden" Jillson : Discord: sweden_gaming For Project Eden's Garden
|
|
2
|
+
using DREditor.EventObjects;
|
|
3
|
+
using DREditor.Services;
|
|
4
|
+
using System.Collections;
|
|
5
|
+
using UnityEngine;
|
|
6
|
+
|
|
7
|
+
namespace DREditor.Dialogues.Implementation
|
|
8
|
+
{
|
|
9
|
+
/// <summary>
|
|
10
|
+
///
|
|
11
|
+
/// </summary>
|
|
12
|
+
[ClassHeader(nameof(ServiceHolder<FastForwardToLine>) + " for type: " + nameof(FastForwardToLine) +
|
|
13
|
+
"\n\n")]
|
|
14
|
+
public class FastForwardToLine : ServiceHolder<FastForwardToLine>
|
|
15
|
+
{
|
|
16
|
+
/// <summary>
|
|
17
|
+
///
|
|
18
|
+
/// </summary>
|
|
19
|
+
[Header("")]
|
|
20
|
+
[Tooltip("")]
|
|
21
|
+
[SerializeField] protected BoolWithEvent inDialogue;
|
|
22
|
+
|
|
23
|
+
/// <summary>
|
|
24
|
+
///
|
|
25
|
+
/// </summary>
|
|
26
|
+
[Tooltip("")]
|
|
27
|
+
[SerializeField] protected BoolWithEvent inFastForwardMode;
|
|
28
|
+
|
|
29
|
+
/// <summary>
|
|
30
|
+
///
|
|
31
|
+
/// </summary>
|
|
32
|
+
[Tooltip("")]
|
|
33
|
+
[SerializeField] protected BoolWithEvent inInstant;
|
|
34
|
+
|
|
35
|
+
|
|
36
|
+
/// <summary>
|
|
37
|
+
///
|
|
38
|
+
/// </summary>
|
|
39
|
+
[Header("")]
|
|
40
|
+
[Tooltip("")]
|
|
41
|
+
[SerializeField] protected int toLine = 0;
|
|
42
|
+
|
|
43
|
+
/// <summary>
|
|
44
|
+
///
|
|
45
|
+
/// </summary>
|
|
46
|
+
[Tooltip("")]
|
|
47
|
+
[SerializeField] protected Dialogue dialogue;
|
|
48
|
+
|
|
49
|
+
|
|
50
|
+
/// <summary>
|
|
51
|
+
///
|
|
52
|
+
/// </summary>
|
|
53
|
+
protected IDialogueManager dialogueManager;
|
|
54
|
+
|
|
55
|
+
|
|
56
|
+
protected virtual void OnEnable() => inDialogue.AddListener(OnDialogueStart);
|
|
57
|
+
|
|
58
|
+
protected virtual void OnDisable() => inDialogue.RemoveListener(OnDialogueStart);
|
|
59
|
+
|
|
60
|
+
protected virtual void Start() => dialogueManager = ServiceLocator.GetService<IDialogueManager>();
|
|
61
|
+
|
|
62
|
+
/// <summary>
|
|
63
|
+
///
|
|
64
|
+
/// </summary>
|
|
65
|
+
/// <param name="inDialogue"></param>
|
|
66
|
+
protected virtual void OnDialogueStart(bool inDialogue)
|
|
67
|
+
{
|
|
68
|
+
if (inDialogue && !inInstant.Value)
|
|
69
|
+
{
|
|
70
|
+
inFastForwardMode.SetValue(true);
|
|
71
|
+
|
|
72
|
+
StartCoroutine(WaitTillLine());
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
/// <summary>
|
|
77
|
+
///
|
|
78
|
+
/// </summary>
|
|
79
|
+
protected virtual IEnumerator WaitTillLine()
|
|
80
|
+
{
|
|
81
|
+
yield return new WaitUntil(() => !inDialogue.Value || (AtTargetDialogue() && AtTargetLine()));
|
|
82
|
+
|
|
83
|
+
inFastForwardMode.SetValue(false);
|
|
84
|
+
|
|
85
|
+
if (AtTargetDialogue() && AtTargetLine())
|
|
86
|
+
enabled = false;
|
|
87
|
+
|
|
88
|
+
yield break;
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
/// <summary>
|
|
92
|
+
///
|
|
93
|
+
/// </summary>
|
|
94
|
+
/// <returns></returns>
|
|
95
|
+
protected virtual bool AtTargetDialogue() => dialogueManager.GetReader().GetCurrentDialogue() == dialogue;
|
|
96
|
+
|
|
97
|
+
/// <summary>
|
|
98
|
+
///
|
|
99
|
+
/// </summary>
|
|
100
|
+
/// <returns></returns>
|
|
101
|
+
protected virtual bool AtTargetLine() => dialogueManager.GetReader().GetCurrentLineNum() == toLine;
|
|
102
|
+
}
|
|
103
103
|
}
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
fileFormatVersion: 2
|
|
2
|
-
guid: 778429825eb557b42bcc89d7d36ca670
|
|
3
|
-
MonoImporter:
|
|
4
|
-
externalObjects: {}
|
|
5
|
-
serializedVersion: 2
|
|
6
|
-
defaultReferences: []
|
|
7
|
-
executionOrder: 0
|
|
8
|
-
icon: {instanceID: 0}
|
|
9
|
-
userData:
|
|
10
|
-
assetBundleName:
|
|
11
|
-
assetBundleVariant:
|
|
1
|
+
fileFormatVersion: 2
|
|
2
|
+
guid: 778429825eb557b42bcc89d7d36ca670
|
|
3
|
+
MonoImporter:
|
|
4
|
+
externalObjects: {}
|
|
5
|
+
serializedVersion: 2
|
|
6
|
+
defaultReferences: []
|
|
7
|
+
executionOrder: 0
|
|
8
|
+
icon: {instanceID: 0}
|
|
9
|
+
userData:
|
|
10
|
+
assetBundleName:
|
|
11
|
+
assetBundleVariant:
|