net.dreditor.twopointfived 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/CameraArrow.cs +127 -127
- package/CameraArrow.cs.meta +17 -17
- package/CameraArrowManager.cs +243 -243
- package/CameraArrowManager.cs.meta +11 -11
- package/CameraArrowVisibility.cs +118 -118
- package/CameraArrowVisibility.cs.meta +1 -1
- package/DREditor.TwoPointFiveD.asmdef +17 -17
- package/DREditor.TwoPointFiveD.asmdef.meta +7 -7
- package/DialogueEventOnDestroy.cs +37 -37
- package/DialogueEventOnDestroy.cs.meta +11 -11
- package/ITPFDListener.cs +20 -20
- package/ITPFDListener.cs.meta +11 -11
- package/PrepareTPFDCameras.cs +71 -71
- package/PrepareTPFDCameras.cs.meta +11 -11
- package/{Samples → Samples~}/Arrow_Canvas_Template.prefab +939 -939
- package/{Samples → Samples~}/Arrow_Canvas_Template.prefab.meta +7 -7
- package/{Samples → Samples~}/Camera_Arrow.prefab +218 -218
- package/{Samples → Samples~}/Camera_Arrow.prefab.meta +7 -7
- package/{Samples → Samples~}/PrepareTPFD.asset +14 -14
- package/{Samples → Samples~}/PrepareTPFD.asset.meta +8 -8
- package/{Samples → Samples~}/Prepare_TPFD_Cameras.prefab +137 -137
- package/{Samples → Samples~}/Prepare_TPFD_Cameras.prefab.meta +7 -7
- package/{Samples → Samples~}/Prepare_TPFD_Listener.prefab +51 -51
- package/{Samples → Samples~}/Prepare_TPFD_Listener.prefab.meta +7 -7
- package/{Samples → Samples~}/TPFD_Manager.prefab +63 -63
- package/{Samples → Samples~}/TPFD_Manager.prefab.meta +7 -7
- package/{Samples → Samples~}/TPFD_Move_In_Dialogue_Handler.prefab +56 -56
- package/{Samples → Samples~}/TPFD_Move_In_Dialogue_Handler.prefab.meta +7 -7
- package/TPFDManager.cs +149 -149
- package/TPFDManager.cs.meta +11 -11
- package/TPFDManagerBase.cs +186 -186
- package/TPFDManagerBase.cs.meta +11 -11
- package/TPFDMoveInDialogueHandler.cs +185 -185
- package/TPFDMoveInDialogueHandler.cs.meta +11 -11
- package/package.json +41 -36
- package/package.json.meta +7 -7
- package/Samples.meta +0 -8
package/CameraArrowVisibility.cs
CHANGED
|
@@ -1,119 +1,119 @@
|
|
|
1
|
-
//Author: Benjamin "Sweden" Jillson : Discord: sweden_gaming For Project Eden's Garden
|
|
2
|
-
using DREditor.EventObjects;
|
|
3
|
-
using DREditor.UIHandling;
|
|
4
|
-
using System.Collections;
|
|
5
|
-
using System.Collections.Generic;
|
|
6
|
-
using UnityEngine;
|
|
7
|
-
|
|
8
|
-
namespace DREditor.TwoPointFiveD
|
|
9
|
-
{
|
|
10
|
-
/// <summary>
|
|
11
|
-
///
|
|
12
|
-
/// </summary>
|
|
13
|
-
[ClassHeader(nameof(UIVisibilityComponent) + ", " + nameof(IUIVisibility) +
|
|
14
|
-
"\n\n")]
|
|
15
|
-
public class CameraArrowVisibility : UIVisibilityComponent
|
|
16
|
-
{
|
|
17
|
-
/// <summary>
|
|
18
|
-
///
|
|
19
|
-
/// </summary>
|
|
20
|
-
[Tooltip("")]
|
|
21
|
-
[SerializeField] protected BoolWithEvent isLoadingFile = null;
|
|
22
|
-
|
|
23
|
-
/// <summary>
|
|
24
|
-
///
|
|
25
|
-
/// </summary>
|
|
26
|
-
[Tooltip("")]
|
|
27
|
-
[SerializeField] protected BoolWithEvent inLeaveProcess = null;
|
|
28
|
-
|
|
29
|
-
/// <summary>
|
|
30
|
-
///
|
|
31
|
-
/// </summary>
|
|
32
|
-
[Tooltip("")]
|
|
33
|
-
[SerializeField] protected UIVisibilityComponent allArrowVisibility = null;
|
|
34
|
-
|
|
35
|
-
/// <summary>
|
|
36
|
-
///
|
|
37
|
-
/// </summary>
|
|
38
|
-
[Tooltip("")]
|
|
39
|
-
[SerializeField] protected List<CameraArrow> arrows = new();
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
/// <summary>
|
|
43
|
-
///
|
|
44
|
-
/// </summary>
|
|
45
|
-
protected bool canChange = false;
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
/// <summary>
|
|
49
|
-
///
|
|
50
|
-
/// </summary>
|
|
51
|
-
protected override void ShowUI() => StartCoroutine(Appear());
|
|
52
|
-
|
|
53
|
-
/// <summary>
|
|
54
|
-
///
|
|
55
|
-
/// </summary>
|
|
56
|
-
/// <remarks>
|
|
57
|
-
///
|
|
58
|
-
/// </remarks>
|
|
59
|
-
protected virtual IEnumerator Appear()
|
|
60
|
-
{
|
|
61
|
-
if (isLoadingFile.Value)
|
|
62
|
-
yield break;
|
|
63
|
-
|
|
64
|
-
if (inLeaveProcess.Value)
|
|
65
|
-
{
|
|
66
|
-
UpdateArrowStates();
|
|
67
|
-
|
|
68
|
-
yield break;
|
|
69
|
-
}
|
|
70
|
-
|
|
71
|
-
canChange = true;
|
|
72
|
-
|
|
73
|
-
allArrowVisibility.Show();
|
|
74
|
-
|
|
75
|
-
yield return allArrowVisibility.WaitForChangeToComplete();
|
|
76
|
-
|
|
77
|
-
UpdateArrowStates();
|
|
78
|
-
}
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
/// <summary>
|
|
82
|
-
///
|
|
83
|
-
/// </summary>
|
|
84
|
-
protected override void HideUI() => StartCoroutine(Disappear());
|
|
85
|
-
|
|
86
|
-
/// <summary>
|
|
87
|
-
///
|
|
88
|
-
/// </summary>
|
|
89
|
-
/// <returns></returns>
|
|
90
|
-
protected virtual IEnumerator Disappear()
|
|
91
|
-
{
|
|
92
|
-
StopCoroutine(Appear());
|
|
93
|
-
|
|
94
|
-
canChange = false;
|
|
95
|
-
|
|
96
|
-
allArrowVisibility.Hide();
|
|
97
|
-
|
|
98
|
-
yield return allArrowVisibility.WaitForChangeToComplete();
|
|
99
|
-
|
|
100
|
-
UpdateArrowStates();
|
|
101
|
-
}
|
|
102
|
-
|
|
103
|
-
/// <summary>
|
|
104
|
-
///
|
|
105
|
-
/// </summary>
|
|
106
|
-
protected virtual void UpdateArrowStates()
|
|
107
|
-
{
|
|
108
|
-
foreach (CameraArrow arrow in arrows)
|
|
109
|
-
arrow.SetCanChange(canChange);
|
|
110
|
-
}
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
/// <inheritdoc/>
|
|
114
|
-
protected override IEnumerator WaitForUIToComplete()
|
|
115
|
-
{
|
|
116
|
-
yield return allArrowVisibility.WaitForChangeToComplete();
|
|
117
|
-
}
|
|
118
|
-
}
|
|
1
|
+
//Author: Benjamin "Sweden" Jillson : Discord: sweden_gaming For Project Eden's Garden
|
|
2
|
+
using DREditor.EventObjects;
|
|
3
|
+
using DREditor.UIHandling;
|
|
4
|
+
using System.Collections;
|
|
5
|
+
using System.Collections.Generic;
|
|
6
|
+
using UnityEngine;
|
|
7
|
+
|
|
8
|
+
namespace DREditor.TwoPointFiveD
|
|
9
|
+
{
|
|
10
|
+
/// <summary>
|
|
11
|
+
///
|
|
12
|
+
/// </summary>
|
|
13
|
+
[ClassHeader(nameof(UIVisibilityComponent) + ", " + nameof(IUIVisibility) +
|
|
14
|
+
"\n\n")]
|
|
15
|
+
public class CameraArrowVisibility : UIVisibilityComponent
|
|
16
|
+
{
|
|
17
|
+
/// <summary>
|
|
18
|
+
///
|
|
19
|
+
/// </summary>
|
|
20
|
+
[Tooltip("")]
|
|
21
|
+
[SerializeField] protected BoolWithEvent isLoadingFile = null;
|
|
22
|
+
|
|
23
|
+
/// <summary>
|
|
24
|
+
///
|
|
25
|
+
/// </summary>
|
|
26
|
+
[Tooltip("")]
|
|
27
|
+
[SerializeField] protected BoolWithEvent inLeaveProcess = null;
|
|
28
|
+
|
|
29
|
+
/// <summary>
|
|
30
|
+
///
|
|
31
|
+
/// </summary>
|
|
32
|
+
[Tooltip("")]
|
|
33
|
+
[SerializeField] protected UIVisibilityComponent allArrowVisibility = null;
|
|
34
|
+
|
|
35
|
+
/// <summary>
|
|
36
|
+
///
|
|
37
|
+
/// </summary>
|
|
38
|
+
[Tooltip("")]
|
|
39
|
+
[SerializeField] protected List<CameraArrow> arrows = new();
|
|
40
|
+
|
|
41
|
+
|
|
42
|
+
/// <summary>
|
|
43
|
+
///
|
|
44
|
+
/// </summary>
|
|
45
|
+
protected bool canChange = false;
|
|
46
|
+
|
|
47
|
+
|
|
48
|
+
/// <summary>
|
|
49
|
+
///
|
|
50
|
+
/// </summary>
|
|
51
|
+
protected override void ShowUI() => StartCoroutine(Appear());
|
|
52
|
+
|
|
53
|
+
/// <summary>
|
|
54
|
+
///
|
|
55
|
+
/// </summary>
|
|
56
|
+
/// <remarks>
|
|
57
|
+
///
|
|
58
|
+
/// </remarks>
|
|
59
|
+
protected virtual IEnumerator Appear()
|
|
60
|
+
{
|
|
61
|
+
if (isLoadingFile.Value)
|
|
62
|
+
yield break;
|
|
63
|
+
|
|
64
|
+
if (inLeaveProcess.Value)
|
|
65
|
+
{
|
|
66
|
+
UpdateArrowStates();
|
|
67
|
+
|
|
68
|
+
yield break;
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
canChange = true;
|
|
72
|
+
|
|
73
|
+
allArrowVisibility.Show();
|
|
74
|
+
|
|
75
|
+
yield return allArrowVisibility.WaitForChangeToComplete();
|
|
76
|
+
|
|
77
|
+
UpdateArrowStates();
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
|
|
81
|
+
/// <summary>
|
|
82
|
+
///
|
|
83
|
+
/// </summary>
|
|
84
|
+
protected override void HideUI() => StartCoroutine(Disappear());
|
|
85
|
+
|
|
86
|
+
/// <summary>
|
|
87
|
+
///
|
|
88
|
+
/// </summary>
|
|
89
|
+
/// <returns></returns>
|
|
90
|
+
protected virtual IEnumerator Disappear()
|
|
91
|
+
{
|
|
92
|
+
StopCoroutine(Appear());
|
|
93
|
+
|
|
94
|
+
canChange = false;
|
|
95
|
+
|
|
96
|
+
allArrowVisibility.Hide();
|
|
97
|
+
|
|
98
|
+
yield return allArrowVisibility.WaitForChangeToComplete();
|
|
99
|
+
|
|
100
|
+
UpdateArrowStates();
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
/// <summary>
|
|
104
|
+
///
|
|
105
|
+
/// </summary>
|
|
106
|
+
protected virtual void UpdateArrowStates()
|
|
107
|
+
{
|
|
108
|
+
foreach (CameraArrow arrow in arrows)
|
|
109
|
+
arrow.SetCanChange(canChange);
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
|
|
113
|
+
/// <inheritdoc/>
|
|
114
|
+
protected override IEnumerator WaitForUIToComplete()
|
|
115
|
+
{
|
|
116
|
+
yield return allArrowVisibility.WaitForChangeToComplete();
|
|
117
|
+
}
|
|
118
|
+
}
|
|
119
119
|
}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
fileFormatVersion: 2
|
|
1
|
+
fileFormatVersion: 2
|
|
2
2
|
guid: 31e31801b5b1a5c4a8d55d6a8efcfe15
|
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "DREditor.TwoPointFiveD",
|
|
3
|
-
"rootNamespace": "",
|
|
4
|
-
"references": [
|
|
5
|
-
"DREditor",
|
|
6
|
-
"DREditor.UIHandling",
|
|
7
|
-
"DREditor.DialogueEventHandling"
|
|
8
|
-
],
|
|
9
|
-
"includePlatforms": [],
|
|
10
|
-
"excludePlatforms": [],
|
|
11
|
-
"allowUnsafeCode": false,
|
|
12
|
-
"overrideReferences": false,
|
|
13
|
-
"precompiledReferences": [],
|
|
14
|
-
"autoReferenced": true,
|
|
15
|
-
"defineConstraints": [],
|
|
16
|
-
"versionDefines": [],
|
|
17
|
-
"noEngineReferences": false
|
|
1
|
+
{
|
|
2
|
+
"name": "DREditor.TwoPointFiveD",
|
|
3
|
+
"rootNamespace": "",
|
|
4
|
+
"references": [
|
|
5
|
+
"DREditor",
|
|
6
|
+
"DREditor.UIHandling",
|
|
7
|
+
"DREditor.DialogueEventHandling"
|
|
8
|
+
],
|
|
9
|
+
"includePlatforms": [],
|
|
10
|
+
"excludePlatforms": [],
|
|
11
|
+
"allowUnsafeCode": false,
|
|
12
|
+
"overrideReferences": false,
|
|
13
|
+
"precompiledReferences": [],
|
|
14
|
+
"autoReferenced": true,
|
|
15
|
+
"defineConstraints": [],
|
|
16
|
+
"versionDefines": [],
|
|
17
|
+
"noEngineReferences": false
|
|
18
18
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
fileFormatVersion: 2
|
|
2
|
-
guid: 991d12d32bf3fe7419036bb62965408b
|
|
3
|
-
AssemblyDefinitionImporter:
|
|
4
|
-
externalObjects: {}
|
|
5
|
-
userData:
|
|
6
|
-
assetBundleName:
|
|
7
|
-
assetBundleVariant:
|
|
1
|
+
fileFormatVersion: 2
|
|
2
|
+
guid: 991d12d32bf3fe7419036bb62965408b
|
|
3
|
+
AssemblyDefinitionImporter:
|
|
4
|
+
externalObjects: {}
|
|
5
|
+
userData:
|
|
6
|
+
assetBundleName:
|
|
7
|
+
assetBundleVariant:
|
|
@@ -1,38 +1,38 @@
|
|
|
1
|
-
//Author: Benjamin "Sweden" Jillson : Discord: sweden_gaming For Project Eden's Garden
|
|
2
|
-
using DREditor.Dialogues.Events;
|
|
3
|
-
using System.Collections.Generic;
|
|
4
|
-
using UnityEngine;
|
|
5
|
-
|
|
6
|
-
namespace DREditor.TwoPointFiveD
|
|
7
|
-
{
|
|
8
|
-
/// <summary>
|
|
9
|
-
///
|
|
10
|
-
/// </summary>
|
|
11
|
-
/// <remarks></remarks>
|
|
12
|
-
[ClassHeader("")]
|
|
13
|
-
public class DialogueEventOnDestroy : MonoBehaviour
|
|
14
|
-
{
|
|
15
|
-
/// <summary>
|
|
16
|
-
///
|
|
17
|
-
/// </summary>
|
|
18
|
-
[Tooltip("")]
|
|
19
|
-
[SerializeField] protected List<string> dialogueOnDestroyEvents = new() { "ResetProtagCamera" };
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
/// <summary>
|
|
23
|
-
///
|
|
24
|
-
/// </summary>
|
|
25
|
-
protected virtual void OnDestroy()
|
|
26
|
-
{
|
|
27
|
-
foreach (string dialogueEvent in dialogueOnDestroyEvents)
|
|
28
|
-
DialogueEventSystem.TriggerEvent(dialogueEvent);
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
/// <summary>
|
|
33
|
-
///
|
|
34
|
-
/// </summary>
|
|
35
|
-
[ContextMenu("Populate Default Protag Event")]
|
|
36
|
-
public virtual void DebugPopulateDefaultProtagEvent() => dialogueOnDestroyEvents.Add("ResetProtagCamera");
|
|
37
|
-
}
|
|
1
|
+
//Author: Benjamin "Sweden" Jillson : Discord: sweden_gaming For Project Eden's Garden
|
|
2
|
+
using DREditor.Dialogues.Events;
|
|
3
|
+
using System.Collections.Generic;
|
|
4
|
+
using UnityEngine;
|
|
5
|
+
|
|
6
|
+
namespace DREditor.TwoPointFiveD
|
|
7
|
+
{
|
|
8
|
+
/// <summary>
|
|
9
|
+
///
|
|
10
|
+
/// </summary>
|
|
11
|
+
/// <remarks></remarks>
|
|
12
|
+
[ClassHeader("")]
|
|
13
|
+
public class DialogueEventOnDestroy : MonoBehaviour
|
|
14
|
+
{
|
|
15
|
+
/// <summary>
|
|
16
|
+
///
|
|
17
|
+
/// </summary>
|
|
18
|
+
[Tooltip("")]
|
|
19
|
+
[SerializeField] protected List<string> dialogueOnDestroyEvents = new() { "ResetProtagCamera" };
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
/// <summary>
|
|
23
|
+
///
|
|
24
|
+
/// </summary>
|
|
25
|
+
protected virtual void OnDestroy()
|
|
26
|
+
{
|
|
27
|
+
foreach (string dialogueEvent in dialogueOnDestroyEvents)
|
|
28
|
+
DialogueEventSystem.TriggerEvent(dialogueEvent);
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
/// <summary>
|
|
33
|
+
///
|
|
34
|
+
/// </summary>
|
|
35
|
+
[ContextMenu("Populate Default Protag Event")]
|
|
36
|
+
public virtual void DebugPopulateDefaultProtagEvent() => dialogueOnDestroyEvents.Add("ResetProtagCamera");
|
|
37
|
+
}
|
|
38
38
|
}
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
fileFormatVersion: 2
|
|
2
|
-
guid: edf9da330f7e117418a11da765d6c47b
|
|
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: edf9da330f7e117418a11da765d6c47b
|
|
3
|
+
MonoImporter:
|
|
4
|
+
externalObjects: {}
|
|
5
|
+
serializedVersion: 2
|
|
6
|
+
defaultReferences: []
|
|
7
|
+
executionOrder: 0
|
|
8
|
+
icon: {instanceID: 0}
|
|
9
|
+
userData:
|
|
10
|
+
assetBundleName:
|
|
11
|
+
assetBundleVariant:
|
package/ITPFDListener.cs
CHANGED
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
//Author: Benjamin "Sweden" Jillson : Discord: sweden_gaming For Project Eden's Garden
|
|
2
|
-
namespace DREditor.TwoPointFiveD
|
|
3
|
-
{
|
|
4
|
-
/// <summary>
|
|
5
|
-
///
|
|
6
|
-
/// </summary>
|
|
7
|
-
public interface ITPFDListener
|
|
8
|
-
{
|
|
9
|
-
/// <summary>
|
|
10
|
-
///
|
|
11
|
-
/// </summary>
|
|
12
|
-
/// <param name="directionIndex"></param>
|
|
13
|
-
void OnEnteredBoundary(int directionIndex);
|
|
14
|
-
|
|
15
|
-
/// <summary>
|
|
16
|
-
///
|
|
17
|
-
/// </summary>
|
|
18
|
-
/// <param name="directionIndex"></param>
|
|
19
|
-
void OnExitedBoundary(int directionIndex);
|
|
20
|
-
}
|
|
1
|
+
//Author: Benjamin "Sweden" Jillson : Discord: sweden_gaming For Project Eden's Garden
|
|
2
|
+
namespace DREditor.TwoPointFiveD
|
|
3
|
+
{
|
|
4
|
+
/// <summary>
|
|
5
|
+
///
|
|
6
|
+
/// </summary>
|
|
7
|
+
public interface ITPFDListener
|
|
8
|
+
{
|
|
9
|
+
/// <summary>
|
|
10
|
+
///
|
|
11
|
+
/// </summary>
|
|
12
|
+
/// <param name="directionIndex"></param>
|
|
13
|
+
void OnEnteredBoundary(int directionIndex);
|
|
14
|
+
|
|
15
|
+
/// <summary>
|
|
16
|
+
///
|
|
17
|
+
/// </summary>
|
|
18
|
+
/// <param name="directionIndex"></param>
|
|
19
|
+
void OnExitedBoundary(int directionIndex);
|
|
20
|
+
}
|
|
21
21
|
}
|
package/ITPFDListener.cs.meta
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
fileFormatVersion: 2
|
|
2
|
-
guid: db70bc4a8901ba14890a370635f750a0
|
|
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: db70bc4a8901ba14890a370635f750a0
|
|
3
|
+
MonoImporter:
|
|
4
|
+
externalObjects: {}
|
|
5
|
+
serializedVersion: 2
|
|
6
|
+
defaultReferences: []
|
|
7
|
+
executionOrder: 0
|
|
8
|
+
icon: {instanceID: 0}
|
|
9
|
+
userData:
|
|
10
|
+
assetBundleName:
|
|
11
|
+
assetBundleVariant:
|
package/PrepareTPFDCameras.cs
CHANGED
|
@@ -1,72 +1,72 @@
|
|
|
1
|
-
//Author: Benjamin "Sweden" Jillson : Discord: sweden_gaming For Project Eden's Garden
|
|
2
|
-
using DREditor.Dialogues.Events;
|
|
3
|
-
using DREditor.EventObjects;
|
|
4
|
-
using UnityEngine;
|
|
5
|
-
|
|
6
|
-
namespace DREditor.TwoPointFiveD
|
|
7
|
-
{
|
|
8
|
-
/// <summary>
|
|
9
|
-
///
|
|
10
|
-
/// </summary>
|
|
11
|
-
[ClassHeader("")]
|
|
12
|
-
public class PrepareTPFDCameras : MonoBehaviour
|
|
13
|
-
{
|
|
14
|
-
/// <summary>
|
|
15
|
-
///
|
|
16
|
-
/// </summary>
|
|
17
|
-
[Tooltip("")]
|
|
18
|
-
[SerializeField] protected string prepareTPFDCameraEventString = "PrepareCamerasTPFD";
|
|
19
|
-
|
|
20
|
-
/// <summary>
|
|
21
|
-
///
|
|
22
|
-
/// </summary>
|
|
23
|
-
[Tooltip("")]
|
|
24
|
-
[SerializeField] protected SceneEventListener prepareTPFD = null;
|
|
25
|
-
|
|
26
|
-
/// <summary>
|
|
27
|
-
///
|
|
28
|
-
/// </summary>
|
|
29
|
-
[Tooltip("")]
|
|
30
|
-
[SerializeField] protected float angleThreshold = 180;
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
/// <summary>
|
|
34
|
-
///
|
|
35
|
-
/// </summary>
|
|
36
|
-
protected virtual void OnEnable() => prepareTPFD.Response.AddListener(PrepareForTPFD);
|
|
37
|
-
|
|
38
|
-
/// <summary>
|
|
39
|
-
///
|
|
40
|
-
/// </summary>
|
|
41
|
-
protected virtual void OnDisable() => prepareTPFD.Response.RemoveListener(PrepareForTPFD);
|
|
42
|
-
|
|
43
|
-
/// <summary>
|
|
44
|
-
///
|
|
45
|
-
/// </summary>
|
|
46
|
-
protected virtual void PrepareForTPFD()
|
|
47
|
-
{
|
|
48
|
-
foreach (TPFDManagerBase manager in FindObjectsByType<TPFDManagerBase>())
|
|
49
|
-
if (InitializeValidActiveManager(manager))
|
|
50
|
-
break;
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
/// <summary>
|
|
54
|
-
///
|
|
55
|
-
/// </summary>
|
|
56
|
-
/// <param name="manager"></param>
|
|
57
|
-
/// <returns></returns>
|
|
58
|
-
protected virtual bool InitializeValidActiveManager(TPFDManagerBase manager)
|
|
59
|
-
{
|
|
60
|
-
bool result = manager != null && manager.enabled;
|
|
61
|
-
|
|
62
|
-
if (result)
|
|
63
|
-
{
|
|
64
|
-
manager.Start();
|
|
65
|
-
|
|
66
|
-
DialogueEventSystem.TriggerEvent(prepareTPFDCameraEventString, manager.GetInitialHAngle() >= angleThreshold);
|
|
67
|
-
}
|
|
68
|
-
|
|
69
|
-
return result;
|
|
70
|
-
}
|
|
71
|
-
}
|
|
1
|
+
//Author: Benjamin "Sweden" Jillson : Discord: sweden_gaming For Project Eden's Garden
|
|
2
|
+
using DREditor.Dialogues.Events;
|
|
3
|
+
using DREditor.EventObjects;
|
|
4
|
+
using UnityEngine;
|
|
5
|
+
|
|
6
|
+
namespace DREditor.TwoPointFiveD
|
|
7
|
+
{
|
|
8
|
+
/// <summary>
|
|
9
|
+
///
|
|
10
|
+
/// </summary>
|
|
11
|
+
[ClassHeader("")]
|
|
12
|
+
public class PrepareTPFDCameras : MonoBehaviour
|
|
13
|
+
{
|
|
14
|
+
/// <summary>
|
|
15
|
+
///
|
|
16
|
+
/// </summary>
|
|
17
|
+
[Tooltip("")]
|
|
18
|
+
[SerializeField] protected string prepareTPFDCameraEventString = "PrepareCamerasTPFD";
|
|
19
|
+
|
|
20
|
+
/// <summary>
|
|
21
|
+
///
|
|
22
|
+
/// </summary>
|
|
23
|
+
[Tooltip("")]
|
|
24
|
+
[SerializeField] protected SceneEventListener prepareTPFD = null;
|
|
25
|
+
|
|
26
|
+
/// <summary>
|
|
27
|
+
///
|
|
28
|
+
/// </summary>
|
|
29
|
+
[Tooltip("")]
|
|
30
|
+
[SerializeField] protected float angleThreshold = 180;
|
|
31
|
+
|
|
32
|
+
|
|
33
|
+
/// <summary>
|
|
34
|
+
///
|
|
35
|
+
/// </summary>
|
|
36
|
+
protected virtual void OnEnable() => prepareTPFD.Response.AddListener(PrepareForTPFD);
|
|
37
|
+
|
|
38
|
+
/// <summary>
|
|
39
|
+
///
|
|
40
|
+
/// </summary>
|
|
41
|
+
protected virtual void OnDisable() => prepareTPFD.Response.RemoveListener(PrepareForTPFD);
|
|
42
|
+
|
|
43
|
+
/// <summary>
|
|
44
|
+
///
|
|
45
|
+
/// </summary>
|
|
46
|
+
protected virtual void PrepareForTPFD()
|
|
47
|
+
{
|
|
48
|
+
foreach (TPFDManagerBase manager in FindObjectsByType<TPFDManagerBase>())
|
|
49
|
+
if (InitializeValidActiveManager(manager))
|
|
50
|
+
break;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
/// <summary>
|
|
54
|
+
///
|
|
55
|
+
/// </summary>
|
|
56
|
+
/// <param name="manager"></param>
|
|
57
|
+
/// <returns></returns>
|
|
58
|
+
protected virtual bool InitializeValidActiveManager(TPFDManagerBase manager)
|
|
59
|
+
{
|
|
60
|
+
bool result = manager != null && manager.enabled;
|
|
61
|
+
|
|
62
|
+
if (result)
|
|
63
|
+
{
|
|
64
|
+
manager.Start();
|
|
65
|
+
|
|
66
|
+
DialogueEventSystem.TriggerEvent(prepareTPFDCameraEventString, manager.GetInitialHAngle() >= angleThreshold);
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
return result;
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
72
|
}
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
fileFormatVersion: 2
|
|
2
|
-
guid: ab7b5027e631c3e479ca0a7c3d00688c
|
|
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: ab7b5027e631c3e479ca0a7c3d00688c
|
|
3
|
+
MonoImporter:
|
|
4
|
+
externalObjects: {}
|
|
5
|
+
serializedVersion: 2
|
|
6
|
+
defaultReferences: []
|
|
7
|
+
executionOrder: 0
|
|
8
|
+
icon: {instanceID: 0}
|
|
9
|
+
userData:
|
|
10
|
+
assetBundleName:
|
|
11
|
+
assetBundleVariant:
|