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.
Files changed (38) hide show
  1. package/.attestation.p7m +0 -0
  2. package/CameraArrow.cs +127 -127
  3. package/CameraArrow.cs.meta +17 -17
  4. package/CameraArrowManager.cs +243 -243
  5. package/CameraArrowManager.cs.meta +11 -11
  6. package/CameraArrowVisibility.cs +118 -118
  7. package/CameraArrowVisibility.cs.meta +1 -1
  8. package/DREditor.TwoPointFiveD.asmdef +17 -17
  9. package/DREditor.TwoPointFiveD.asmdef.meta +7 -7
  10. package/DialogueEventOnDestroy.cs +37 -37
  11. package/DialogueEventOnDestroy.cs.meta +11 -11
  12. package/ITPFDListener.cs +20 -20
  13. package/ITPFDListener.cs.meta +11 -11
  14. package/PrepareTPFDCameras.cs +71 -71
  15. package/PrepareTPFDCameras.cs.meta +11 -11
  16. package/{Samples → Samples~}/Arrow_Canvas_Template.prefab +939 -939
  17. package/{Samples → Samples~}/Arrow_Canvas_Template.prefab.meta +7 -7
  18. package/{Samples → Samples~}/Camera_Arrow.prefab +218 -218
  19. package/{Samples → Samples~}/Camera_Arrow.prefab.meta +7 -7
  20. package/{Samples → Samples~}/PrepareTPFD.asset +14 -14
  21. package/{Samples → Samples~}/PrepareTPFD.asset.meta +8 -8
  22. package/{Samples → Samples~}/Prepare_TPFD_Cameras.prefab +137 -137
  23. package/{Samples → Samples~}/Prepare_TPFD_Cameras.prefab.meta +7 -7
  24. package/{Samples → Samples~}/Prepare_TPFD_Listener.prefab +51 -51
  25. package/{Samples → Samples~}/Prepare_TPFD_Listener.prefab.meta +7 -7
  26. package/{Samples → Samples~}/TPFD_Manager.prefab +63 -63
  27. package/{Samples → Samples~}/TPFD_Manager.prefab.meta +7 -7
  28. package/{Samples → Samples~}/TPFD_Move_In_Dialogue_Handler.prefab +56 -56
  29. package/{Samples → Samples~}/TPFD_Move_In_Dialogue_Handler.prefab.meta +7 -7
  30. package/TPFDManager.cs +149 -149
  31. package/TPFDManager.cs.meta +11 -11
  32. package/TPFDManagerBase.cs +186 -186
  33. package/TPFDManagerBase.cs.meta +11 -11
  34. package/TPFDMoveInDialogueHandler.cs +185 -185
  35. package/TPFDMoveInDialogueHandler.cs.meta +11 -11
  36. package/package.json +41 -36
  37. package/package.json.meta +7 -7
  38. package/Samples.meta +0 -8
