net.dreditor.freetime 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/CharacterReaction.cs +45 -45
- package/CharacterReaction.cs.meta +11 -11
- package/DREditor.FreeTime.asmdef +25 -25
- package/DREditor.FreeTime.asmdef.meta +7 -7
- package/FTECharacterDialogues.cs +55 -55
- package/FTECharacterDialogues.cs.meta +11 -11
- package/FTEData.cs +51 -51
- package/FTEData.cs.meta +11 -11
- package/FTEDataHandler.cs +180 -180
- package/FTEDataHandler.cs.meta +11 -11
- package/FTEDatabase.cs +68 -68
- package/FTEDatabase.cs.meta +11 -11
- package/FTEDatabaseEditor.cs +101 -101
- package/FTEDatabaseEditor.cs.meta +11 -11
- package/FTEDialogues.cs +32 -32
- package/FTEDialogues.cs.meta +11 -11
- package/FTEManager.cs +322 -322
- package/FTEManager.cs.meta +11 -11
- package/IFTEDataHandler.cs +37 -37
- package/IFTEDataHandler.cs.meta +11 -11
- package/MoveToNextDayEvent.cs +213 -213
- package/MoveToNextDayEvent.cs.meta +11 -11
- package/PresentReaction.cs +36 -36
- package/PresentReaction.cs.meta +11 -11
- package/ReactionDatabase.cs +111 -111
- package/ReactionDatabase.cs.meta +11 -11
- package/ReactionUtility.cs +43 -43
- package/ReactionUtility.cs.meta +11 -11
- package/{Samples → Samples~}/FTE_Data_Handler.prefab +49 -49
- package/{Samples → Samples~}/FTE_Data_Handler.prefab.meta +7 -7
- package/{Samples → Samples~}/FTE_Manager_ETemplate.prefab +218 -218
- package/{Samples → Samples~}/FTE_Manager_ETemplate.prefab.meta +7 -7
- package/{Samples → Samples~}/Move_To_Next_Day_Event.prefab +83 -83
- package/{Samples → Samples~}/Move_To_Next_Day_Event.prefab.meta +7 -7
- package/{Samples → Samples~}/Start_FTE_Handler_ETemplate.prefab +336 -336
- package/{Samples → Samples~}/Start_FTE_Handler_ETemplate.prefab.meta +7 -7
- package/SimpleFTEEntryCollection.cs +28 -28
- package/SimpleFTEEntryCollection.cs.meta +1 -1
- package/StartFTEAnimation.cs +76 -76
- package/StartFTEAnimation.cs.meta +11 -11
- package/package.json +47 -42
- package/package.json.meta +7 -7
- package/Samples.meta +0 -8
package/IFTEDataHandler.cs
CHANGED
|
@@ -1,38 +1,38 @@
|
|
|
1
|
-
//Author: Benjamin "Sweden" Jillson : Discord: sweden_gaming For Project Eden's Garden
|
|
2
|
-
using DREditor.Saving;
|
|
3
|
-
|
|
4
|
-
namespace DREditor.FreeTime
|
|
5
|
-
{
|
|
6
|
-
/// <summary>
|
|
7
|
-
///
|
|
8
|
-
/// </summary>
|
|
9
|
-
public interface IFTEDataHandler : IPlayerDataClearer
|
|
10
|
-
{
|
|
11
|
-
/// <summary>
|
|
12
|
-
///
|
|
13
|
-
/// </summary>
|
|
14
|
-
/// <param name="name"></param>
|
|
15
|
-
void AddCharacter(string name);
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
/// <summary>
|
|
19
|
-
///
|
|
20
|
-
/// </summary>
|
|
21
|
-
/// <param name="name"></param>
|
|
22
|
-
/// <returns></returns>
|
|
23
|
-
int GetLevelOfCharacter(string name);
|
|
24
|
-
|
|
25
|
-
/// <summary>
|
|
26
|
-
///
|
|
27
|
-
/// </summary>
|
|
28
|
-
/// <param name="name"></param>
|
|
29
|
-
void LevelUpCharacter(string name);
|
|
30
|
-
|
|
31
|
-
/// <summary>
|
|
32
|
-
///
|
|
33
|
-
/// </summary>
|
|
34
|
-
/// <param name="name"></param>
|
|
35
|
-
/// <returns></returns>
|
|
36
|
-
int GetAffinity(string name);
|
|
37
|
-
}
|
|
1
|
+
//Author: Benjamin "Sweden" Jillson : Discord: sweden_gaming For Project Eden's Garden
|
|
2
|
+
using DREditor.Saving;
|
|
3
|
+
|
|
4
|
+
namespace DREditor.FreeTime
|
|
5
|
+
{
|
|
6
|
+
/// <summary>
|
|
7
|
+
///
|
|
8
|
+
/// </summary>
|
|
9
|
+
public interface IFTEDataHandler : IPlayerDataClearer
|
|
10
|
+
{
|
|
11
|
+
/// <summary>
|
|
12
|
+
///
|
|
13
|
+
/// </summary>
|
|
14
|
+
/// <param name="name"></param>
|
|
15
|
+
void AddCharacter(string name);
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
/// <summary>
|
|
19
|
+
///
|
|
20
|
+
/// </summary>
|
|
21
|
+
/// <param name="name"></param>
|
|
22
|
+
/// <returns></returns>
|
|
23
|
+
int GetLevelOfCharacter(string name);
|
|
24
|
+
|
|
25
|
+
/// <summary>
|
|
26
|
+
///
|
|
27
|
+
/// </summary>
|
|
28
|
+
/// <param name="name"></param>
|
|
29
|
+
void LevelUpCharacter(string name);
|
|
30
|
+
|
|
31
|
+
/// <summary>
|
|
32
|
+
///
|
|
33
|
+
/// </summary>
|
|
34
|
+
/// <param name="name"></param>
|
|
35
|
+
/// <returns></returns>
|
|
36
|
+
int GetAffinity(string name);
|
|
37
|
+
}
|
|
38
38
|
}
|
package/IFTEDataHandler.cs.meta
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
fileFormatVersion: 2
|
|
2
|
-
guid: 0fbc1d846f07d4c4699555c745837862
|
|
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: 0fbc1d846f07d4c4699555c745837862
|
|
3
|
+
MonoImporter:
|
|
4
|
+
externalObjects: {}
|
|
5
|
+
serializedVersion: 2
|
|
6
|
+
defaultReferences: []
|
|
7
|
+
executionOrder: 0
|
|
8
|
+
icon: {instanceID: 0}
|
|
9
|
+
userData:
|
|
10
|
+
assetBundleName:
|
|
11
|
+
assetBundleVariant:
|
package/MoveToNextDayEvent.cs
CHANGED
|
@@ -1,214 +1,214 @@
|
|
|
1
|
-
//Author: Benjamin "Sweden" Jillson : Discord: sweden_gaming For Project Eden's Garden
|
|
2
|
-
using DREditor.DialogueEventHandling;
|
|
3
|
-
using DREditor.Dialogues;
|
|
4
|
-
using DREditor.Dialogues.Events;
|
|
5
|
-
using DREditor.EventObjects;
|
|
6
|
-
using DREditor.Fading;
|
|
7
|
-
using DREditor.RoomLoading;
|
|
8
|
-
using DREditor.Services;
|
|
9
|
-
using System.Collections;
|
|
10
|
-
using UnityEngine;
|
|
11
|
-
using UnityEngine.SceneManagement;
|
|
12
|
-
|
|
13
|
-
namespace DREditor.FreeTime
|
|
14
|
-
{
|
|
15
|
-
/// <summary>
|
|
16
|
-
///
|
|
17
|
-
/// </summary>
|
|
18
|
-
/// <remarks></remarks>
|
|
19
|
-
[ClassHeader(nameof(DialogueEventHandler) + ", " + nameof(IToTitleScreen) +
|
|
20
|
-
"\n\n")]
|
|
21
|
-
public class MoveToNextDayEvent : DialogueEventHandler, IToTitleScreen
|
|
22
|
-
{
|
|
23
|
-
/// <summary>
|
|
24
|
-
///
|
|
25
|
-
/// </summary>
|
|
26
|
-
[Divider]
|
|
27
|
-
[Header("")]
|
|
28
|
-
[Divider]
|
|
29
|
-
[Space]
|
|
30
|
-
[Header("")]
|
|
31
|
-
[Divider]
|
|
32
|
-
[Space]
|
|
33
|
-
[Tooltip("")]
|
|
34
|
-
[SerializeField] protected BoolWithEvent inLoading = null;
|
|
35
|
-
|
|
36
|
-
/// <summary>
|
|
37
|
-
///
|
|
38
|
-
/// </summary>
|
|
39
|
-
[Tooltip("")]
|
|
40
|
-
[SerializeField] protected SceneEvent cleanUpDialogueReader = null;
|
|
41
|
-
|
|
42
|
-
/// <summary>
|
|
43
|
-
///
|
|
44
|
-
/// </summary>
|
|
45
|
-
[Tooltip("")]
|
|
46
|
-
[SerializeField] protected BoolWithEvent toSkipHideCG = null;
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
/// <summary>
|
|
50
|
-
///
|
|
51
|
-
/// </summary>
|
|
52
|
-
[Header("")]
|
|
53
|
-
[Divider]
|
|
54
|
-
[Tooltip("")]
|
|
55
|
-
[SerializeField] protected SceneTransition transition = new();
|
|
56
|
-
|
|
57
|
-
/// <summary>
|
|
58
|
-
///
|
|
59
|
-
/// </summary>
|
|
60
|
-
[Tooltip("")]
|
|
61
|
-
[SerializeField] protected string moveOnEndEventString = "MoveEndOnDialogueFinish";
|
|
62
|
-
|
|
63
|
-
/// <summary>
|
|
64
|
-
///
|
|
65
|
-
/// </summary>
|
|
66
|
-
[Tooltip("")]
|
|
67
|
-
[SerializeField] protected string fadeOutEventString = "FadeOutOnLoadSubscribe";
|
|
68
|
-
|
|
69
|
-
/// <summary>
|
|
70
|
-
///
|
|
71
|
-
/// </summary>
|
|
72
|
-
[Tooltip("")]
|
|
73
|
-
[SerializeField] protected SceneEvent moveToNextNaturalObjective = null;
|
|
74
|
-
|
|
75
|
-
/// <summary>
|
|
76
|
-
///
|
|
77
|
-
/// </summary>
|
|
78
|
-
[Tooltip("")]
|
|
79
|
-
[SerializeField] protected StringWithEvent moveToObjective = null;
|
|
80
|
-
|
|
81
|
-
/// <summary>
|
|
82
|
-
///
|
|
83
|
-
/// </summary>
|
|
84
|
-
[Tooltip("")]
|
|
85
|
-
[SerializeField] protected IntWithEvent currentAddState = null;
|
|
86
|
-
|
|
87
|
-
/// <summary>
|
|
88
|
-
///
|
|
89
|
-
/// </summary>
|
|
90
|
-
[Tooltip("")]
|
|
91
|
-
[SerializeField] protected int additionalStateIndex = 0;
|
|
92
|
-
|
|
93
|
-
/// <summary>
|
|
94
|
-
///
|
|
95
|
-
/// </summary>
|
|
96
|
-
[Tooltip("")]
|
|
97
|
-
[SerializeField] protected float fadeToDarkDuration = 0.5f;
|
|
98
|
-
|
|
99
|
-
/// <summary>
|
|
100
|
-
///
|
|
101
|
-
/// </summary>
|
|
102
|
-
[Tooltip("")]
|
|
103
|
-
[SerializeField] protected ReturnToMenuHandler returnToMenuHandler = null;
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
/// <summary>
|
|
107
|
-
///
|
|
108
|
-
/// </summary>
|
|
109
|
-
/// <param name="o"></param>
|
|
110
|
-
protected override void OnDialogueEventTriggered(object o = null)
|
|
111
|
-
{
|
|
112
|
-
UnityEngine.Debug.Log($"{ToString()}: MOVING TO NEXT DAY.");
|
|
113
|
-
|
|
114
|
-
if (o is SceneTransition sentTransition)
|
|
115
|
-
CallSceneTransition(sentTransition);
|
|
116
|
-
else
|
|
117
|
-
CallSceneTransition(transition);
|
|
118
|
-
}
|
|
119
|
-
|
|
120
|
-
/// <summary>
|
|
121
|
-
///
|
|
122
|
-
/// </summary>
|
|
123
|
-
/// <param name="sceneTransition"></param>
|
|
124
|
-
protected virtual void CallSceneTransition(SceneTransition sceneTransition)
|
|
125
|
-
=> StartCoroutine(SceneTransitionRoutine(sceneTransition));
|
|
126
|
-
|
|
127
|
-
/// <summary>
|
|
128
|
-
///
|
|
129
|
-
/// </summary>
|
|
130
|
-
/// <param name="sceneTransition"></param>
|
|
131
|
-
/// <returns></returns>
|
|
132
|
-
protected virtual IEnumerator SceneTransitionRoutine(SceneTransition sceneTransition)
|
|
133
|
-
{
|
|
134
|
-
currentAddState.SetValue(additionalStateIndex);
|
|
135
|
-
|
|
136
|
-
if (sceneTransition.ToDark)
|
|
137
|
-
yield return ServiceLocator.GetService<GlobalFade>().FadeToRoutine(fadeToDarkDuration);
|
|
138
|
-
|
|
139
|
-
EvaluateSceneTransitionOptions(sceneTransition);
|
|
140
|
-
|
|
141
|
-
if (!sceneTransition.AtEnd && !sceneTransition.ToMenu)
|
|
142
|
-
yield return MoveToScene(sceneTransition.Scene);
|
|
143
|
-
else if (sceneTransition.AtEnd)
|
|
144
|
-
DialogueEventSystem.TriggerEvent(moveOnEndEventString, sceneTransition.AtEnd);
|
|
145
|
-
|
|
146
|
-
cleanUpDialogueReader.Raise();
|
|
147
|
-
|
|
148
|
-
if (sceneTransition.ToMenu)
|
|
149
|
-
{
|
|
150
|
-
returnToMenuHandler.ReturnToMenu(sceneTransition.Scene);
|
|
151
|
-
|
|
152
|
-
yield break;
|
|
153
|
-
}
|
|
154
|
-
|
|
155
|
-
toSkipHideCG.SetValue(true);
|
|
156
|
-
|
|
157
|
-
ServiceLocator.GetService<IDialogueManager>().GetEnder().StopDialogue();
|
|
158
|
-
|
|
159
|
-
yield break;
|
|
160
|
-
}
|
|
161
|
-
|
|
162
|
-
/// <summary>
|
|
163
|
-
///
|
|
164
|
-
/// </summary>
|
|
165
|
-
/// <param name="sceneTransition"></param>
|
|
166
|
-
protected virtual void EvaluateSceneTransitionOptions(SceneTransition sceneTransition)
|
|
167
|
-
{
|
|
168
|
-
if (!string.IsNullOrEmpty(sceneTransition.MoveToObjective))
|
|
169
|
-
moveToObjective.SetValue(sceneTransition.MoveToObjective);
|
|
170
|
-
|
|
171
|
-
if (sceneTransition.MoveToNextNaturalObjective)
|
|
172
|
-
moveToNextNaturalObjective.Raise();
|
|
173
|
-
|
|
174
|
-
if (sceneTransition.OnLoadNoDark)
|
|
175
|
-
DialogueEventSystem.TriggerEvent(fadeOutEventString);
|
|
176
|
-
|
|
177
|
-
if (!sceneTransition.ToMenu)
|
|
178
|
-
ServiceLocator.GetService<TPFDRoomLoader>().SetMovingToTPFDMode();
|
|
179
|
-
}
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
/// <summary>
|
|
183
|
-
///
|
|
184
|
-
/// </summary>
|
|
185
|
-
/// <param name="scene"></param>
|
|
186
|
-
/// <returns></returns>
|
|
187
|
-
protected virtual IEnumerator MoveToScene(string scene)
|
|
188
|
-
{
|
|
189
|
-
UnityEngine.Debug.Log($"{ToString()}: CHANGING SCENE");
|
|
190
|
-
|
|
191
|
-
AsyncOperation asyncLoadOperation = SceneManager.LoadSceneAsync(scene);
|
|
192
|
-
|
|
193
|
-
asyncLoadOperation.allowSceneActivation = false;
|
|
194
|
-
|
|
195
|
-
yield return new WaitUntil(() => asyncLoadOperation.progress >= 0.9f);
|
|
196
|
-
|
|
197
|
-
asyncLoadOperation.allowSceneActivation = true;
|
|
198
|
-
|
|
199
|
-
yield return new WaitUntil(() => !inLoading.Value);
|
|
200
|
-
|
|
201
|
-
yield break;
|
|
202
|
-
}
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
[ContextMenu("Set Default Event")]
|
|
206
|
-
public void SetDefaultEvent() => SetDefaultEventString("NextDay");
|
|
207
|
-
|
|
208
|
-
protected virtual void Reset() => SetDefaultEventString("NextDay");
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
/// <inheritdoc/>
|
|
212
|
-
public virtual void ToTitleScreen() => moveToObjective.SetValue(string.Empty);
|
|
213
|
-
}
|
|
1
|
+
//Author: Benjamin "Sweden" Jillson : Discord: sweden_gaming For Project Eden's Garden
|
|
2
|
+
using DREditor.DialogueEventHandling;
|
|
3
|
+
using DREditor.Dialogues;
|
|
4
|
+
using DREditor.Dialogues.Events;
|
|
5
|
+
using DREditor.EventObjects;
|
|
6
|
+
using DREditor.Fading;
|
|
7
|
+
using DREditor.RoomLoading;
|
|
8
|
+
using DREditor.Services;
|
|
9
|
+
using System.Collections;
|
|
10
|
+
using UnityEngine;
|
|
11
|
+
using UnityEngine.SceneManagement;
|
|
12
|
+
|
|
13
|
+
namespace DREditor.FreeTime
|
|
14
|
+
{
|
|
15
|
+
/// <summary>
|
|
16
|
+
///
|
|
17
|
+
/// </summary>
|
|
18
|
+
/// <remarks></remarks>
|
|
19
|
+
[ClassHeader(nameof(DialogueEventHandler) + ", " + nameof(IToTitleScreen) +
|
|
20
|
+
"\n\n")]
|
|
21
|
+
public class MoveToNextDayEvent : DialogueEventHandler, IToTitleScreen
|
|
22
|
+
{
|
|
23
|
+
/// <summary>
|
|
24
|
+
///
|
|
25
|
+
/// </summary>
|
|
26
|
+
[Divider]
|
|
27
|
+
[Header("")]
|
|
28
|
+
[Divider]
|
|
29
|
+
[Space]
|
|
30
|
+
[Header("")]
|
|
31
|
+
[Divider]
|
|
32
|
+
[Space]
|
|
33
|
+
[Tooltip("")]
|
|
34
|
+
[SerializeField] protected BoolWithEvent inLoading = null;
|
|
35
|
+
|
|
36
|
+
/// <summary>
|
|
37
|
+
///
|
|
38
|
+
/// </summary>
|
|
39
|
+
[Tooltip("")]
|
|
40
|
+
[SerializeField] protected SceneEvent cleanUpDialogueReader = null;
|
|
41
|
+
|
|
42
|
+
/// <summary>
|
|
43
|
+
///
|
|
44
|
+
/// </summary>
|
|
45
|
+
[Tooltip("")]
|
|
46
|
+
[SerializeField] protected BoolWithEvent toSkipHideCG = null;
|
|
47
|
+
|
|
48
|
+
|
|
49
|
+
/// <summary>
|
|
50
|
+
///
|
|
51
|
+
/// </summary>
|
|
52
|
+
[Header("")]
|
|
53
|
+
[Divider]
|
|
54
|
+
[Tooltip("")]
|
|
55
|
+
[SerializeField] protected SceneTransition transition = new();
|
|
56
|
+
|
|
57
|
+
/// <summary>
|
|
58
|
+
///
|
|
59
|
+
/// </summary>
|
|
60
|
+
[Tooltip("")]
|
|
61
|
+
[SerializeField] protected string moveOnEndEventString = "MoveEndOnDialogueFinish";
|
|
62
|
+
|
|
63
|
+
/// <summary>
|
|
64
|
+
///
|
|
65
|
+
/// </summary>
|
|
66
|
+
[Tooltip("")]
|
|
67
|
+
[SerializeField] protected string fadeOutEventString = "FadeOutOnLoadSubscribe";
|
|
68
|
+
|
|
69
|
+
/// <summary>
|
|
70
|
+
///
|
|
71
|
+
/// </summary>
|
|
72
|
+
[Tooltip("")]
|
|
73
|
+
[SerializeField] protected SceneEvent moveToNextNaturalObjective = null;
|
|
74
|
+
|
|
75
|
+
/// <summary>
|
|
76
|
+
///
|
|
77
|
+
/// </summary>
|
|
78
|
+
[Tooltip("")]
|
|
79
|
+
[SerializeField] protected StringWithEvent moveToObjective = null;
|
|
80
|
+
|
|
81
|
+
/// <summary>
|
|
82
|
+
///
|
|
83
|
+
/// </summary>
|
|
84
|
+
[Tooltip("")]
|
|
85
|
+
[SerializeField] protected IntWithEvent currentAddState = null;
|
|
86
|
+
|
|
87
|
+
/// <summary>
|
|
88
|
+
///
|
|
89
|
+
/// </summary>
|
|
90
|
+
[Tooltip("")]
|
|
91
|
+
[SerializeField] protected int additionalStateIndex = 0;
|
|
92
|
+
|
|
93
|
+
/// <summary>
|
|
94
|
+
///
|
|
95
|
+
/// </summary>
|
|
96
|
+
[Tooltip("")]
|
|
97
|
+
[SerializeField] protected float fadeToDarkDuration = 0.5f;
|
|
98
|
+
|
|
99
|
+
/// <summary>
|
|
100
|
+
///
|
|
101
|
+
/// </summary>
|
|
102
|
+
[Tooltip("")]
|
|
103
|
+
[SerializeField] protected ReturnToMenuHandler returnToMenuHandler = null;
|
|
104
|
+
|
|
105
|
+
|
|
106
|
+
/// <summary>
|
|
107
|
+
///
|
|
108
|
+
/// </summary>
|
|
109
|
+
/// <param name="o"></param>
|
|
110
|
+
protected override void OnDialogueEventTriggered(object o = null)
|
|
111
|
+
{
|
|
112
|
+
UnityEngine.Debug.Log($"{ToString()}: MOVING TO NEXT DAY.");
|
|
113
|
+
|
|
114
|
+
if (o is SceneTransition sentTransition)
|
|
115
|
+
CallSceneTransition(sentTransition);
|
|
116
|
+
else
|
|
117
|
+
CallSceneTransition(transition);
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
/// <summary>
|
|
121
|
+
///
|
|
122
|
+
/// </summary>
|
|
123
|
+
/// <param name="sceneTransition"></param>
|
|
124
|
+
protected virtual void CallSceneTransition(SceneTransition sceneTransition)
|
|
125
|
+
=> StartCoroutine(SceneTransitionRoutine(sceneTransition));
|
|
126
|
+
|
|
127
|
+
/// <summary>
|
|
128
|
+
///
|
|
129
|
+
/// </summary>
|
|
130
|
+
/// <param name="sceneTransition"></param>
|
|
131
|
+
/// <returns></returns>
|
|
132
|
+
protected virtual IEnumerator SceneTransitionRoutine(SceneTransition sceneTransition)
|
|
133
|
+
{
|
|
134
|
+
currentAddState.SetValue(additionalStateIndex);
|
|
135
|
+
|
|
136
|
+
if (sceneTransition.ToDark)
|
|
137
|
+
yield return ServiceLocator.GetService<GlobalFade>().FadeToRoutine(fadeToDarkDuration);
|
|
138
|
+
|
|
139
|
+
EvaluateSceneTransitionOptions(sceneTransition);
|
|
140
|
+
|
|
141
|
+
if (!sceneTransition.AtEnd && !sceneTransition.ToMenu)
|
|
142
|
+
yield return MoveToScene(sceneTransition.Scene);
|
|
143
|
+
else if (sceneTransition.AtEnd)
|
|
144
|
+
DialogueEventSystem.TriggerEvent(moveOnEndEventString, sceneTransition.AtEnd);
|
|
145
|
+
|
|
146
|
+
cleanUpDialogueReader.Raise();
|
|
147
|
+
|
|
148
|
+
if (sceneTransition.ToMenu)
|
|
149
|
+
{
|
|
150
|
+
returnToMenuHandler.ReturnToMenu(sceneTransition.Scene);
|
|
151
|
+
|
|
152
|
+
yield break;
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
toSkipHideCG.SetValue(true);
|
|
156
|
+
|
|
157
|
+
ServiceLocator.GetService<IDialogueManager>().GetEnder().StopDialogue();
|
|
158
|
+
|
|
159
|
+
yield break;
|
|
160
|
+
}
|
|
161
|
+
|
|
162
|
+
/// <summary>
|
|
163
|
+
///
|
|
164
|
+
/// </summary>
|
|
165
|
+
/// <param name="sceneTransition"></param>
|
|
166
|
+
protected virtual void EvaluateSceneTransitionOptions(SceneTransition sceneTransition)
|
|
167
|
+
{
|
|
168
|
+
if (!string.IsNullOrEmpty(sceneTransition.MoveToObjective))
|
|
169
|
+
moveToObjective.SetValue(sceneTransition.MoveToObjective);
|
|
170
|
+
|
|
171
|
+
if (sceneTransition.MoveToNextNaturalObjective)
|
|
172
|
+
moveToNextNaturalObjective.Raise();
|
|
173
|
+
|
|
174
|
+
if (sceneTransition.OnLoadNoDark)
|
|
175
|
+
DialogueEventSystem.TriggerEvent(fadeOutEventString);
|
|
176
|
+
|
|
177
|
+
if (!sceneTransition.ToMenu)
|
|
178
|
+
ServiceLocator.GetService<TPFDRoomLoader>().SetMovingToTPFDMode();
|
|
179
|
+
}
|
|
180
|
+
|
|
181
|
+
|
|
182
|
+
/// <summary>
|
|
183
|
+
///
|
|
184
|
+
/// </summary>
|
|
185
|
+
/// <param name="scene"></param>
|
|
186
|
+
/// <returns></returns>
|
|
187
|
+
protected virtual IEnumerator MoveToScene(string scene)
|
|
188
|
+
{
|
|
189
|
+
UnityEngine.Debug.Log($"{ToString()}: CHANGING SCENE");
|
|
190
|
+
|
|
191
|
+
AsyncOperation asyncLoadOperation = SceneManager.LoadSceneAsync(scene);
|
|
192
|
+
|
|
193
|
+
asyncLoadOperation.allowSceneActivation = false;
|
|
194
|
+
|
|
195
|
+
yield return new WaitUntil(() => asyncLoadOperation.progress >= 0.9f);
|
|
196
|
+
|
|
197
|
+
asyncLoadOperation.allowSceneActivation = true;
|
|
198
|
+
|
|
199
|
+
yield return new WaitUntil(() => !inLoading.Value);
|
|
200
|
+
|
|
201
|
+
yield break;
|
|
202
|
+
}
|
|
203
|
+
|
|
204
|
+
|
|
205
|
+
[ContextMenu("Set Default Event")]
|
|
206
|
+
public void SetDefaultEvent() => SetDefaultEventString("NextDay");
|
|
207
|
+
|
|
208
|
+
protected virtual void Reset() => SetDefaultEventString("NextDay");
|
|
209
|
+
|
|
210
|
+
|
|
211
|
+
/// <inheritdoc/>
|
|
212
|
+
public virtual void ToTitleScreen() => moveToObjective.SetValue(string.Empty);
|
|
213
|
+
}
|
|
214
214
|
}
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
fileFormatVersion: 2
|
|
2
|
-
guid: 30c79b8fcf0a9464a93df583c434a61f
|
|
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: 30c79b8fcf0a9464a93df583c434a61f
|
|
3
|
+
MonoImporter:
|
|
4
|
+
externalObjects: {}
|
|
5
|
+
serializedVersion: 2
|
|
6
|
+
defaultReferences: []
|
|
7
|
+
executionOrder: 0
|
|
8
|
+
icon: {instanceID: 0}
|
|
9
|
+
userData:
|
|
10
|
+
assetBundleName:
|
|
11
|
+
assetBundleVariant:
|
package/PresentReaction.cs
CHANGED
|
@@ -1,37 +1,37 @@
|
|
|
1
|
-
//Author: Benjamin "Sweden" Jillson : Discord: sweden_gaming For Project Eden's Garden
|
|
2
|
-
using DREditor.Dialogues;
|
|
3
|
-
using System;
|
|
4
|
-
using System.Collections.Generic;
|
|
5
|
-
using UnityEngine;
|
|
6
|
-
|
|
7
|
-
namespace DREditor.FreeTime
|
|
8
|
-
{
|
|
9
|
-
/// <summary>
|
|
10
|
-
///
|
|
11
|
-
/// </summary>
|
|
12
|
-
[Serializable]
|
|
13
|
-
[CreateAssetMenu(menuName = "DREditor/FTE/Present Reaction", fileName = "Present Reaction")]
|
|
14
|
-
public class PresentReaction : ScriptableObject
|
|
15
|
-
{
|
|
16
|
-
/// <summary>
|
|
17
|
-
///
|
|
18
|
-
/// </summary>
|
|
19
|
-
[Header("")]
|
|
20
|
-
[Divider]
|
|
21
|
-
[Tooltip("")]
|
|
22
|
-
public int reactionKeyIndex = 0;
|
|
23
|
-
|
|
24
|
-
/// <summary>
|
|
25
|
-
///
|
|
26
|
-
/// </summary>
|
|
27
|
-
[Tooltip("")]
|
|
28
|
-
public List<Dialogue> reactions = new();
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
/// <summary>
|
|
32
|
-
///
|
|
33
|
-
/// </summary>
|
|
34
|
-
/// <returns></returns>
|
|
35
|
-
public List<DialogueBase<Line>> GetReactions() => new(reactions);
|
|
36
|
-
}
|
|
1
|
+
//Author: Benjamin "Sweden" Jillson : Discord: sweden_gaming For Project Eden's Garden
|
|
2
|
+
using DREditor.Dialogues;
|
|
3
|
+
using System;
|
|
4
|
+
using System.Collections.Generic;
|
|
5
|
+
using UnityEngine;
|
|
6
|
+
|
|
7
|
+
namespace DREditor.FreeTime
|
|
8
|
+
{
|
|
9
|
+
/// <summary>
|
|
10
|
+
///
|
|
11
|
+
/// </summary>
|
|
12
|
+
[Serializable]
|
|
13
|
+
[CreateAssetMenu(menuName = "DREditor/FTE/Present Reaction", fileName = "Present Reaction")]
|
|
14
|
+
public class PresentReaction : ScriptableObject
|
|
15
|
+
{
|
|
16
|
+
/// <summary>
|
|
17
|
+
///
|
|
18
|
+
/// </summary>
|
|
19
|
+
[Header("")]
|
|
20
|
+
[Divider]
|
|
21
|
+
[Tooltip("")]
|
|
22
|
+
public int reactionKeyIndex = 0;
|
|
23
|
+
|
|
24
|
+
/// <summary>
|
|
25
|
+
///
|
|
26
|
+
/// </summary>
|
|
27
|
+
[Tooltip("")]
|
|
28
|
+
public List<Dialogue> reactions = new();
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
/// <summary>
|
|
32
|
+
///
|
|
33
|
+
/// </summary>
|
|
34
|
+
/// <returns></returns>
|
|
35
|
+
public List<DialogueBase<Line>> GetReactions() => new(reactions);
|
|
36
|
+
}
|
|
37
37
|
}
|
package/PresentReaction.cs.meta
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
fileFormatVersion: 2
|
|
2
|
-
guid: 263a49c3a15d9ed4a918904f82ac1ff3
|
|
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: 263a49c3a15d9ed4a918904f82ac1ff3
|
|
3
|
+
MonoImporter:
|
|
4
|
+
externalObjects: {}
|
|
5
|
+
serializedVersion: 2
|
|
6
|
+
defaultReferences: []
|
|
7
|
+
executionOrder: 0
|
|
8
|
+
icon: {instanceID: 0}
|
|
9
|
+
userData:
|
|
10
|
+
assetBundleName:
|
|
11
|
+
assetBundleVariant:
|