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
package/DialogueAssetFinisher.cs
CHANGED
|
@@ -1,90 +1,90 @@
|
|
|
1
|
-
//Author: Benjamin "Sweden" Jillson : Discord: sweden_gaming For Project Eden's Garden
|
|
2
|
-
using DREditor.Dialogues.Finishing;
|
|
3
|
-
using System;
|
|
4
|
-
using System.Collections;
|
|
5
|
-
using System.Collections.Generic;
|
|
6
|
-
using UnityEngine;
|
|
7
|
-
|
|
8
|
-
namespace DREditor.Dialogues.Implementation
|
|
9
|
-
{
|
|
10
|
-
/// <summary>
|
|
11
|
-
///
|
|
12
|
-
/// </summary>
|
|
13
|
-
public class DialogueAssetFinisher : DialogueAssetFinisherBase, IInstantDialogueFinisherSubscriber
|
|
14
|
-
{
|
|
15
|
-
/// <summary>
|
|
16
|
-
///
|
|
17
|
-
/// </summary>
|
|
18
|
-
[Header("")]
|
|
19
|
-
|
|
20
|
-
[Tooltip("")]
|
|
21
|
-
[SerializeField] protected DialogueFinisher InstantDialogueFinisher = null;
|
|
22
|
-
|
|
23
|
-
/// <summary>
|
|
24
|
-
///
|
|
25
|
-
/// </summary>
|
|
26
|
-
[Tooltip("")]
|
|
27
|
-
[SerializeField] protected int collectionID = 1;
|
|
28
|
-
|
|
29
|
-
/// <summary>
|
|
30
|
-
///
|
|
31
|
-
/// </summary>
|
|
32
|
-
[Tooltip("")]
|
|
33
|
-
[SerializeField] protected string orderFieldName = "finishOrder";
|
|
34
|
-
|
|
35
|
-
/// <summary>
|
|
36
|
-
///
|
|
37
|
-
/// </summary>
|
|
38
|
-
[Tooltip("")]
|
|
39
|
-
[SerializeField] protected DialogueComponentCollection<IFinishableDialogueComponent> finishableCollection = new();
|
|
40
|
-
|
|
41
|
-
/// <summary>
|
|
42
|
-
///
|
|
43
|
-
/// </summary>
|
|
44
|
-
[Tooltip("")]
|
|
45
|
-
[SerializeField] protected List<DialogueComponent> overrideComponents = new();
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
protected virtual void Awake() => finishableCollection.Initialize(transform, orderFieldName, collectionID);
|
|
49
|
-
|
|
50
|
-
protected virtual void OnValidate() => finishableCollection.Initialize(transform, orderFieldName, collectionID);
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
/// <inheritdoc/>
|
|
54
|
-
public override void FinishDialogue()
|
|
55
|
-
{
|
|
56
|
-
EnableMenuAccessIfNotInTrial();
|
|
57
|
-
|
|
58
|
-
CallOnDialogueEnd();
|
|
59
|
-
|
|
60
|
-
SetNoLongerInDialogueValues();
|
|
61
|
-
|
|
62
|
-
FinishDialogueComponents();
|
|
63
|
-
|
|
64
|
-
SetControlsBasedOnCurrentMode();
|
|
65
|
-
|
|
66
|
-
CallOnFinishedDialogue();
|
|
67
|
-
}
|
|
68
|
-
|
|
69
|
-
/// <summary>
|
|
70
|
-
///
|
|
71
|
-
/// </summary>
|
|
72
|
-
protected virtual void FinishDialogueComponents()
|
|
73
|
-
{
|
|
74
|
-
IEnumerable componentList = overrideComponents.Count > 0 ? overrideComponents : finishableCollection.components;
|
|
75
|
-
|
|
76
|
-
foreach (DialogueComponent finishable in componentList)
|
|
77
|
-
if (finishable != null && finishable is IFinishableDialogueComponent component)
|
|
78
|
-
component.OnFinishDialogue();
|
|
79
|
-
}
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
/// <inheritdoc/>
|
|
83
|
-
public void SubscribeToOnFinishOfInstantDialogue(Action function)
|
|
84
|
-
=> InstantDialogueFinisher.SubscribeToOnFinishOfDialogue(function);
|
|
85
|
-
|
|
86
|
-
/// <inheritdoc/>
|
|
87
|
-
public void UnsubscribeToOnFinishOfInstantDialogue(Action function)
|
|
88
|
-
=> InstantDialogueFinisher.UnsubscribeToOnFinishOfDialogue(function);
|
|
89
|
-
}
|
|
1
|
+
//Author: Benjamin "Sweden" Jillson : Discord: sweden_gaming For Project Eden's Garden
|
|
2
|
+
using DREditor.Dialogues.Finishing;
|
|
3
|
+
using System;
|
|
4
|
+
using System.Collections;
|
|
5
|
+
using System.Collections.Generic;
|
|
6
|
+
using UnityEngine;
|
|
7
|
+
|
|
8
|
+
namespace DREditor.Dialogues.Implementation
|
|
9
|
+
{
|
|
10
|
+
/// <summary>
|
|
11
|
+
///
|
|
12
|
+
/// </summary>
|
|
13
|
+
public class DialogueAssetFinisher : DialogueAssetFinisherBase, IInstantDialogueFinisherSubscriber
|
|
14
|
+
{
|
|
15
|
+
/// <summary>
|
|
16
|
+
///
|
|
17
|
+
/// </summary>
|
|
18
|
+
[Header("")]
|
|
19
|
+
|
|
20
|
+
[Tooltip("")]
|
|
21
|
+
[SerializeField] protected DialogueFinisher InstantDialogueFinisher = null;
|
|
22
|
+
|
|
23
|
+
/// <summary>
|
|
24
|
+
///
|
|
25
|
+
/// </summary>
|
|
26
|
+
[Tooltip("")]
|
|
27
|
+
[SerializeField] protected int collectionID = 1;
|
|
28
|
+
|
|
29
|
+
/// <summary>
|
|
30
|
+
///
|
|
31
|
+
/// </summary>
|
|
32
|
+
[Tooltip("")]
|
|
33
|
+
[SerializeField] protected string orderFieldName = "finishOrder";
|
|
34
|
+
|
|
35
|
+
/// <summary>
|
|
36
|
+
///
|
|
37
|
+
/// </summary>
|
|
38
|
+
[Tooltip("")]
|
|
39
|
+
[SerializeField] protected DialogueComponentCollection<IFinishableDialogueComponent> finishableCollection = new();
|
|
40
|
+
|
|
41
|
+
/// <summary>
|
|
42
|
+
///
|
|
43
|
+
/// </summary>
|
|
44
|
+
[Tooltip("")]
|
|
45
|
+
[SerializeField] protected List<DialogueComponent> overrideComponents = new();
|
|
46
|
+
|
|
47
|
+
|
|
48
|
+
protected virtual void Awake() => finishableCollection.Initialize(transform, orderFieldName, collectionID);
|
|
49
|
+
|
|
50
|
+
protected virtual void OnValidate() => finishableCollection.Initialize(transform, orderFieldName, collectionID);
|
|
51
|
+
|
|
52
|
+
|
|
53
|
+
/// <inheritdoc/>
|
|
54
|
+
public override void FinishDialogue()
|
|
55
|
+
{
|
|
56
|
+
EnableMenuAccessIfNotInTrial();
|
|
57
|
+
|
|
58
|
+
CallOnDialogueEnd();
|
|
59
|
+
|
|
60
|
+
SetNoLongerInDialogueValues();
|
|
61
|
+
|
|
62
|
+
FinishDialogueComponents();
|
|
63
|
+
|
|
64
|
+
SetControlsBasedOnCurrentMode();
|
|
65
|
+
|
|
66
|
+
CallOnFinishedDialogue();
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
/// <summary>
|
|
70
|
+
///
|
|
71
|
+
/// </summary>
|
|
72
|
+
protected virtual void FinishDialogueComponents()
|
|
73
|
+
{
|
|
74
|
+
IEnumerable componentList = overrideComponents.Count > 0 ? overrideComponents : finishableCollection.components;
|
|
75
|
+
|
|
76
|
+
foreach (DialogueComponent finishable in componentList)
|
|
77
|
+
if (finishable != null && finishable is IFinishableDialogueComponent component)
|
|
78
|
+
component.OnFinishDialogue();
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
|
|
82
|
+
/// <inheritdoc/>
|
|
83
|
+
public void SubscribeToOnFinishOfInstantDialogue(Action function)
|
|
84
|
+
=> InstantDialogueFinisher.SubscribeToOnFinishOfDialogue(function);
|
|
85
|
+
|
|
86
|
+
/// <inheritdoc/>
|
|
87
|
+
public void UnsubscribeToOnFinishOfInstantDialogue(Action function)
|
|
88
|
+
=> InstantDialogueFinisher.UnsubscribeToOnFinishOfDialogue(function);
|
|
89
|
+
}
|
|
90
90
|
}
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
fileFormatVersion: 2
|
|
2
|
-
guid: 8b648d3c8dda2c241ac71a736fe16dcf
|
|
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: 8b648d3c8dda2c241ac71a736fe16dcf
|
|
3
|
+
MonoImporter:
|
|
4
|
+
externalObjects: {}
|
|
5
|
+
serializedVersion: 2
|
|
6
|
+
defaultReferences: []
|
|
7
|
+
executionOrder: 0
|
|
8
|
+
icon: {instanceID: 0}
|
|
9
|
+
userData:
|
|
10
|
+
assetBundleName:
|
|
11
|
+
assetBundleVariant:
|
|
@@ -1,83 +1,83 @@
|
|
|
1
|
-
//Author: Benjamin "Sweden" Jillson : Discord: sweden_gaming For Project Eden's Garden
|
|
2
|
-
using DREditor.Dialogues.Finishing;
|
|
3
|
-
using DREditor.EventObjects;
|
|
4
|
-
using System.Collections.Generic;
|
|
5
|
-
using UnityEngine;
|
|
6
|
-
|
|
7
|
-
namespace DREditor.Dialogues.Implementation
|
|
8
|
-
{
|
|
9
|
-
/// <summary>
|
|
10
|
-
///
|
|
11
|
-
/// </summary>
|
|
12
|
-
public abstract class DialogueAssetFinisherBase : DialogueFinisher
|
|
13
|
-
{
|
|
14
|
-
/// <summary>
|
|
15
|
-
///
|
|
16
|
-
/// </summary>
|
|
17
|
-
[Header("")]
|
|
18
|
-
|
|
19
|
-
[Tooltip("")]
|
|
20
|
-
[SerializeField] protected BoolWithEvent hasStartedDialogue = null;
|
|
21
|
-
|
|
22
|
-
/// <summary>
|
|
23
|
-
///
|
|
24
|
-
/// </summary>
|
|
25
|
-
[Tooltip("")]
|
|
26
|
-
[SerializeField] protected BoolWithEvent inDialogue = null;
|
|
27
|
-
|
|
28
|
-
/// <summary>
|
|
29
|
-
///
|
|
30
|
-
/// </summary>
|
|
31
|
-
[Tooltip("")]
|
|
32
|
-
[SerializeField] protected BoolWithEvent hasMenuAccess = null;
|
|
33
|
-
|
|
34
|
-
/// <summary>
|
|
35
|
-
///
|
|
36
|
-
/// </summary>
|
|
37
|
-
[Tooltip("")]
|
|
38
|
-
[SerializeField] protected BoolWithEvent inTrialMode = null;
|
|
39
|
-
|
|
40
|
-
/// <summary>
|
|
41
|
-
///
|
|
42
|
-
/// </summary>
|
|
43
|
-
[Tooltip("")]
|
|
44
|
-
[SerializeField] protected BoolWithEvent isWaitingForDialogueToFinish = null;
|
|
45
|
-
|
|
46
|
-
/// <summary>
|
|
47
|
-
///
|
|
48
|
-
/// </summary>
|
|
49
|
-
[Tooltip("")]
|
|
50
|
-
[SerializeField] protected SceneEvent SetControlsUIBasedOnCurrentMode = null;
|
|
51
|
-
|
|
52
|
-
/// <summary>
|
|
53
|
-
///
|
|
54
|
-
/// </summary>
|
|
55
|
-
[Tooltip("")]
|
|
56
|
-
[SerializeField] protected List<DialogueComponent> FinishableComponents = new();
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
/// <summary>
|
|
60
|
-
///
|
|
61
|
-
/// </summary>
|
|
62
|
-
protected virtual void SetNoLongerInDialogueValues()
|
|
63
|
-
{
|
|
64
|
-
hasStartedDialogue.SetValue(false);
|
|
65
|
-
|
|
66
|
-
inDialogue.SetValue(false);
|
|
67
|
-
}
|
|
68
|
-
|
|
69
|
-
/// <summary>
|
|
70
|
-
///
|
|
71
|
-
/// </summary>
|
|
72
|
-
protected virtual void EnableMenuAccessIfNotInTrial()
|
|
73
|
-
{
|
|
74
|
-
if (!inTrialMode.Value && !isWaitingForDialogueToFinish.Value)
|
|
75
|
-
hasMenuAccess.SetValue(true);
|
|
76
|
-
}
|
|
77
|
-
|
|
78
|
-
/// <summary>
|
|
79
|
-
///
|
|
80
|
-
/// </summary>
|
|
81
|
-
protected virtual void SetControlsBasedOnCurrentMode() => SetControlsUIBasedOnCurrentMode.Raise();
|
|
82
|
-
}
|
|
1
|
+
//Author: Benjamin "Sweden" Jillson : Discord: sweden_gaming For Project Eden's Garden
|
|
2
|
+
using DREditor.Dialogues.Finishing;
|
|
3
|
+
using DREditor.EventObjects;
|
|
4
|
+
using System.Collections.Generic;
|
|
5
|
+
using UnityEngine;
|
|
6
|
+
|
|
7
|
+
namespace DREditor.Dialogues.Implementation
|
|
8
|
+
{
|
|
9
|
+
/// <summary>
|
|
10
|
+
///
|
|
11
|
+
/// </summary>
|
|
12
|
+
public abstract class DialogueAssetFinisherBase : DialogueFinisher
|
|
13
|
+
{
|
|
14
|
+
/// <summary>
|
|
15
|
+
///
|
|
16
|
+
/// </summary>
|
|
17
|
+
[Header("")]
|
|
18
|
+
|
|
19
|
+
[Tooltip("")]
|
|
20
|
+
[SerializeField] protected BoolWithEvent hasStartedDialogue = null;
|
|
21
|
+
|
|
22
|
+
/// <summary>
|
|
23
|
+
///
|
|
24
|
+
/// </summary>
|
|
25
|
+
[Tooltip("")]
|
|
26
|
+
[SerializeField] protected BoolWithEvent inDialogue = null;
|
|
27
|
+
|
|
28
|
+
/// <summary>
|
|
29
|
+
///
|
|
30
|
+
/// </summary>
|
|
31
|
+
[Tooltip("")]
|
|
32
|
+
[SerializeField] protected BoolWithEvent hasMenuAccess = null;
|
|
33
|
+
|
|
34
|
+
/// <summary>
|
|
35
|
+
///
|
|
36
|
+
/// </summary>
|
|
37
|
+
[Tooltip("")]
|
|
38
|
+
[SerializeField] protected BoolWithEvent inTrialMode = null;
|
|
39
|
+
|
|
40
|
+
/// <summary>
|
|
41
|
+
///
|
|
42
|
+
/// </summary>
|
|
43
|
+
[Tooltip("")]
|
|
44
|
+
[SerializeField] protected BoolWithEvent isWaitingForDialogueToFinish = null;
|
|
45
|
+
|
|
46
|
+
/// <summary>
|
|
47
|
+
///
|
|
48
|
+
/// </summary>
|
|
49
|
+
[Tooltip("")]
|
|
50
|
+
[SerializeField] protected SceneEvent SetControlsUIBasedOnCurrentMode = null;
|
|
51
|
+
|
|
52
|
+
/// <summary>
|
|
53
|
+
///
|
|
54
|
+
/// </summary>
|
|
55
|
+
[Tooltip("")]
|
|
56
|
+
[SerializeField] protected List<DialogueComponent> FinishableComponents = new();
|
|
57
|
+
|
|
58
|
+
|
|
59
|
+
/// <summary>
|
|
60
|
+
///
|
|
61
|
+
/// </summary>
|
|
62
|
+
protected virtual void SetNoLongerInDialogueValues()
|
|
63
|
+
{
|
|
64
|
+
hasStartedDialogue.SetValue(false);
|
|
65
|
+
|
|
66
|
+
inDialogue.SetValue(false);
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
/// <summary>
|
|
70
|
+
///
|
|
71
|
+
/// </summary>
|
|
72
|
+
protected virtual void EnableMenuAccessIfNotInTrial()
|
|
73
|
+
{
|
|
74
|
+
if (!inTrialMode.Value && !isWaitingForDialogueToFinish.Value)
|
|
75
|
+
hasMenuAccess.SetValue(true);
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
/// <summary>
|
|
79
|
+
///
|
|
80
|
+
/// </summary>
|
|
81
|
+
protected virtual void SetControlsBasedOnCurrentMode() => SetControlsUIBasedOnCurrentMode.Raise();
|
|
82
|
+
}
|
|
83
83
|
}
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
fileFormatVersion: 2
|
|
2
|
-
guid: a0847024e358975489b95ca08e5db8ce
|
|
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: a0847024e358975489b95ca08e5db8ce
|
|
3
|
+
MonoImporter:
|
|
4
|
+
externalObjects: {}
|
|
5
|
+
serializedVersion: 2
|
|
6
|
+
defaultReferences: []
|
|
7
|
+
executionOrder: 0
|
|
8
|
+
icon: {instanceID: 0}
|
|
9
|
+
userData:
|
|
10
|
+
assetBundleName:
|
|
11
|
+
assetBundleVariant:
|
package/DialogueAssetManager.cs
CHANGED
|
@@ -1,66 +1,66 @@
|
|
|
1
|
-
//Author: Benjamin "Sweden" Jillson : Discord: sweden_gaming For Project Eden's Garden
|
|
2
|
-
using DREditor.Services;
|
|
3
|
-
using UnityEngine;
|
|
4
|
-
|
|
5
|
-
namespace DREditor.Dialogues.Implementation
|
|
6
|
-
{
|
|
7
|
-
/// <summary>
|
|
8
|
-
///
|
|
9
|
-
/// </summary>
|
|
10
|
-
public class DialogueAssetManager : DialogueManager
|
|
11
|
-
{
|
|
12
|
-
/// <summary>
|
|
13
|
-
///
|
|
14
|
-
/// </summary>
|
|
15
|
-
[Header("")]
|
|
16
|
-
[Divider]
|
|
17
|
-
[Tooltip("")]
|
|
18
|
-
[SerializeField] protected bool registerOnEnable = true;
|
|
19
|
-
|
|
20
|
-
/// <summary>
|
|
21
|
-
///
|
|
22
|
-
/// </summary>
|
|
23
|
-
[Tooltip("")]
|
|
24
|
-
[SerializeField] protected bool destroyIfRegistrationExists = true;
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
/// <summary>
|
|
28
|
-
///
|
|
29
|
-
/// </summary>
|
|
30
|
-
protected virtual void OnEnable()
|
|
31
|
-
{
|
|
32
|
-
RegisterAsCurrentlyUsed();
|
|
33
|
-
|
|
34
|
-
CheckDestroyOnExisting();
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
/// <summary>
|
|
38
|
-
///
|
|
39
|
-
/// </summary>
|
|
40
|
-
public virtual void RegisterAsCurrentlyUsed()
|
|
41
|
-
{
|
|
42
|
-
if (registerOnEnable && !ServiceLocator.HasService<IDialogueManager>())
|
|
43
|
-
ServiceLocator.Register<IDialogueManager>(this);
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
/// <summary>
|
|
47
|
-
///
|
|
48
|
-
/// </summary>
|
|
49
|
-
protected virtual void CheckDestroyOnExisting()
|
|
50
|
-
{
|
|
51
|
-
if (destroyIfRegistrationExists && ServiceLocator.HasService(out IDialogueManager current) &&
|
|
52
|
-
current != (this as IDialogueManager) && gameObject != null)
|
|
53
|
-
Destroy(gameObject);
|
|
54
|
-
}
|
|
55
|
-
|
|
56
|
-
/// <summary>
|
|
57
|
-
///
|
|
58
|
-
/// </summary>
|
|
59
|
-
protected virtual void OnDisable() => UnRegisterAsCurrentlyUsed();
|
|
60
|
-
|
|
61
|
-
/// <summary>
|
|
62
|
-
///
|
|
63
|
-
/// </summary>
|
|
64
|
-
public virtual void UnRegisterAsCurrentlyUsed() => ServiceLocator.Unregister<IDialogueManager>(this);
|
|
65
|
-
}
|
|
1
|
+
//Author: Benjamin "Sweden" Jillson : Discord: sweden_gaming For Project Eden's Garden
|
|
2
|
+
using DREditor.Services;
|
|
3
|
+
using UnityEngine;
|
|
4
|
+
|
|
5
|
+
namespace DREditor.Dialogues.Implementation
|
|
6
|
+
{
|
|
7
|
+
/// <summary>
|
|
8
|
+
///
|
|
9
|
+
/// </summary>
|
|
10
|
+
public class DialogueAssetManager : DialogueManager
|
|
11
|
+
{
|
|
12
|
+
/// <summary>
|
|
13
|
+
///
|
|
14
|
+
/// </summary>
|
|
15
|
+
[Header("")]
|
|
16
|
+
[Divider]
|
|
17
|
+
[Tooltip("")]
|
|
18
|
+
[SerializeField] protected bool registerOnEnable = true;
|
|
19
|
+
|
|
20
|
+
/// <summary>
|
|
21
|
+
///
|
|
22
|
+
/// </summary>
|
|
23
|
+
[Tooltip("")]
|
|
24
|
+
[SerializeField] protected bool destroyIfRegistrationExists = true;
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
/// <summary>
|
|
28
|
+
///
|
|
29
|
+
/// </summary>
|
|
30
|
+
protected virtual void OnEnable()
|
|
31
|
+
{
|
|
32
|
+
RegisterAsCurrentlyUsed();
|
|
33
|
+
|
|
34
|
+
CheckDestroyOnExisting();
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
/// <summary>
|
|
38
|
+
///
|
|
39
|
+
/// </summary>
|
|
40
|
+
public virtual void RegisterAsCurrentlyUsed()
|
|
41
|
+
{
|
|
42
|
+
if (registerOnEnable && !ServiceLocator.HasService<IDialogueManager>())
|
|
43
|
+
ServiceLocator.Register<IDialogueManager>(this);
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
/// <summary>
|
|
47
|
+
///
|
|
48
|
+
/// </summary>
|
|
49
|
+
protected virtual void CheckDestroyOnExisting()
|
|
50
|
+
{
|
|
51
|
+
if (destroyIfRegistrationExists && ServiceLocator.HasService(out IDialogueManager current) &&
|
|
52
|
+
current != (this as IDialogueManager) && gameObject != null)
|
|
53
|
+
Destroy(gameObject);
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
/// <summary>
|
|
57
|
+
///
|
|
58
|
+
/// </summary>
|
|
59
|
+
protected virtual void OnDisable() => UnRegisterAsCurrentlyUsed();
|
|
60
|
+
|
|
61
|
+
/// <summary>
|
|
62
|
+
///
|
|
63
|
+
/// </summary>
|
|
64
|
+
public virtual void UnRegisterAsCurrentlyUsed() => ServiceLocator.Unregister<IDialogueManager>(this);
|
|
65
|
+
}
|
|
66
66
|
}
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
fileFormatVersion: 2
|
|
2
|
-
guid: 88f933ae4e7fdf14ea52861bf5a36c53
|
|
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: 88f933ae4e7fdf14ea52861bf5a36c53
|
|
3
|
+
MonoImporter:
|
|
4
|
+
externalObjects: {}
|
|
5
|
+
serializedVersion: 2
|
|
6
|
+
defaultReferences: []
|
|
7
|
+
executionOrder: 0
|
|
8
|
+
icon: {instanceID: 0}
|
|
9
|
+
userData:
|
|
10
|
+
assetBundleName:
|
|
11
|
+
assetBundleVariant:
|