net.dreditor.minigames.ca 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 (193) hide show
  1. package/.attestation.p7m +0 -0
  2. package/ArgumentBuilder.cs +80 -80
  3. package/ArgumentBuilder.cs.meta +11 -11
  4. package/ArgumentPage.cs +36 -36
  5. package/ArgumentPage.cs.meta +11 -11
  6. package/ArgumentQuestionPanel.cs +136 -136
  7. package/ArgumentQuestionPanel.cs.meta +11 -11
  8. package/ClosingArgumentSettings.cs +23 -23
  9. package/ClosingArgumentSettings.cs.meta +11 -11
  10. package/ClosingArgumentStockBase.cs +250 -250
  11. package/ClosingArgumentStockBase.cs.meta +11 -11
  12. package/DREditor.Minigames.CA.asmdef +24 -24
  13. package/DREditor.Minigames.CA.asmdef.meta +7 -7
  14. package/Editor/ArgumentBuilderEditor.cs +139 -139
  15. package/Editor/ArgumentBuilderEditor.cs.meta +12 -12
  16. package/Editor/ArgumentPageEditor.cs +283 -283
  17. package/Editor/ArgumentPageEditor.cs.meta +11 -11
  18. package/Editor/ArgumentPanelEditor.cs +141 -141
  19. package/Editor/ArgumentPanelEditor.cs.meta +11 -11
  20. package/Editor/ArgumentStockEditor.cs +167 -167
  21. package/Editor/ArgumentStockEditor.cs.meta +11 -11
  22. package/Editor/CAHandyFields.cs +32 -32
  23. package/Editor/CAHandyFields.cs.meta +1 -1
  24. package/Editor/DREditor.Minigames.CA.Editor.asmdef +20 -20
  25. package/Editor/DREditor.Minigames.CA.Editor.asmdef.meta +7 -7
  26. package/Editor/PreviewableArgumentBuilderEditor.cs +286 -286
  27. package/Editor/PreviewableArgumentBuilderEditor.cs.meta +12 -12
  28. package/Editor.meta +8 -8
  29. package/IActiveStockPanel.cs +36 -36
  30. package/IActiveStockPanel.cs.meta +11 -11
  31. package/IArgumentPreviewInitializer.cs +19 -19
  32. package/IArgumentPreviewInitializer.cs.meta +11 -11
  33. package/IClosingArgumentListener.cs +17 -17
  34. package/IClosingArgumentListener.cs.meta +11 -11
  35. package/IClosingArgumentPagePreviewer.cs +16 -16
  36. package/IClosingArgumentPagePreviewer.cs.meta +11 -11
  37. package/IClosingArgumentResetable.cs +15 -15
  38. package/IClosingArgumentResetable.cs.meta +11 -11
  39. package/ILockPreview.cs +16 -16
  40. package/ILockPreview.cs.meta +11 -11
  41. package/IPageListener.cs +17 -17
  42. package/IPageListener.cs.meta +11 -11
  43. package/IPagesInitializer.cs +17 -17
  44. package/IPagesInitializer.cs.meta +11 -11
  45. package/ITotalStockListener.cs +16 -16
  46. package/ITotalStockListener.cs.meta +11 -11
  47. package/Managers/ArgumentInitializerBase.cs +17 -17
  48. package/Managers/ArgumentInitializerBase.cs.meta +11 -11
  49. package/Managers/ClosingArgumentInitializer.cs +128 -128
  50. package/Managers/ClosingArgumentInitializer.cs.meta +10 -10
  51. package/Managers/ClosingArgumentManager.cs +269 -269
  52. package/Managers/ClosingArgumentManager.cs.meta +10 -10
  53. package/Managers/ClosingArgumentManagerBase.cs +146 -146
  54. package/Managers/ClosingArgumentManagerBase.cs.meta +11 -11
  55. package/Managers/ClosingArgumentPreviewInitializer.cs +80 -80
  56. package/Managers/ClosingArgumentPreviewInitializer.cs.meta +17 -17
  57. package/Managers.meta +8 -8
  58. package/Pages/IPageInitializer.cs +23 -23
  59. package/Pages/IPageInitializer.cs.meta +11 -11
  60. package/Pages/MainPagePreviewer.cs +66 -66
  61. package/Pages/MainPagePreviewer.cs.meta +11 -11
  62. package/Pages/MiniPageInitializer.cs +144 -144
  63. package/Pages/MiniPageInitializer.cs.meta +11 -11
  64. package/Pages/MoveMainPagesComponent.cs +163 -163
  65. package/Pages/MoveMainPagesComponent.cs.meta +11 -11
  66. package/Pages/MovePageComponent.cs +104 -104
  67. package/Pages/MovePageComponent.cs.meta +11 -11
  68. package/Pages/MovePageHandler.cs +215 -215
  69. package/Pages/MovePageHandler.cs.meta +11 -11
  70. package/Pages/PageArrows.cs +124 -124
  71. package/Pages/PageArrows.cs.meta +11 -11
  72. package/Pages/PageCounter.cs +65 -65
  73. package/Pages/PageCounter.cs.meta +11 -11
  74. package/Pages/PageHandlerBase.cs +30 -30
  75. package/Pages/PageHandlerBase.cs.meta +11 -11
  76. package/Pages/PageInitializer.cs +195 -195
  77. package/Pages/PageInitializer.cs.meta +11 -11
  78. package/Pages/PageInitializerBase.cs +65 -65
  79. package/Pages/PageInitializerBase.cs.meta +11 -11
  80. package/Pages/PagePreviewer.cs +57 -57
  81. package/Pages/PagePreviewer.cs.meta +11 -11
  82. package/Pages.meta +8 -8
  83. package/PanelInitializerBase.cs +147 -147
  84. package/PanelInitializerBase.cs.meta +11 -11
  85. package/Panels/ClosingArgumentReticle.cs +169 -169
  86. package/Panels/ClosingArgumentReticle.cs.meta +11 -11
  87. package/Panels/ClosingArgumentShooter.cs +153 -153
  88. package/Panels/ClosingArgumentShooter.cs.meta +11 -11
  89. package/Panels/CorrectMiniPanelUpdater.cs +45 -45
  90. package/Panels/CorrectMiniPanelUpdater.cs.meta +11 -11
  91. package/Panels/CorrectPanelUpdater.cs +24 -24
  92. package/Panels/CorrectPanelUpdater.cs.meta +11 -11
  93. package/Panels/PanelInitializer.cs +51 -51
  94. package/Panels/PanelInitializer.cs.meta +11 -11
  95. package/Panels/PreviewPanelInitializer.cs +58 -58
  96. package/Panels/PreviewPanelInitializer.cs.meta +11 -11
  97. package/Panels/QuestionPanel.cs +143 -143
  98. package/Panels/QuestionPanel.cs.meta +11 -11
  99. package/Panels/QuestionPanelBase.cs +68 -68
  100. package/Panels/QuestionPanelBase.cs.meta +11 -11
  101. package/Panels.meta +8 -8
  102. package/{Samples → Samples~}/CACameraEnabled.asset +21 -21
  103. package/{Samples → Samples~}/CACameraEnabled.asset.meta +8 -8
  104. package/{Samples → Samples~}/CAPanelTarget.asset +25 -25
  105. package/{Samples → Samples~}/CAPanelTarget.asset.meta +8 -8
  106. package/{Samples → Samples~}/CAResult.asset +21 -21
  107. package/{Samples → Samples~}/CAResult.asset.meta +8 -8
  108. package/{Samples → Samples~}/CA_Animations/CA_Page_Square/Being Hidden Top.anim +600 -600
  109. package/{Samples → Samples~}/CA_Animations/CA_Page_Square/Being Hidden Top.anim.meta +8 -8
  110. package/{Samples → Samples~}/CA_Animations/CA_Page_Square/Being Hidden.anim +600 -600
  111. package/{Samples → Samples~}/CA_Animations/CA_Page_Square/Being Hidden.anim.meta +8 -8
  112. package/{Samples → Samples~}/CA_Animations/CA_Page_Square/Being Shown Top.anim +600 -600
  113. package/{Samples → Samples~}/CA_Animations/CA_Page_Square/Being Shown Top.anim.meta +8 -8
  114. package/{Samples → Samples~}/CA_Animations/CA_Page_Square/Being Shown.anim +582 -582
  115. package/{Samples → Samples~}/CA_Animations/CA_Page_Square/Being Shown.anim.meta +8 -8
  116. package/{Samples → Samples~}/CA_Animations/CA_Page_Square/Mystery Square.controller +188 -188
  117. package/{Samples → Samples~}/CA_Animations/CA_Page_Square/Mystery Square.controller.meta +8 -8
  118. package/{Samples → Samples~}/CA_Animations/CA_Page_Square.meta +8 -8
  119. package/{Samples → Samples~}/CA_Animations.meta +8 -8
  120. package/{Samples → Samples~}/Managers/CA_Camera.prefab +159 -159
  121. package/{Samples → Samples~}/Managers/CA_Camera.prefab.meta +7 -7
  122. package/{Samples → Samples~}/Managers/CA_Camera_Canvas.prefab +195 -195
  123. package/{Samples → Samples~}/Managers/CA_Camera_Canvas.prefab.meta +7 -7
  124. package/{Samples → Samples~}/Managers/CA_Manager_Preview_Shell.prefab +267 -267
  125. package/{Samples → Samples~}/Managers/CA_Manager_Preview_Shell.prefab.meta +7 -7
  126. package/{Samples → Samples~}/Managers/CA_Manager_Preview_Template.prefab +613 -613
  127. package/{Samples → Samples~}/Managers/CA_Manager_Preview_Template.prefab.meta +7 -7
  128. package/{Samples → Samples~}/Managers/CA_Manager_Shell.prefab +443 -443
  129. package/{Samples → Samples~}/Managers/CA_Manager_Shell.prefab.meta +7 -7
  130. package/{Samples → Samples~}/Managers/CA_Manager_Template.prefab +709 -709
  131. package/{Samples → Samples~}/Managers/CA_Manager_Template.prefab.meta +7 -7
  132. package/{Samples → Samples~}/Managers/CA_Result_UI_ETemplate.prefab +433 -433
  133. package/{Samples → Samples~}/Managers/CA_Result_UI_ETemplate.prefab.meta +7 -7
  134. package/{Samples → Samples~}/Managers.meta +8 -8
  135. package/{Samples → Samples~}/Pages/CA_Colliders.prefab +305 -305
  136. package/{Samples → Samples~}/Pages/CA_Colliders.prefab.meta +7 -7
  137. package/{Samples → Samples~}/Pages/CA_Main_Page_Arrows_ETemplate.prefab +221 -221
  138. package/{Samples → Samples~}/Pages/CA_Main_Page_Arrows_ETemplate.prefab.meta +7 -7
  139. package/{Samples → Samples~}/Pages/CA_Page_Gameplay_Shell.prefab +435 -435
  140. package/{Samples → Samples~}/Pages/CA_Page_Gameplay_Shell.prefab.meta +7 -7
  141. package/{Samples → Samples~}/Pages/CA_Page_Gameplay_Template.prefab +220 -220
  142. package/{Samples → Samples~}/Pages/CA_Page_Gameplay_Template.prefab.meta +7 -7
  143. package/{Samples → Samples~}/Pages/CA_Reticle_ETemplate.prefab +337 -337
  144. package/{Samples → Samples~}/Pages/CA_Reticle_ETemplate.prefab.meta +7 -7
  145. package/{Samples → Samples~}/Pages/CA_Reticle_Shooter_Template.prefab +148 -148
  146. package/{Samples → Samples~}/Pages/CA_Reticle_Shooter_Template.prefab.meta +7 -7
  147. package/{Samples → Samples~}/Pages/Mystery_Square_ETemplate.prefab +857 -857
  148. package/{Samples → Samples~}/Pages/Mystery_Square_ETemplate.prefab.meta +7 -7
  149. package/{Samples → Samples~}/Pages/Page_Add_Ons_ETemplate.prefab +203 -203
  150. package/{Samples → Samples~}/Pages/Page_Add_Ons_ETemplate.prefab.meta +7 -7
  151. package/{Samples → Samples~}/Pages/Page_ETemplate.prefab +256 -256
  152. package/{Samples → Samples~}/Pages/Page_ETemplate.prefab.meta +7 -7
  153. package/{Samples → Samples~}/Pages.meta +8 -8
  154. package/{Samples → Samples~}/Stocks/CA_Stock_Display_Shell.prefab +110 -110
  155. package/{Samples → Samples~}/Stocks/CA_Stock_Display_Shell.prefab.meta +7 -7
  156. package/{Samples → Samples~}/Stocks/CA_Stock_Display_Template.prefab +731 -731
  157. package/{Samples → Samples~}/Stocks/CA_Stock_Display_Template.prefab.meta +7 -7
  158. package/{Samples → Samples~}/Stocks/CA_Stock_ETemplate.prefab +427 -427
  159. package/{Samples → Samples~}/Stocks/CA_Stock_ETemplate.prefab.meta +7 -7
  160. package/{Samples → Samples~}/Stocks/CA_Stock_Parent_Shell.prefab +61 -61
  161. package/{Samples → Samples~}/Stocks/CA_Stock_Parent_Shell.prefab.meta +7 -7
  162. package/{Samples → Samples~}/Stocks/CA_Stock_Parent_Template.prefab +1017 -1017
  163. package/{Samples → Samples~}/Stocks/CA_Stock_Parent_Template.prefab.meta +7 -7
  164. package/{Samples → Samples~}/Stocks.meta +8 -8
  165. package/{Samples → Samples~}/UI/CA_Trial_Timer_Canvas_Template.prefab +229 -229
  166. package/{Samples → Samples~}/UI/CA_Trial_Timer_Canvas_Template.prefab.meta +7 -7
  167. package/{Samples → Samples~}/UI/CA_UI_Background_ETemplate.prefab +86 -86
  168. package/{Samples → Samples~}/UI/CA_UI_Background_ETemplate.prefab.meta +7 -7
  169. package/{Samples → Samples~}/UI/CA_UI_Pages_Decorations_Template.prefab +109 -109
  170. package/{Samples → Samples~}/UI/CA_UI_Pages_Decorations_Template.prefab.meta +7 -7
  171. package/{Samples → Samples~}/UI/CA_UI_Stock_Panel_ETemplate.prefab +464 -464
  172. package/{Samples → Samples~}/UI/CA_UI_Stock_Panel_ETemplate.prefab.meta +7 -7
  173. package/{Samples → Samples~}/UI/CA_UI_Template.prefab +261 -261
  174. package/{Samples → Samples~}/UI/CA_UI_Template.prefab.meta +7 -7
  175. package/{Samples → Samples~}/UI/Page_Counter_UI_ETemplate.prefab +831 -831
  176. package/{Samples → Samples~}/UI/Page_Counter_UI_ETemplate.prefab.meta +7 -7
  177. package/{Samples → Samples~}/UI.meta +8 -8
  178. package/Stocks/ActiveStockPanel.cs +177 -177
  179. package/Stocks/ActiveStockPanel.cs.meta +11 -11
  180. package/Stocks/ActiveStockPanelBase.cs +80 -80
  181. package/Stocks/ActiveStockPanelBase.cs.meta +11 -11
  182. package/Stocks/ActiveStockPanelStateable.cs +142 -142
  183. package/Stocks/ActiveStockPanelStateable.cs.meta +11 -11
  184. package/Stocks/ClosingArgumentStock.cs +120 -120
  185. package/Stocks/ClosingArgumentStock.cs.meta +11 -11
  186. package/Stocks/ShootCAStockVisibility.cs +133 -133
  187. package/Stocks/ShootCAStockVisibility.cs.meta +1 -1
  188. package/Stocks/StockParent.cs +127 -127
  189. package/Stocks/StockParent.cs.meta +11 -11
  190. package/Stocks.meta +8 -8
  191. package/package.json +46 -41
  192. package/package.json.meta +7 -7
  193. package/Samples.meta +0 -8
@@ -1,134 +1,134 @@
1
- // Original Author: Henry (Meowpixel)
2
- // Updated/Reworked by: Benjamin "Sweden" Jillson : Discord: sweden_gaming For Project Eden's Garden
3
- using DREditor.EventObjects;
4
- using DREditor.UIHandling;
5
- using System.Collections;
6
- using UnityEngine;
7
-
8
- namespace DREditor.Minigames.CA.Stocks
9
- {
10
- /// <summary>
11
- ///
12
- /// </summary>
13
- [ClassHeader(nameof(UIVisibilityComponent) + ", " + nameof(IUIVisibility) +
14
- "\n\n")]
15
- public class ShootCAStockVisibility : UIVisibilityComponent
16
- {
17
- /// <summary>
18
- ///
19
- /// </summary>
20
- [Tooltip("")]
21
- [SerializeField] protected Transform whitePanel = null;
22
-
23
- /// <summary>
24
- ///
25
- /// </summary>
26
- [Header("")]
27
- [Divider]
28
- [Tooltip("")]
29
- [SerializeField] protected Vector3 startingLocalPosition = Vector3.zero;
30
-
31
- /// <summary>
32
- ///
33
- /// </summary>
34
- [Tooltip("")]
35
- [SerializeField] protected Vector3 startingLocalScale = new(0.8f, 0.8f, 1);
36
-
37
- /// <summary>
38
- ///
39
- /// </summary>
40
- [Tooltip("")]
41
- [SerializeField] protected TransformWithEvent caPanelTarget = null;
42
-
43
- /// <summary>
44
- ///
45
- /// </summary>
46
- [Tooltip("")]
47
- [SerializeField] protected Vector3 targetLocalScale = new(0.2f, 0.2f, 1);
48
-
49
- /// <summary>
50
- ///
51
- /// </summary>
52
- [Tooltip("")]
53
- [SerializeField] protected float positionSpeedDivisor = 0.33333f;
54
-
55
- /// <summary>
56
- ///
57
- /// </summary>
58
- [Tooltip("")]
59
- [SerializeField] protected float scaleSpeedMultiplier = 2.7f;
60
-
61
-
62
- /// <summary>
63
- ///
64
- /// </summary>
65
- protected float positionSpeed;
66
-
67
-
68
- /// <inheritdoc/>
69
- protected virtual void Start() => HideUI();
70
-
71
- protected override void HideUI() => whitePanel.gameObject.SetActive(false);
72
-
73
- /// <inheritdoc/>
74
- protected override void ShowUI()
75
- {
76
- whitePanel.gameObject.SetActive(true);
77
-
78
- whitePanel.localPosition = startingLocalPosition;
79
-
80
- whitePanel.localScale = startingLocalScale;
81
- }
82
-
83
- /// <inheritdoc/>
84
- protected override IEnumerator WaitForUIToComplete()
85
- {
86
- InitializePositionSpeed();
87
-
88
- while (NotAtTargetPosition())
89
- {
90
- UpdateAnimation();
91
-
92
- yield return null;
93
- }
94
-
95
- HideUI();
96
- }
97
-
98
- /// <summary>
99
- ///
100
- /// </summary>
101
- protected virtual void InitializePositionSpeed() =>
102
- positionSpeed = (caPanelTarget.Value.Pos - whitePanel.position).magnitude / positionSpeedDivisor;
103
-
104
- /// <summary>
105
- ///
106
- /// </summary>
107
- /// <returns></returns>
108
- protected virtual bool NotAtTargetPosition() => whitePanel.position != caPanelTarget.Value.Pos;
109
-
110
- /// <summary>
111
- ///
112
- /// </summary>
113
- protected virtual void UpdateAnimation()
114
- {
115
- UpdateLocalPosition();
116
-
117
- UpdateLocalScale();
118
- }
119
-
120
- /// <summary>
121
- ///
122
- /// </summary>
123
- protected virtual void UpdateLocalPosition() =>
124
- whitePanel.position = Vector3
125
- .MoveTowards(whitePanel.position, caPanelTarget.Value.Pos, positionSpeed * Time.deltaTime);
126
-
127
- /// <summary>
128
- ///
129
- /// </summary>
130
- protected virtual void UpdateLocalScale() =>
131
- whitePanel.localScale = Vector3
132
- .MoveTowards(whitePanel.localScale, targetLocalScale, scaleSpeedMultiplier * Time.deltaTime);
133
- }
1
+ // Original Author: Henry (Meowpixel)
2
+ // Updated/Reworked by: Benjamin "Sweden" Jillson : Discord: sweden_gaming For Project Eden's Garden
3
+ using DREditor.EventObjects;
4
+ using DREditor.UIHandling;
5
+ using System.Collections;
6
+ using UnityEngine;
7
+
8
+ namespace DREditor.Minigames.CA.Stocks
9
+ {
10
+ /// <summary>
11
+ ///
12
+ /// </summary>
13
+ [ClassHeader(nameof(UIVisibilityComponent) + ", " + nameof(IUIVisibility) +
14
+ "\n\n")]
15
+ public class ShootCAStockVisibility : UIVisibilityComponent
16
+ {
17
+ /// <summary>
18
+ ///
19
+ /// </summary>
20
+ [Tooltip("")]
21
+ [SerializeField] protected Transform whitePanel = null;
22
+
23
+ /// <summary>
24
+ ///
25
+ /// </summary>
26
+ [Header("")]
27
+ [Divider]
28
+ [Tooltip("")]
29
+ [SerializeField] protected Vector3 startingLocalPosition = Vector3.zero;
30
+
31
+ /// <summary>
32
+ ///
33
+ /// </summary>
34
+ [Tooltip("")]
35
+ [SerializeField] protected Vector3 startingLocalScale = new(0.8f, 0.8f, 1);
36
+
37
+ /// <summary>
38
+ ///
39
+ /// </summary>
40
+ [Tooltip("")]
41
+ [SerializeField] protected TransformWithEvent caPanelTarget = null;
42
+
43
+ /// <summary>
44
+ ///
45
+ /// </summary>
46
+ [Tooltip("")]
47
+ [SerializeField] protected Vector3 targetLocalScale = new(0.2f, 0.2f, 1);
48
+
49
+ /// <summary>
50
+ ///
51
+ /// </summary>
52
+ [Tooltip("")]
53
+ [SerializeField] protected float positionSpeedDivisor = 0.33333f;
54
+
55
+ /// <summary>
56
+ ///
57
+ /// </summary>
58
+ [Tooltip("")]
59
+ [SerializeField] protected float scaleSpeedMultiplier = 2.7f;
60
+
61
+
62
+ /// <summary>
63
+ ///
64
+ /// </summary>
65
+ protected float positionSpeed;
66
+
67
+
68
+ /// <inheritdoc/>
69
+ protected virtual void Start() => HideUI();
70
+
71
+ protected override void HideUI() => whitePanel.gameObject.SetActive(false);
72
+
73
+ /// <inheritdoc/>
74
+ protected override void ShowUI()
75
+ {
76
+ whitePanel.gameObject.SetActive(true);
77
+
78
+ whitePanel.localPosition = startingLocalPosition;
79
+
80
+ whitePanel.localScale = startingLocalScale;
81
+ }
82
+
83
+ /// <inheritdoc/>
84
+ protected override IEnumerator WaitForUIToComplete()
85
+ {
86
+ InitializePositionSpeed();
87
+
88
+ while (NotAtTargetPosition())
89
+ {
90
+ UpdateAnimation();
91
+
92
+ yield return null;
93
+ }
94
+
95
+ HideUI();
96
+ }
97
+
98
+ /// <summary>
99
+ ///
100
+ /// </summary>
101
+ protected virtual void InitializePositionSpeed() =>
102
+ positionSpeed = (caPanelTarget.Value.Pos - whitePanel.position).magnitude / positionSpeedDivisor;
103
+
104
+ /// <summary>
105
+ ///
106
+ /// </summary>
107
+ /// <returns></returns>
108
+ protected virtual bool NotAtTargetPosition() => whitePanel.position != caPanelTarget.Value.Pos;
109
+
110
+ /// <summary>
111
+ ///
112
+ /// </summary>
113
+ protected virtual void UpdateAnimation()
114
+ {
115
+ UpdateLocalPosition();
116
+
117
+ UpdateLocalScale();
118
+ }
119
+
120
+ /// <summary>
121
+ ///
122
+ /// </summary>
123
+ protected virtual void UpdateLocalPosition() =>
124
+ whitePanel.position = Vector3
125
+ .MoveTowards(whitePanel.position, caPanelTarget.Value.Pos, positionSpeed * Time.deltaTime);
126
+
127
+ /// <summary>
128
+ ///
129
+ /// </summary>
130
+ protected virtual void UpdateLocalScale() =>
131
+ whitePanel.localScale = Vector3
132
+ .MoveTowards(whitePanel.localScale, targetLocalScale, scaleSpeedMultiplier * Time.deltaTime);
133
+ }
134
134
  }
@@ -1,2 +1,2 @@
1
- fileFormatVersion: 2
1
+ fileFormatVersion: 2
2
2
  guid: dfa70117ccc5ffb41bb90bd2b63ba921
@@ -1,128 +1,128 @@
1
- // Original Author: Henry (Meowpixel)
2
- // Updated/Reworked by: Benjamin "Sweden" Jillson : Discord: sweden_gaming For Project Eden's Garden
3
- using System.Collections.Generic;
4
- using UnityEditor;
5
- using UnityEngine;
6
-
7
- namespace DREditor.Minigames.CA.Stocks
8
- {
9
- /// <summary>
10
- ///
11
- /// </summary>
12
- [ClassHeader("")]
13
- public class StockParent : MonoBehaviour
14
- {
15
- /// <summary>
16
- ///
17
- /// </summary>
18
- [Tooltip("")]
19
- [SerializeField] protected GameObject stockPrefab = null;
20
-
21
- /// <summary>
22
- ///
23
- /// </summary>
24
- [Tooltip("")]
25
- [SerializeField] protected string indexNameDivider = "_";
26
-
27
- /// <summary>
28
- ///
29
- /// </summary>
30
- [Tooltip("")]
31
- [SerializeField] protected Vector3 rotation = new(0, 0, -8);
32
-
33
- /// <summary>
34
- ///
35
- /// </summary>
36
- [Tooltip("")]
37
- [SerializeField]
38
- protected List<Vector3> stockPositions = new()
39
- {
40
- new(10.88f, -2.59f, 0f),
41
- new(11.92f, -2.56f, 0f),
42
- new(11.02f, -1.63f, 0f),
43
- new(12.06f, -1.60f, 0f),
44
- new(10.74f, -3.55f, 0f),
45
- new(11.78f, -3.52f, 0f),
46
- new(11.16f, -0.67f, 0f),
47
- new(12.20f, -0.64f, 0f),
48
- new(10.60f, -4.51f, 0f),
49
- new(11.64f, -4.48f, 0f)
50
- };
51
-
52
-
53
- /// <summary>
54
- ///
55
- /// </summary>
56
- [ContextMenu("Record")]
57
- public void Record()
58
- {
59
- stockPositions.Clear();
60
-
61
- int stockCount = GetComponentsInChildren<ClosingArgumentStockBase>().Length;
62
-
63
- for (int i = 0; i < stockCount; i++)
64
- {
65
- ClosingArgumentStockBase currentStock = transform.GetChild(i).GetComponent<ClosingArgumentStockBase>();
66
-
67
- stockPositions.Add(currentStock.transform.localPosition);
68
- }
69
- }
70
-
71
-
72
- /// <summary>
73
- ///
74
- /// </summary>
75
- [ContextMenu("Apply")]
76
- public void Apply()
77
- {
78
- DestroyAllChildren();
79
-
80
- #if UNITY_EDITOR
81
-
82
- for (int i = 0; i < stockPositions.Count; i++)
83
- {
84
- var instance = UnityEditor.PrefabUtility.InstantiatePrefab(stockPrefab, transform);
85
-
86
- instance.name = instance.name + indexNameDivider + i;
87
- }
88
-
89
- #endif
90
-
91
- for (int i = 0; i < stockPositions.Count; i++)
92
- {
93
- ClosingArgumentStockBase currentStock = transform.GetChild(i).GetComponent<ClosingArgumentStockBase>();
94
-
95
- currentStock.transform.localPosition = stockPositions[i];
96
-
97
- currentStock.transform.localEulerAngles = rotation;
98
- }
99
-
100
- var stocks = GetComponentsInChildren<ClosingArgumentStockBase>();
101
-
102
- foreach (var stock in stocks)
103
- stock.Rewire();
104
-
105
- #if UNITY_EDITOR
106
-
107
- EditorUtility.SetDirty(transform.root);
108
-
109
- #endif
110
- }
111
-
112
- /// <summary>
113
- ///
114
- /// </summary>
115
- protected void DestroyAllChildren()
116
- {
117
- int childCount = transform.childCount;
118
-
119
- for (int i = childCount - 1; i >= 0; i--)
120
- if (Application.isPlaying)
121
- Destroy(transform.GetChild(i).gameObject);
122
- else
123
- DestroyImmediate(transform.GetChild(i).gameObject);
124
-
125
- UnityEngine.Debug.Log($"{childCount} children destroyed from parent: {gameObject.name}");
126
- }
127
- }
1
+ // Original Author: Henry (Meowpixel)
2
+ // Updated/Reworked by: Benjamin "Sweden" Jillson : Discord: sweden_gaming For Project Eden's Garden
3
+ using System.Collections.Generic;
4
+ using UnityEditor;
5
+ using UnityEngine;
6
+
7
+ namespace DREditor.Minigames.CA.Stocks
8
+ {
9
+ /// <summary>
10
+ ///
11
+ /// </summary>
12
+ [ClassHeader("")]
13
+ public class StockParent : MonoBehaviour
14
+ {
15
+ /// <summary>
16
+ ///
17
+ /// </summary>
18
+ [Tooltip("")]
19
+ [SerializeField] protected GameObject stockPrefab = null;
20
+
21
+ /// <summary>
22
+ ///
23
+ /// </summary>
24
+ [Tooltip("")]
25
+ [SerializeField] protected string indexNameDivider = "_";
26
+
27
+ /// <summary>
28
+ ///
29
+ /// </summary>
30
+ [Tooltip("")]
31
+ [SerializeField] protected Vector3 rotation = new(0, 0, -8);
32
+
33
+ /// <summary>
34
+ ///
35
+ /// </summary>
36
+ [Tooltip("")]
37
+ [SerializeField]
38
+ protected List<Vector3> stockPositions = new()
39
+ {
40
+ new(10.88f, -2.59f, 0f),
41
+ new(11.92f, -2.56f, 0f),
42
+ new(11.02f, -1.63f, 0f),
43
+ new(12.06f, -1.60f, 0f),
44
+ new(10.74f, -3.55f, 0f),
45
+ new(11.78f, -3.52f, 0f),
46
+ new(11.16f, -0.67f, 0f),
47
+ new(12.20f, -0.64f, 0f),
48
+ new(10.60f, -4.51f, 0f),
49
+ new(11.64f, -4.48f, 0f)
50
+ };
51
+
52
+
53
+ /// <summary>
54
+ ///
55
+ /// </summary>
56
+ [ContextMenu("Record")]
57
+ public void Record()
58
+ {
59
+ stockPositions.Clear();
60
+
61
+ int stockCount = GetComponentsInChildren<ClosingArgumentStockBase>().Length;
62
+
63
+ for (int i = 0; i < stockCount; i++)
64
+ {
65
+ ClosingArgumentStockBase currentStock = transform.GetChild(i).GetComponent<ClosingArgumentStockBase>();
66
+
67
+ stockPositions.Add(currentStock.transform.localPosition);
68
+ }
69
+ }
70
+
71
+
72
+ /// <summary>
73
+ ///
74
+ /// </summary>
75
+ [ContextMenu("Apply")]
76
+ public void Apply()
77
+ {
78
+ DestroyAllChildren();
79
+
80
+ #if UNITY_EDITOR
81
+
82
+ for (int i = 0; i < stockPositions.Count; i++)
83
+ {
84
+ var instance = UnityEditor.PrefabUtility.InstantiatePrefab(stockPrefab, transform);
85
+
86
+ instance.name = instance.name + indexNameDivider + i;
87
+ }
88
+
89
+ #endif
90
+
91
+ for (int i = 0; i < stockPositions.Count; i++)
92
+ {
93
+ ClosingArgumentStockBase currentStock = transform.GetChild(i).GetComponent<ClosingArgumentStockBase>();
94
+
95
+ currentStock.transform.localPosition = stockPositions[i];
96
+
97
+ currentStock.transform.localEulerAngles = rotation;
98
+ }
99
+
100
+ var stocks = GetComponentsInChildren<ClosingArgumentStockBase>();
101
+
102
+ foreach (var stock in stocks)
103
+ stock.Rewire();
104
+
105
+ #if UNITY_EDITOR
106
+
107
+ EditorUtility.SetDirty(transform.root);
108
+
109
+ #endif
110
+ }
111
+
112
+ /// <summary>
113
+ ///
114
+ /// </summary>
115
+ protected void DestroyAllChildren()
116
+ {
117
+ int childCount = transform.childCount;
118
+
119
+ for (int i = childCount - 1; i >= 0; i--)
120
+ if (Application.isPlaying)
121
+ Destroy(transform.GetChild(i).gameObject);
122
+ else
123
+ DestroyImmediate(transform.GetChild(i).gameObject);
124
+
125
+ UnityEngine.Debug.Log($"{childCount} children destroyed from parent: {gameObject.name}");
126
+ }
127
+ }
128
128
  }
@@ -1,11 +1,11 @@
1
- fileFormatVersion: 2
2
- guid: 12623e6a025e21c4f9e32fac3952c40b
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: 12623e6a025e21c4f9e32fac3952c40b
3
+ MonoImporter:
4
+ externalObjects: {}
5
+ serializedVersion: 2
6
+ defaultReferences: []
7
+ executionOrder: 0
8
+ icon: {instanceID: 0}
9
+ userData:
10
+ assetBundleName:
11
+ assetBundleVariant:
package/Stocks.meta CHANGED
@@ -1,8 +1,8 @@
1
- fileFormatVersion: 2
2
- guid: bf7dfd69e5953ec4e82b83682204f7f2
3
- folderAsset: yes
4
- DefaultImporter:
5
- externalObjects: {}
6
- userData:
7
- assetBundleName:
8
- assetBundleVariant:
1
+ fileFormatVersion: 2
2
+ guid: bf7dfd69e5953ec4e82b83682204f7f2
3
+ folderAsset: yes
4
+ DefaultImporter:
5
+ externalObjects: {}
6
+ userData:
7
+ assetBundleName:
8
+ assetBundleVariant:
package/package.json CHANGED
@@ -1,41 +1,46 @@
1
- {
2
- "name": "net.dreditor.minigames.ca",
3
- "version": "0.1.6",
4
- "displayName": "DREditor Minigames CA",
5
- "description": "The beta for DREditor. A tool to create death game style projects without having to code.",
6
- "unity": "6000.4",
7
- "dependencies": {
8
- "com.unity.inputsystem": "1.19.0",
9
- "com.unity.ugui": "2.0.0",
10
- "net.dreditor.core": "0.1.6",
11
- "net.dreditor.fading": "0.1.6",
12
- "net.dreditor.audio": "0.1.6",
13
- "net.dreditor.ui": "0.1.6",
14
- "net.dreditor.uihandling": "0.1.6",
15
- "net.dreditor.minigames": "0.1.6"
16
- },
17
- "publishConfig": {
18
- "access": "public"
19
- },
20
- "author": {
21
- "name": "Benjamin \"Sweden\" Jillson",
22
- "email": "dreditortool@gmail.com",
23
- "url": "https://dreditor.net"
24
- },
25
- "keywords": [
26
- "editor",
27
- "tool",
28
- "dreditor"
29
- ],
30
- "samples": [
31
- {
32
- "displayName": "Samples",
33
- "description": "",
34
- "path": "Samples~"
35
- }
36
- ],
37
- "documentationUrl": "https://dreditor.net",
38
- "license": "Apache-2.0",
39
- "licensesUrl": "https://dreditor.net/docs/LICENSE.html",
40
- "changelogUrl": "https://dreditor.net/docs/CHANGELOG.html"
41
- }
1
+ {
2
+ "name": "net.dreditor.minigames.ca",
3
+ "version": "0.1.8",
4
+ "displayName": "DREditor Minigames CA",
5
+ "description": "The beta for DREditor. A tool to create death game style projects without having to code.",
6
+ "unity": "6000.4",
7
+ "dependencies": {
8
+ "com.unity.inputsystem": "1.19.0",
9
+ "com.unity.ugui": "2.0.0",
10
+ "net.dreditor.core": "0.1.8",
11
+ "net.dreditor.fading": "0.1.8",
12
+ "net.dreditor.audio": "0.1.8",
13
+ "net.dreditor.ui": "0.1.8",
14
+ "net.dreditor.uihandling": "0.1.8",
15
+ "net.dreditor.minigames": "0.1.8"
16
+ },
17
+ "publishConfig": {
18
+ "access": "public"
19
+ },
20
+ "author": {
21
+ "name": "Benjamin \"Sweden\" Jillson",
22
+ "email": "dreditortool@gmail.com",
23
+ "url": "https://dreditor.net"
24
+ },
25
+ "keywords": [
26
+ "editor",
27
+ "tool",
28
+ "dreditor"
29
+ ],
30
+ "samples": [
31
+ {
32
+ "displayName": "Samples",
33
+ "description": "",
34
+ "path": "Samples~"
35
+ }
36
+ ],
37
+ "documentationUrl": "https://dreditor.net",
38
+ "license": "Apache-2.0",
39
+ "licensesUrl": "https://dreditor.net/docs/LICENSE.html",
40
+ "changelogUrl": "https://dreditor.net/docs/CHANGELOG.html",
41
+ "repository": {
42
+ "url": "https://github.com/CertifiedSharp/DREditor",
43
+ "type": "git",
44
+ "revision": "416b18f937fb917bf3f595362a1082ed97457744"
45
+ }
46
+ }