net.dreditor.twopointfived 0.1.6 → 0.1.7
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/.attestation.p7m
ADDED
|
Binary file
|
package/CameraArrow.cs
CHANGED
|
@@ -1,128 +1,128 @@
|
|
|
1
|
-
//Author: Benjamin "Sweden" Jillson : Discord: sweden_gaming For Project Eden's Garden
|
|
2
|
-
#if DOTWEEN
|
|
3
|
-
using DG.Tweening;
|
|
4
|
-
#endif
|
|
5
|
-
using DREditor.EventObjects;
|
|
6
|
-
using DREditor.UIHandling;
|
|
7
|
-
using UnityEngine;
|
|
8
|
-
|
|
9
|
-
namespace DREditor.TwoPointFiveD
|
|
10
|
-
{
|
|
11
|
-
/// <summary>
|
|
12
|
-
///
|
|
13
|
-
/// </summary>
|
|
14
|
-
[ClassHeader(nameof(ITPFDListener) +
|
|
15
|
-
"\n\n")]
|
|
16
|
-
public class CameraArrow : MonoBehaviour, ITPFDListener
|
|
17
|
-
{
|
|
18
|
-
/// <summary>
|
|
19
|
-
///
|
|
20
|
-
/// </summary>
|
|
21
|
-
enum Direction
|
|
22
|
-
{
|
|
23
|
-
Up, Down, Left, Right
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
/// <summary>
|
|
27
|
-
///
|
|
28
|
-
/// </summary>
|
|
29
|
-
[Tooltip("")]
|
|
30
|
-
[SerializeField] protected BoolWithEvent inTPFD = null;
|
|
31
|
-
|
|
32
|
-
/// <summary>
|
|
33
|
-
///
|
|
34
|
-
/// </summary>
|
|
35
|
-
[Tooltip("")]
|
|
36
|
-
[SerializeField] protected UIVisibilityComponent arrow = null;
|
|
37
|
-
|
|
38
|
-
/// <summary>
|
|
39
|
-
///
|
|
40
|
-
/// </summary>
|
|
41
|
-
[Tooltip("")]
|
|
42
|
-
[SerializeField] protected UIVisibilityComponent cancel = null;
|
|
43
|
-
|
|
44
|
-
/// <summary>
|
|
45
|
-
///
|
|
46
|
-
/// </summary>
|
|
47
|
-
[Tooltip("")]
|
|
48
|
-
[SerializeField] private Direction direction;
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
/// <summary>
|
|
52
|
-
///
|
|
53
|
-
/// </summary>
|
|
54
|
-
protected bool inCancel = false;
|
|
55
|
-
|
|
56
|
-
/// <summary>
|
|
57
|
-
///
|
|
58
|
-
/// </summary>
|
|
59
|
-
protected bool canChange = false;
|
|
60
|
-
|
|
61
|
-
/// <summary>
|
|
62
|
-
///
|
|
63
|
-
/// </summary>
|
|
64
|
-
protected UIVisibilityComponent current;
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
protected virtual void Start()
|
|
68
|
-
{
|
|
69
|
-
current = arrow;
|
|
70
|
-
|
|
71
|
-
current.Show();
|
|
72
|
-
}
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
/// <inheritdoc/>
|
|
76
|
-
public virtual void OnEnteredBoundary(int directionIndex)
|
|
77
|
-
{
|
|
78
|
-
if (!inCancel && directionIndex == (int)direction)
|
|
79
|
-
{
|
|
80
|
-
inCancel = true;
|
|
81
|
-
|
|
82
|
-
if (!inTPFD.Value)
|
|
83
|
-
SetCanChange(false);
|
|
84
|
-
else
|
|
85
|
-
ChangeArrowVisual(cancel, arrow);
|
|
86
|
-
}
|
|
87
|
-
}
|
|
88
|
-
|
|
89
|
-
/// <inheritdoc/>
|
|
90
|
-
public virtual void OnExitedBoundary(int directionIndex)
|
|
91
|
-
{
|
|
92
|
-
if (inCancel && directionIndex == (int)direction)
|
|
93
|
-
{
|
|
94
|
-
inCancel = false;
|
|
95
|
-
|
|
96
|
-
if (!inTPFD.Value)
|
|
97
|
-
SetCanChange(false);
|
|
98
|
-
else
|
|
99
|
-
ChangeArrowVisual(arrow, cancel);
|
|
100
|
-
}
|
|
101
|
-
}
|
|
102
|
-
|
|
103
|
-
/// <summary>
|
|
104
|
-
///
|
|
105
|
-
/// </summary>
|
|
106
|
-
/// <param name="to"></param>
|
|
107
|
-
/// <param name="from"></param>
|
|
108
|
-
protected virtual void ChangeArrowVisual(UIVisibilityComponent to, UIVisibilityComponent from)
|
|
109
|
-
{
|
|
110
|
-
if (!canChange)
|
|
111
|
-
return;
|
|
112
|
-
#if DOTWEEN
|
|
113
|
-
to.DOKill();
|
|
114
|
-
from.DOKill();
|
|
115
|
-
#endif
|
|
116
|
-
to.Show();
|
|
117
|
-
from.Hide();
|
|
118
|
-
|
|
119
|
-
current = to;
|
|
120
|
-
}
|
|
121
|
-
|
|
122
|
-
/// <summary>
|
|
123
|
-
///
|
|
124
|
-
/// </summary>
|
|
125
|
-
/// <param name="canChange"></param>
|
|
126
|
-
public virtual void SetCanChange(bool canChange) => this.canChange = canChange;
|
|
127
|
-
}
|
|
1
|
+
//Author: Benjamin "Sweden" Jillson : Discord: sweden_gaming For Project Eden's Garden
|
|
2
|
+
#if DOTWEEN
|
|
3
|
+
using DG.Tweening;
|
|
4
|
+
#endif
|
|
5
|
+
using DREditor.EventObjects;
|
|
6
|
+
using DREditor.UIHandling;
|
|
7
|
+
using UnityEngine;
|
|
8
|
+
|
|
9
|
+
namespace DREditor.TwoPointFiveD
|
|
10
|
+
{
|
|
11
|
+
/// <summary>
|
|
12
|
+
///
|
|
13
|
+
/// </summary>
|
|
14
|
+
[ClassHeader(nameof(ITPFDListener) +
|
|
15
|
+
"\n\n")]
|
|
16
|
+
public class CameraArrow : MonoBehaviour, ITPFDListener
|
|
17
|
+
{
|
|
18
|
+
/// <summary>
|
|
19
|
+
///
|
|
20
|
+
/// </summary>
|
|
21
|
+
enum Direction
|
|
22
|
+
{
|
|
23
|
+
Up, Down, Left, Right
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
/// <summary>
|
|
27
|
+
///
|
|
28
|
+
/// </summary>
|
|
29
|
+
[Tooltip("")]
|
|
30
|
+
[SerializeField] protected BoolWithEvent inTPFD = null;
|
|
31
|
+
|
|
32
|
+
/// <summary>
|
|
33
|
+
///
|
|
34
|
+
/// </summary>
|
|
35
|
+
[Tooltip("")]
|
|
36
|
+
[SerializeField] protected UIVisibilityComponent arrow = null;
|
|
37
|
+
|
|
38
|
+
/// <summary>
|
|
39
|
+
///
|
|
40
|
+
/// </summary>
|
|
41
|
+
[Tooltip("")]
|
|
42
|
+
[SerializeField] protected UIVisibilityComponent cancel = null;
|
|
43
|
+
|
|
44
|
+
/// <summary>
|
|
45
|
+
///
|
|
46
|
+
/// </summary>
|
|
47
|
+
[Tooltip("")]
|
|
48
|
+
[SerializeField] private Direction direction;
|
|
49
|
+
|
|
50
|
+
|
|
51
|
+
/// <summary>
|
|
52
|
+
///
|
|
53
|
+
/// </summary>
|
|
54
|
+
protected bool inCancel = false;
|
|
55
|
+
|
|
56
|
+
/// <summary>
|
|
57
|
+
///
|
|
58
|
+
/// </summary>
|
|
59
|
+
protected bool canChange = false;
|
|
60
|
+
|
|
61
|
+
/// <summary>
|
|
62
|
+
///
|
|
63
|
+
/// </summary>
|
|
64
|
+
protected UIVisibilityComponent current;
|
|
65
|
+
|
|
66
|
+
|
|
67
|
+
protected virtual void Start()
|
|
68
|
+
{
|
|
69
|
+
current = arrow;
|
|
70
|
+
|
|
71
|
+
current.Show();
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
|
|
75
|
+
/// <inheritdoc/>
|
|
76
|
+
public virtual void OnEnteredBoundary(int directionIndex)
|
|
77
|
+
{
|
|
78
|
+
if (!inCancel && directionIndex == (int)direction)
|
|
79
|
+
{
|
|
80
|
+
inCancel = true;
|
|
81
|
+
|
|
82
|
+
if (!inTPFD.Value)
|
|
83
|
+
SetCanChange(false);
|
|
84
|
+
else
|
|
85
|
+
ChangeArrowVisual(cancel, arrow);
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
/// <inheritdoc/>
|
|
90
|
+
public virtual void OnExitedBoundary(int directionIndex)
|
|
91
|
+
{
|
|
92
|
+
if (inCancel && directionIndex == (int)direction)
|
|
93
|
+
{
|
|
94
|
+
inCancel = false;
|
|
95
|
+
|
|
96
|
+
if (!inTPFD.Value)
|
|
97
|
+
SetCanChange(false);
|
|
98
|
+
else
|
|
99
|
+
ChangeArrowVisual(arrow, cancel);
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
/// <summary>
|
|
104
|
+
///
|
|
105
|
+
/// </summary>
|
|
106
|
+
/// <param name="to"></param>
|
|
107
|
+
/// <param name="from"></param>
|
|
108
|
+
protected virtual void ChangeArrowVisual(UIVisibilityComponent to, UIVisibilityComponent from)
|
|
109
|
+
{
|
|
110
|
+
if (!canChange)
|
|
111
|
+
return;
|
|
112
|
+
#if DOTWEEN
|
|
113
|
+
to.DOKill();
|
|
114
|
+
from.DOKill();
|
|
115
|
+
#endif
|
|
116
|
+
to.Show();
|
|
117
|
+
from.Hide();
|
|
118
|
+
|
|
119
|
+
current = to;
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
/// <summary>
|
|
123
|
+
///
|
|
124
|
+
/// </summary>
|
|
125
|
+
/// <param name="canChange"></param>
|
|
126
|
+
public virtual void SetCanChange(bool canChange) => this.canChange = canChange;
|
|
127
|
+
}
|
|
128
128
|
}
|
package/CameraArrow.cs.meta
CHANGED
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
fileFormatVersion: 2
|
|
2
|
-
guid: 8ec8900f2a5e2374b9c482048a5ee1ac
|
|
3
|
-
MonoImporter:
|
|
4
|
-
externalObjects: {}
|
|
5
|
-
serializedVersion: 2
|
|
6
|
-
defaultReferences:
|
|
7
|
-
- arrow: {instanceID: 0}
|
|
8
|
-
- cancel: {instanceID: 0}
|
|
9
|
-
- inDialogue: {fileID: 11400000, guid: b2839fc222ba4bc4eb8bcfee73b0c53d, type: 2}
|
|
10
|
-
- inLeaveProcess: {fileID: 11400000, guid: 787d287b8159b5049bbd73ee10c03b1b, type: 2}
|
|
11
|
-
- inTPFD: {fileID: 11400000, guid: 7f90df5202cae904292188e37c9076d3, type: 2}
|
|
12
|
-
- isLoadingFile: {fileID: 11400000, guid: 1d94fdc8796dc9f43b2a3bedb0f5d4dd, type: 2}
|
|
13
|
-
executionOrder: 0
|
|
14
|
-
icon: {instanceID: 0}
|
|
15
|
-
userData:
|
|
16
|
-
assetBundleName:
|
|
17
|
-
assetBundleVariant:
|
|
1
|
+
fileFormatVersion: 2
|
|
2
|
+
guid: 8ec8900f2a5e2374b9c482048a5ee1ac
|
|
3
|
+
MonoImporter:
|
|
4
|
+
externalObjects: {}
|
|
5
|
+
serializedVersion: 2
|
|
6
|
+
defaultReferences:
|
|
7
|
+
- arrow: {instanceID: 0}
|
|
8
|
+
- cancel: {instanceID: 0}
|
|
9
|
+
- inDialogue: {fileID: 11400000, guid: b2839fc222ba4bc4eb8bcfee73b0c53d, type: 2}
|
|
10
|
+
- inLeaveProcess: {fileID: 11400000, guid: 787d287b8159b5049bbd73ee10c03b1b, type: 2}
|
|
11
|
+
- inTPFD: {fileID: 11400000, guid: 7f90df5202cae904292188e37c9076d3, type: 2}
|
|
12
|
+
- isLoadingFile: {fileID: 11400000, guid: 1d94fdc8796dc9f43b2a3bedb0f5d4dd, type: 2}
|
|
13
|
+
executionOrder: 0
|
|
14
|
+
icon: {instanceID: 0}
|
|
15
|
+
userData:
|
|
16
|
+
assetBundleName:
|
|
17
|
+
assetBundleVariant:
|