@@ -1,7 +1,7 @@
1
- fileFormatVersion: 2
2
- guid: e7567f4683c7f3649b422793d642e5e4
3
- PrefabImporter:
4
- externalObjects: {}
5
- userData:
6
- assetBundleName:
7
- assetBundleVariant:
1
+ fileFormatVersion: 2
2
+ guid: e7567f4683c7f3649b422793d642e5e4
3
+ PrefabImporter:
4
+ externalObjects: {}
5
+ userData:
6
+ assetBundleName:
7
+ assetBundleVariant:
package/TPFDManager.cs CHANGED
@@ -1,150 +1,150 @@
1
- //Author: Benjamin "Sweden" Jillson : Discord: sweden_gaming For Project Eden's Garden
2
- using DREditor.Cameras;
3
- using DREditor.Dialogues.Events;
4
- using System.Collections.Generic;
5
- using System.Linq;
6
- using UnityEngine;
7
-
8
- namespace DREditor.TwoPointFiveD
9
- {
10
- /// <summary>
11
- ///
12
- /// </summary>
13
- [ClassHeader("")]
14
- public class TPFDManager : TPFDManagerBase
15
- {
16
- /// <summary>
17
- ///
18
- /// </summary>
19
- [Tooltip("")]
20
- [SerializeField] protected string mainCameraTag = "MainCamera";
21
-
22
- /// <summary>
23
- ///
24
- /// </summary>
25
- [Tooltip("")]
26
- [SerializeField] protected string playerTag = "Player";
27
-
28
- /// <summary>
29
- ///
30
- /// </summary>
31
- [Tooltip("")]
32
- [SerializeField] protected List<string> dialogueOnDestroyEvents = new() { "ResetProtagCamera" };
33
-
34
-
35
- /// <summary>
36
- ///
37
- /// </summary>
38
- protected GameObject mainCamera = null;
39
-
40
- /// <summary>
41
- ///
42
- /// </summary>
43
- protected GameObject protag;
44
-
45
- /// <summary>
46
- ///
47
- /// </summary>
48
- protected GameObject player;
49
-
50
- /// <summary>
51
- ///
52
- /// </summary>
53
- protected IEnumerable<ITPFDListener> listeners;
54
-
55
-
56
- /// <inheritdoc/>
57
- public override void Start()
58
- {
59
- if (mainCamera != null)
60
- return;
61
-
62
- base.Start();
63
- }
64
-
65
- /// <inheritdoc/>
66
- public override void InitializeTPFD()
67
- {
68
- mainCamera = GameObject.FindWithTag(mainCameraTag);
69
-
70
- pncCamera = mainCamera.GetComponent<PnCCamera>();
71
-
72
- player = GameObject.FindWithTag(playerTag);
73
-
74
- protag = player.GetComponentInChildren<UnityEngine.Camera>().gameObject;
75
-
76
- listeners = FindObjectsByType<MonoBehaviour>().OfType<ITPFDListener>();
77
- }
78
-
79
- /// <inheritdoc/>
80
- protected override void SetProtagCameraPosition()
81
- {
82
- protag.transform.localPosition = ProtagPosition;
83
-
84
- protag.transform.localEulerAngles = ProtagRotation;
85
- }
86
-
87
-
88
- /// <inheritdoc/>
89
- protected override void CheckAllBoundaries()
90
- {
91
- CheckBoundary(pncCamera.CamVAngle == TAngle, 0);
92
-
93
- CheckBoundary(pncCamera.CamVAngle == -BAngle, 1);
94
-
95
- CheckBoundary(pncCamera.CamHAngle == -LAngle, 2);
96
-
97
- CheckBoundary(pncCamera.CamHAngle == RAngle, 3);
98
- }
99
-
100
- /// <summary>
101
- ///
102
- /// </summary>
103
- /// <param name="hittingBoundary"></param>
104
- /// <param name="directionIndex"></param>
105
- protected virtual void CheckBoundary(bool hittingBoundary, int directionIndex)
106
- {
107
- if (hittingBoundary)
108
- OnBoundaryEntered(directionIndex);
109
- else
110
- OnBoundaryExited(directionIndex);
111
- }
112
-
113
- /// <summary>
114
- ///
115
- /// </summary>
116
- /// <param name="directionIndex"></param>
117
- protected virtual void OnBoundaryEntered(int directionIndex)
118
- {
119
- foreach (var listener in listeners)
120
- listener.OnEnteredBoundary(directionIndex);
121
- }
122
-
123
- /// <summary>
124
- ///
125
- /// </summary>
126
- /// <param name="directionIndex"></param>
127
- protected virtual void OnBoundaryExited(int directionIndex)
128
- {
129
- foreach (var listener in listeners)
130
- listener.OnExitedBoundary(directionIndex);
131
- }
132
-
133
-
134
- /// <summary>
135
- ///
136
- /// </summary>
137
- protected virtual void OnDestroy()
138
- {
139
- foreach (string dialogueEvent in dialogueOnDestroyEvents)
140
- DialogueEventSystem.TriggerEvent(dialogueEvent);
141
- }
142
-
143
-
144
- /// <summary>
145
- ///
146
- /// </summary>
147
- [ContextMenu("Move Protag Camera To Protag Position")]
148
- public void ContextSetProtagCamera() => SetProtagCameraPosition();
149
- }
1
+ //Author: Benjamin "Sweden" Jillson : Discord: sweden_gaming For Project Eden's Garden
2
+ using DREditor.Cameras;
3
+ using DREditor.Dialogues.Events;
4
+ using System.Collections.Generic;
5
+ using System.Linq;
6
+ using UnityEngine;
7
+
8
+ namespace DREditor.TwoPointFiveD
9
+ {
10
+ /// <summary>
11
+ ///
12
+ /// </summary>
13
+ [ClassHeader("")]
14
+ public class TPFDManager : TPFDManagerBase
15
+ {
16
+ /// <summary>
17
+ ///
18
+ /// </summary>
19
+ [Tooltip("")]
20
+ [SerializeField] protected string mainCameraTag = "MainCamera";
21
+
22
+ /// <summary>
23
+ ///
24
+ /// </summary>
25
+ [Tooltip("")]
26
+ [SerializeField] protected string playerTag = "Player";
27
+
28
+ /// <summary>
29
+ ///
30
+ /// </summary>
31
+ [Tooltip("")]
32
+ [SerializeField] protected List<string> dialogueOnDestroyEvents = new() { "ResetProtagCamera" };
33
+
34
+
35
+ /// <summary>
36
+ ///
37
+ /// </summary>
38
+ protected GameObject mainCamera = null;
39
+
40
+ /// <summary>
41
+ ///
42
+ /// </summary>
43
+ protected GameObject protag;
44
+
45
+ /// <summary>
46
+ ///
47
+ /// </summary>
48
+ protected GameObject player;
49
+
50
+ /// <summary>
51
+ ///
52
+ /// </summary>
53
+ protected IEnumerable<ITPFDListener> listeners;
54
+
55
+
56
+ /// <inheritdoc/>
57
+ public override void Start()
58
+ {
59
+ if (mainCamera != null)
60
+ return;
61
+
62
+ base.Start();
63
+ }
64
+
65
+ /// <inheritdoc/>
66
+ public override void InitializeTPFD()
67
+ {
68
+ mainCamera = GameObject.FindWithTag(mainCameraTag);
69
+
70
+ pncCamera = mainCamera.GetComponent<PnCCamera>();
71
+
72
+ player = GameObject.FindWithTag(playerTag);
73
+
74
+ protag = player.GetComponentInChildren<UnityEngine.Camera>().gameObject;
75
+
76
+ listeners = FindObjectsByType<MonoBehaviour>().OfType<ITPFDListener>();
77
+ }
78
+
79
+ /// <inheritdoc/>
80
+ protected override void SetProtagCameraPosition()
81
+ {
82
+ protag.transform.localPosition = ProtagPosition;
83
+
84
+ protag.transform.localEulerAngles = ProtagRotation;
85
+ }
86
+
87
+
88
+ /// <inheritdoc/>
89
+ protected override void CheckAllBoundaries()
90
+ {
91
+ CheckBoundary(pncCamera.CamVAngle == TAngle, 0);
92
+
93
+ CheckBoundary(pncCamera.CamVAngle == -BAngle, 1);
94
+
95
+ CheckBoundary(pncCamera.CamHAngle == -LAngle, 2);
96
+
97
+ CheckBoundary(pncCamera.CamHAngle == RAngle, 3);
98
+ }
99
+
100
+ /// <summary>
101
+ ///
102
+ /// </summary>
103
+ /// <param name="hittingBoundary"></param>
104
+ /// <param name="directionIndex"></param>
105
+ protected virtual void CheckBoundary(bool hittingBoundary, int directionIndex)
106
+ {
107
+ if (hittingBoundary)
108
+ OnBoundaryEntered(directionIndex);
109
+ else
110
+ OnBoundaryExited(directionIndex);
111
+ }
112
+
113
+ /// <summary>
114
+ ///
115
+ /// </summary>
116
+ /// <param name="directionIndex"></param>
117
+ protected virtual void OnBoundaryEntered(int directionIndex)
118
+ {
119
+ foreach (var listener in listeners)
120
+ listener.OnEnteredBoundary(directionIndex);
121
+ }
122
+
123
+ /// <summary>
124
+ ///
125
+ /// </summary>
126
+ /// <param name="directionIndex"></param>
127
+ protected virtual void OnBoundaryExited(int directionIndex)
128
+ {
129
+ foreach (var listener in listeners)
130
+ listener.OnExitedBoundary(directionIndex);
131
+ }
132
+
133
+
134
+ /// <summary>
135
+ ///
136
+ /// </summary>
137
+ protected virtual void OnDestroy()
138
+ {
139
+ foreach (string dialogueEvent in dialogueOnDestroyEvents)
140
+ DialogueEventSystem.TriggerEvent(dialogueEvent);
141
+ }
142
+
143
+
144
+ /// <summary>
145
+ ///
146
+ /// </summary>
147
+ [ContextMenu("Move Protag Camera To Protag Position")]
148
+ public void ContextSetProtagCamera() => SetProtagCameraPosition();
149
+ }
150
150
  }
@@ -1,11 +1,11 @@
1
- fileFormatVersion: 2
2
- guid: 32a34ceb1310b9a4c85b7294750d7bce
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: 32a34ceb1310b9a4c85b7294750d7bce
3
+ MonoImporter:
4
+ externalObjects: {}
5
+ serializedVersion: 2
6
+ defaultReferences: []
7
+ executionOrder: 0
8
+ icon: {instanceID: 0}
9
+ userData:
10
+ assetBundleName:
11
+ assetBundleVariant: