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.
- package/.attestation.p7m +0 -0
- package/ArgumentBuilder.cs +80 -80
- package/ArgumentBuilder.cs.meta +11 -11
- package/ArgumentPage.cs +36 -36
- package/ArgumentPage.cs.meta +11 -11
- package/ArgumentQuestionPanel.cs +136 -136
- package/ArgumentQuestionPanel.cs.meta +11 -11
- package/ClosingArgumentSettings.cs +23 -23
- package/ClosingArgumentSettings.cs.meta +11 -11
- package/ClosingArgumentStockBase.cs +250 -250
- package/ClosingArgumentStockBase.cs.meta +11 -11
- package/DREditor.Minigames.CA.asmdef +24 -24
- package/DREditor.Minigames.CA.asmdef.meta +7 -7
- package/Editor/ArgumentBuilderEditor.cs +139 -139
- package/Editor/ArgumentBuilderEditor.cs.meta +12 -12
- package/Editor/ArgumentPageEditor.cs +283 -283
- package/Editor/ArgumentPageEditor.cs.meta +11 -11
- package/Editor/ArgumentPanelEditor.cs +141 -141
- package/Editor/ArgumentPanelEditor.cs.meta +11 -11
- package/Editor/ArgumentStockEditor.cs +167 -167
- package/Editor/ArgumentStockEditor.cs.meta +11 -11
- package/Editor/CAHandyFields.cs +32 -32
- package/Editor/CAHandyFields.cs.meta +1 -1
- package/Editor/DREditor.Minigames.CA.Editor.asmdef +20 -20
- package/Editor/DREditor.Minigames.CA.Editor.asmdef.meta +7 -7
- package/Editor/PreviewableArgumentBuilderEditor.cs +286 -286
- package/Editor/PreviewableArgumentBuilderEditor.cs.meta +12 -12
- package/Editor.meta +8 -8
- package/IActiveStockPanel.cs +36 -36
- package/IActiveStockPanel.cs.meta +11 -11
- package/IArgumentPreviewInitializer.cs +19 -19
- package/IArgumentPreviewInitializer.cs.meta +11 -11
- package/IClosingArgumentListener.cs +17 -17
- package/IClosingArgumentListener.cs.meta +11 -11
- package/IClosingArgumentPagePreviewer.cs +16 -16
- package/IClosingArgumentPagePreviewer.cs.meta +11 -11
- package/IClosingArgumentResetable.cs +15 -15
- package/IClosingArgumentResetable.cs.meta +11 -11
- package/ILockPreview.cs +16 -16
- package/ILockPreview.cs.meta +11 -11
- package/IPageListener.cs +17 -17
- package/IPageListener.cs.meta +11 -11
- package/IPagesInitializer.cs +17 -17
- package/IPagesInitializer.cs.meta +11 -11
- package/ITotalStockListener.cs +16 -16
- package/ITotalStockListener.cs.meta +11 -11
- package/Managers/ArgumentInitializerBase.cs +17 -17
- package/Managers/ArgumentInitializerBase.cs.meta +11 -11
- package/Managers/ClosingArgumentInitializer.cs +128 -128
- package/Managers/ClosingArgumentInitializer.cs.meta +10 -10
- package/Managers/ClosingArgumentManager.cs +269 -269
- package/Managers/ClosingArgumentManager.cs.meta +10 -10
- package/Managers/ClosingArgumentManagerBase.cs +146 -146
- package/Managers/ClosingArgumentManagerBase.cs.meta +11 -11
- package/Managers/ClosingArgumentPreviewInitializer.cs +80 -80
- package/Managers/ClosingArgumentPreviewInitializer.cs.meta +17 -17
- package/Managers.meta +8 -8
- package/Pages/IPageInitializer.cs +23 -23
- package/Pages/IPageInitializer.cs.meta +11 -11
- package/Pages/MainPagePreviewer.cs +66 -66
- package/Pages/MainPagePreviewer.cs.meta +11 -11
- package/Pages/MiniPageInitializer.cs +144 -144
- package/Pages/MiniPageInitializer.cs.meta +11 -11
- package/Pages/MoveMainPagesComponent.cs +163 -163
- package/Pages/MoveMainPagesComponent.cs.meta +11 -11
- package/Pages/MovePageComponent.cs +104 -104
- package/Pages/MovePageComponent.cs.meta +11 -11
- package/Pages/MovePageHandler.cs +215 -215
- package/Pages/MovePageHandler.cs.meta +11 -11
- package/Pages/PageArrows.cs +124 -124
- package/Pages/PageArrows.cs.meta +11 -11
- package/Pages/PageCounter.cs +65 -65
- package/Pages/PageCounter.cs.meta +11 -11
- package/Pages/PageHandlerBase.cs +30 -30
- package/Pages/PageHandlerBase.cs.meta +11 -11
- package/Pages/PageInitializer.cs +195 -195
- package/Pages/PageInitializer.cs.meta +11 -11
- package/Pages/PageInitializerBase.cs +65 -65
- package/Pages/PageInitializerBase.cs.meta +11 -11
- package/Pages/PagePreviewer.cs +57 -57
- package/Pages/PagePreviewer.cs.meta +11 -11
- package/Pages.meta +8 -8
- package/PanelInitializerBase.cs +147 -147
- package/PanelInitializerBase.cs.meta +11 -11
- package/Panels/ClosingArgumentReticle.cs +169 -169
- package/Panels/ClosingArgumentReticle.cs.meta +11 -11
- package/Panels/ClosingArgumentShooter.cs +153 -153
- package/Panels/ClosingArgumentShooter.cs.meta +11 -11
- package/Panels/CorrectMiniPanelUpdater.cs +45 -45
- package/Panels/CorrectMiniPanelUpdater.cs.meta +11 -11
- package/Panels/CorrectPanelUpdater.cs +24 -24
- package/Panels/CorrectPanelUpdater.cs.meta +11 -11
- package/Panels/PanelInitializer.cs +51 -51
- package/Panels/PanelInitializer.cs.meta +11 -11
- package/Panels/PreviewPanelInitializer.cs +58 -58
- package/Panels/PreviewPanelInitializer.cs.meta +11 -11
- package/Panels/QuestionPanel.cs +143 -143
- package/Panels/QuestionPanel.cs.meta +11 -11
- package/Panels/QuestionPanelBase.cs +68 -68
- package/Panels/QuestionPanelBase.cs.meta +11 -11
- package/Panels.meta +8 -8
- package/{Samples → Samples~}/CACameraEnabled.asset +21 -21
- package/{Samples → Samples~}/CACameraEnabled.asset.meta +8 -8
- package/{Samples → Samples~}/CAPanelTarget.asset +25 -25
- package/{Samples → Samples~}/CAPanelTarget.asset.meta +8 -8
- package/{Samples → Samples~}/CAResult.asset +21 -21
- package/{Samples → Samples~}/CAResult.asset.meta +8 -8
- package/{Samples → Samples~}/CA_Animations/CA_Page_Square/Being Hidden Top.anim +600 -600
- package/{Samples → Samples~}/CA_Animations/CA_Page_Square/Being Hidden Top.anim.meta +8 -8
- package/{Samples → Samples~}/CA_Animations/CA_Page_Square/Being Hidden.anim +600 -600
- package/{Samples → Samples~}/CA_Animations/CA_Page_Square/Being Hidden.anim.meta +8 -8
- package/{Samples → Samples~}/CA_Animations/CA_Page_Square/Being Shown Top.anim +600 -600
- package/{Samples → Samples~}/CA_Animations/CA_Page_Square/Being Shown Top.anim.meta +8 -8
- package/{Samples → Samples~}/CA_Animations/CA_Page_Square/Being Shown.anim +582 -582
- package/{Samples → Samples~}/CA_Animations/CA_Page_Square/Being Shown.anim.meta +8 -8
- package/{Samples → Samples~}/CA_Animations/CA_Page_Square/Mystery Square.controller +188 -188
- package/{Samples → Samples~}/CA_Animations/CA_Page_Square/Mystery Square.controller.meta +8 -8
- package/{Samples → Samples~}/CA_Animations/CA_Page_Square.meta +8 -8
- package/{Samples → Samples~}/CA_Animations.meta +8 -8
- package/{Samples → Samples~}/Managers/CA_Camera.prefab +159 -159
- package/{Samples → Samples~}/Managers/CA_Camera.prefab.meta +7 -7
- package/{Samples → Samples~}/Managers/CA_Camera_Canvas.prefab +195 -195
- package/{Samples → Samples~}/Managers/CA_Camera_Canvas.prefab.meta +7 -7
- package/{Samples → Samples~}/Managers/CA_Manager_Preview_Shell.prefab +267 -267
- package/{Samples → Samples~}/Managers/CA_Manager_Preview_Shell.prefab.meta +7 -7
- package/{Samples → Samples~}/Managers/CA_Manager_Preview_Template.prefab +613 -613
- package/{Samples → Samples~}/Managers/CA_Manager_Preview_Template.prefab.meta +7 -7
- package/{Samples → Samples~}/Managers/CA_Manager_Shell.prefab +443 -443
- package/{Samples → Samples~}/Managers/CA_Manager_Shell.prefab.meta +7 -7
- package/{Samples → Samples~}/Managers/CA_Manager_Template.prefab +709 -709
- package/{Samples → Samples~}/Managers/CA_Manager_Template.prefab.meta +7 -7
- package/{Samples → Samples~}/Managers/CA_Result_UI_ETemplate.prefab +433 -433
- package/{Samples → Samples~}/Managers/CA_Result_UI_ETemplate.prefab.meta +7 -7
- package/{Samples → Samples~}/Managers.meta +8 -8
- package/{Samples → Samples~}/Pages/CA_Colliders.prefab +305 -305
- package/{Samples → Samples~}/Pages/CA_Colliders.prefab.meta +7 -7
- package/{Samples → Samples~}/Pages/CA_Main_Page_Arrows_ETemplate.prefab +221 -221
- package/{Samples → Samples~}/Pages/CA_Main_Page_Arrows_ETemplate.prefab.meta +7 -7
- package/{Samples → Samples~}/Pages/CA_Page_Gameplay_Shell.prefab +435 -435
- package/{Samples → Samples~}/Pages/CA_Page_Gameplay_Shell.prefab.meta +7 -7
- package/{Samples → Samples~}/Pages/CA_Page_Gameplay_Template.prefab +220 -220
- package/{Samples → Samples~}/Pages/CA_Page_Gameplay_Template.prefab.meta +7 -7
- package/{Samples → Samples~}/Pages/CA_Reticle_ETemplate.prefab +337 -337
- package/{Samples → Samples~}/Pages/CA_Reticle_ETemplate.prefab.meta +7 -7
- package/{Samples → Samples~}/Pages/CA_Reticle_Shooter_Template.prefab +148 -148
- package/{Samples → Samples~}/Pages/CA_Reticle_Shooter_Template.prefab.meta +7 -7
- package/{Samples → Samples~}/Pages/Mystery_Square_ETemplate.prefab +857 -857
- package/{Samples → Samples~}/Pages/Mystery_Square_ETemplate.prefab.meta +7 -7
- package/{Samples → Samples~}/Pages/Page_Add_Ons_ETemplate.prefab +203 -203
- package/{Samples → Samples~}/Pages/Page_Add_Ons_ETemplate.prefab.meta +7 -7
- package/{Samples → Samples~}/Pages/Page_ETemplate.prefab +256 -256
- package/{Samples → Samples~}/Pages/Page_ETemplate.prefab.meta +7 -7
- package/{Samples → Samples~}/Pages.meta +8 -8
- package/{Samples → Samples~}/Stocks/CA_Stock_Display_Shell.prefab +110 -110
- package/{Samples → Samples~}/Stocks/CA_Stock_Display_Shell.prefab.meta +7 -7
- package/{Samples → Samples~}/Stocks/CA_Stock_Display_Template.prefab +731 -731
- package/{Samples → Samples~}/Stocks/CA_Stock_Display_Template.prefab.meta +7 -7
- package/{Samples → Samples~}/Stocks/CA_Stock_ETemplate.prefab +427 -427
- package/{Samples → Samples~}/Stocks/CA_Stock_ETemplate.prefab.meta +7 -7
- package/{Samples → Samples~}/Stocks/CA_Stock_Parent_Shell.prefab +61 -61
- package/{Samples → Samples~}/Stocks/CA_Stock_Parent_Shell.prefab.meta +7 -7
- package/{Samples → Samples~}/Stocks/CA_Stock_Parent_Template.prefab +1017 -1017
- package/{Samples → Samples~}/Stocks/CA_Stock_Parent_Template.prefab.meta +7 -7
- package/{Samples → Samples~}/Stocks.meta +8 -8
- package/{Samples → Samples~}/UI/CA_Trial_Timer_Canvas_Template.prefab +229 -229
- package/{Samples → Samples~}/UI/CA_Trial_Timer_Canvas_Template.prefab.meta +7 -7
- package/{Samples → Samples~}/UI/CA_UI_Background_ETemplate.prefab +86 -86
- package/{Samples → Samples~}/UI/CA_UI_Background_ETemplate.prefab.meta +7 -7
- package/{Samples → Samples~}/UI/CA_UI_Pages_Decorations_Template.prefab +109 -109
- package/{Samples → Samples~}/UI/CA_UI_Pages_Decorations_Template.prefab.meta +7 -7
- package/{Samples → Samples~}/UI/CA_UI_Stock_Panel_ETemplate.prefab +464 -464
- package/{Samples → Samples~}/UI/CA_UI_Stock_Panel_ETemplate.prefab.meta +7 -7
- package/{Samples → Samples~}/UI/CA_UI_Template.prefab +261 -261
- package/{Samples → Samples~}/UI/CA_UI_Template.prefab.meta +7 -7
- package/{Samples → Samples~}/UI/Page_Counter_UI_ETemplate.prefab +831 -831
- package/{Samples → Samples~}/UI/Page_Counter_UI_ETemplate.prefab.meta +7 -7
- package/{Samples → Samples~}/UI.meta +8 -8
- package/Stocks/ActiveStockPanel.cs +177 -177
- package/Stocks/ActiveStockPanel.cs.meta +11 -11
- package/Stocks/ActiveStockPanelBase.cs +80 -80
- package/Stocks/ActiveStockPanelBase.cs.meta +11 -11
- package/Stocks/ActiveStockPanelStateable.cs +142 -142
- package/Stocks/ActiveStockPanelStateable.cs.meta +11 -11
- package/Stocks/ClosingArgumentStock.cs +120 -120
- package/Stocks/ClosingArgumentStock.cs.meta +11 -11
- package/Stocks/ShootCAStockVisibility.cs +133 -133
- package/Stocks/ShootCAStockVisibility.cs.meta +1 -1
- package/Stocks/StockParent.cs +127 -127
- package/Stocks/StockParent.cs.meta +11 -11
- package/Stocks.meta +8 -8
- package/package.json +46 -41
- package/package.json.meta +7 -7
- package/Samples.meta +0 -8
|
@@ -1,142 +1,142 @@
|
|
|
1
|
-
// Original Author: Henry (Meowpixel)
|
|
2
|
-
// Updated/Reworked by: Benjamin "Sweden" Jillson : Discord: sweden_gaming For Project Eden's Garden
|
|
3
|
-
using DREditor.Editor.Utility;
|
|
4
|
-
using System;
|
|
5
|
-
using UnityEditor;
|
|
6
|
-
using UnityEngine;
|
|
7
|
-
|
|
8
|
-
namespace DREditor.Minigames.CA.Editor
|
|
9
|
-
{
|
|
10
|
-
/// <summary>
|
|
11
|
-
///
|
|
12
|
-
/// </summary>
|
|
13
|
-
[Serializable]
|
|
14
|
-
public class ArgumentPanelEditor
|
|
15
|
-
{
|
|
16
|
-
/// <summary>
|
|
17
|
-
///
|
|
18
|
-
/// </summary>
|
|
19
|
-
protected Action callback;
|
|
20
|
-
|
|
21
|
-
/// <summary>
|
|
22
|
-
///
|
|
23
|
-
/// </summary>
|
|
24
|
-
protected ArgumentQuestionPanel panel;
|
|
25
|
-
|
|
26
|
-
/// <summary>
|
|
27
|
-
///
|
|
28
|
-
/// </summary>
|
|
29
|
-
protected ArgumentStockEditor stockDisplayer = new();
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
/// <summary>
|
|
33
|
-
///
|
|
34
|
-
/// </summary>
|
|
35
|
-
/// <param name="panel"></param>
|
|
36
|
-
/// <param name="callback"></param>
|
|
37
|
-
public virtual void DisplayPanel(ArgumentQuestionPanel panel, Action callback)
|
|
38
|
-
{
|
|
39
|
-
this.callback = callback;
|
|
40
|
-
|
|
41
|
-
this.panel = panel;
|
|
42
|
-
|
|
43
|
-
DisplayPanelInfo();
|
|
44
|
-
|
|
45
|
-
stockDisplayer.DisplayStock(panel, callback);
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
#region Display Panel Info
|
|
49
|
-
|
|
50
|
-
/// <summary>
|
|
51
|
-
///
|
|
52
|
-
/// </summary>
|
|
53
|
-
protected virtual void DisplayPanelInfo()
|
|
54
|
-
{
|
|
55
|
-
EditorGUI.BeginChangeCheck();
|
|
56
|
-
|
|
57
|
-
DisplayPanelShape();
|
|
58
|
-
|
|
59
|
-
EditorGUILayout.LabelField("Comic Panel", EditorStyles.helpBox, GUILayout.Width(70));
|
|
60
|
-
|
|
61
|
-
DisplayQuestionText();
|
|
62
|
-
|
|
63
|
-
CAHandyFields.DisplayStockVectorField(
|
|
64
|
-
new GUIContent(
|
|
65
|
-
"Position:",
|
|
66
|
-
"The panel's position relative to the comic page center, in world units."),
|
|
67
|
-
panel.SetPanelPos,
|
|
68
|
-
panel.panelPos);
|
|
69
|
-
|
|
70
|
-
CAHandyFields.DisplayStockVectorField(
|
|
71
|
-
new GUIContent(
|
|
72
|
-
"Symbol Scale: ",
|
|
73
|
-
"Scale of the question/check symbol displayed on the panel."),
|
|
74
|
-
panel.SetSymbolScale,
|
|
75
|
-
panel.symbolScale);
|
|
76
|
-
|
|
77
|
-
CAHandyFields.DisplayStockVectorField(
|
|
78
|
-
new GUIContent(
|
|
79
|
-
"Symbol Offset: ",
|
|
80
|
-
"Local position of the question/check symbol relative to the panel center."),
|
|
81
|
-
panel.SetSymbolOffset,
|
|
82
|
-
panel.symbolOffset);
|
|
83
|
-
|
|
84
|
-
if (EditorGUI.EndChangeCheck())
|
|
85
|
-
callback?.Invoke();
|
|
86
|
-
}
|
|
87
|
-
|
|
88
|
-
/// <summary>
|
|
89
|
-
///
|
|
90
|
-
/// </summary>
|
|
91
|
-
protected virtual void DisplayPanelShape()
|
|
92
|
-
{
|
|
93
|
-
GUILayout.Space(5);
|
|
94
|
-
|
|
95
|
-
using (new EditorGUILayout.HorizontalScope())
|
|
96
|
-
{
|
|
97
|
-
GUILayout.Label(
|
|
98
|
-
new GUIContent(
|
|
99
|
-
"Sprite: ",
|
|
100
|
-
"Sprite used as the visual outline for comic panels, stock panels, and active panels."),
|
|
101
|
-
GUILayout.Width(130));
|
|
102
|
-
|
|
103
|
-
panel.SetPanelShape(
|
|
104
|
-
(Sprite)EditorGUILayout.ObjectField(
|
|
105
|
-
panel.panelShape,
|
|
106
|
-
typeof(Sprite),
|
|
107
|
-
false,
|
|
108
|
-
GUILayout.Width(120)));
|
|
109
|
-
}
|
|
110
|
-
|
|
111
|
-
if (panel.panelShape != null)
|
|
112
|
-
GUILayout.Label(
|
|
113
|
-
AssetPreview.GetAssetPreview(panel.panelShape),
|
|
114
|
-
GUILayout.MaxWidth(500),
|
|
115
|
-
GUILayout.MaxHeight(281.25f));
|
|
116
|
-
|
|
117
|
-
GUILayout.Space(5);
|
|
118
|
-
}
|
|
119
|
-
|
|
120
|
-
/// <summary>
|
|
121
|
-
///
|
|
122
|
-
/// </summary>
|
|
123
|
-
protected virtual void DisplayQuestionText()
|
|
124
|
-
{
|
|
125
|
-
EditorStyles.textField.wordWrap = true;
|
|
126
|
-
|
|
127
|
-
GUILayout.Label(
|
|
128
|
-
new GUIContent(
|
|
129
|
-
"Panel Question:",
|
|
130
|
-
"Question text displayed when this panel is highlighted."),
|
|
131
|
-
GUILayout.Width(30));
|
|
132
|
-
|
|
133
|
-
panel.SetQuestionText(
|
|
134
|
-
EditorGUILayout.TextField(
|
|
135
|
-
panel.questionText,
|
|
136
|
-
GUILayout.Width(200),
|
|
137
|
-
GUILayout.Height(35)));
|
|
138
|
-
}
|
|
139
|
-
|
|
140
|
-
#endregion
|
|
141
|
-
}
|
|
1
|
+
// Original Author: Henry (Meowpixel)
|
|
2
|
+
// Updated/Reworked by: Benjamin "Sweden" Jillson : Discord: sweden_gaming For Project Eden's Garden
|
|
3
|
+
using DREditor.Editor.Utility;
|
|
4
|
+
using System;
|
|
5
|
+
using UnityEditor;
|
|
6
|
+
using UnityEngine;
|
|
7
|
+
|
|
8
|
+
namespace DREditor.Minigames.CA.Editor
|
|
9
|
+
{
|
|
10
|
+
/// <summary>
|
|
11
|
+
///
|
|
12
|
+
/// </summary>
|
|
13
|
+
[Serializable]
|
|
14
|
+
public class ArgumentPanelEditor
|
|
15
|
+
{
|
|
16
|
+
/// <summary>
|
|
17
|
+
///
|
|
18
|
+
/// </summary>
|
|
19
|
+
protected Action callback;
|
|
20
|
+
|
|
21
|
+
/// <summary>
|
|
22
|
+
///
|
|
23
|
+
/// </summary>
|
|
24
|
+
protected ArgumentQuestionPanel panel;
|
|
25
|
+
|
|
26
|
+
/// <summary>
|
|
27
|
+
///
|
|
28
|
+
/// </summary>
|
|
29
|
+
protected ArgumentStockEditor stockDisplayer = new();
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
/// <summary>
|
|
33
|
+
///
|
|
34
|
+
/// </summary>
|
|
35
|
+
/// <param name="panel"></param>
|
|
36
|
+
/// <param name="callback"></param>
|
|
37
|
+
public virtual void DisplayPanel(ArgumentQuestionPanel panel, Action callback)
|
|
38
|
+
{
|
|
39
|
+
this.callback = callback;
|
|
40
|
+
|
|
41
|
+
this.panel = panel;
|
|
42
|
+
|
|
43
|
+
DisplayPanelInfo();
|
|
44
|
+
|
|
45
|
+
stockDisplayer.DisplayStock(panel, callback);
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
#region Display Panel Info
|
|
49
|
+
|
|
50
|
+
/// <summary>
|
|
51
|
+
///
|
|
52
|
+
/// </summary>
|
|
53
|
+
protected virtual void DisplayPanelInfo()
|
|
54
|
+
{
|
|
55
|
+
EditorGUI.BeginChangeCheck();
|
|
56
|
+
|
|
57
|
+
DisplayPanelShape();
|
|
58
|
+
|
|
59
|
+
EditorGUILayout.LabelField("Comic Panel", EditorStyles.helpBox, GUILayout.Width(70));
|
|
60
|
+
|
|
61
|
+
DisplayQuestionText();
|
|
62
|
+
|
|
63
|
+
CAHandyFields.DisplayStockVectorField(
|
|
64
|
+
new GUIContent(
|
|
65
|
+
"Position:",
|
|
66
|
+
"The panel's position relative to the comic page center, in world units."),
|
|
67
|
+
panel.SetPanelPos,
|
|
68
|
+
panel.panelPos);
|
|
69
|
+
|
|
70
|
+
CAHandyFields.DisplayStockVectorField(
|
|
71
|
+
new GUIContent(
|
|
72
|
+
"Symbol Scale: ",
|
|
73
|
+
"Scale of the question/check symbol displayed on the panel."),
|
|
74
|
+
panel.SetSymbolScale,
|
|
75
|
+
panel.symbolScale);
|
|
76
|
+
|
|
77
|
+
CAHandyFields.DisplayStockVectorField(
|
|
78
|
+
new GUIContent(
|
|
79
|
+
"Symbol Offset: ",
|
|
80
|
+
"Local position of the question/check symbol relative to the panel center."),
|
|
81
|
+
panel.SetSymbolOffset,
|
|
82
|
+
panel.symbolOffset);
|
|
83
|
+
|
|
84
|
+
if (EditorGUI.EndChangeCheck())
|
|
85
|
+
callback?.Invoke();
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
/// <summary>
|
|
89
|
+
///
|
|
90
|
+
/// </summary>
|
|
91
|
+
protected virtual void DisplayPanelShape()
|
|
92
|
+
{
|
|
93
|
+
GUILayout.Space(5);
|
|
94
|
+
|
|
95
|
+
using (new EditorGUILayout.HorizontalScope())
|
|
96
|
+
{
|
|
97
|
+
GUILayout.Label(
|
|
98
|
+
new GUIContent(
|
|
99
|
+
"Sprite: ",
|
|
100
|
+
"Sprite used as the visual outline for comic panels, stock panels, and active panels."),
|
|
101
|
+
GUILayout.Width(130));
|
|
102
|
+
|
|
103
|
+
panel.SetPanelShape(
|
|
104
|
+
(Sprite)EditorGUILayout.ObjectField(
|
|
105
|
+
panel.panelShape,
|
|
106
|
+
typeof(Sprite),
|
|
107
|
+
false,
|
|
108
|
+
GUILayout.Width(120)));
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
if (panel.panelShape != null)
|
|
112
|
+
GUILayout.Label(
|
|
113
|
+
AssetPreview.GetAssetPreview(panel.panelShape),
|
|
114
|
+
GUILayout.MaxWidth(500),
|
|
115
|
+
GUILayout.MaxHeight(281.25f));
|
|
116
|
+
|
|
117
|
+
GUILayout.Space(5);
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
/// <summary>
|
|
121
|
+
///
|
|
122
|
+
/// </summary>
|
|
123
|
+
protected virtual void DisplayQuestionText()
|
|
124
|
+
{
|
|
125
|
+
EditorStyles.textField.wordWrap = true;
|
|
126
|
+
|
|
127
|
+
GUILayout.Label(
|
|
128
|
+
new GUIContent(
|
|
129
|
+
"Panel Question:",
|
|
130
|
+
"Question text displayed when this panel is highlighted."),
|
|
131
|
+
GUILayout.Width(30));
|
|
132
|
+
|
|
133
|
+
panel.SetQuestionText(
|
|
134
|
+
EditorGUILayout.TextField(
|
|
135
|
+
panel.questionText,
|
|
136
|
+
GUILayout.Width(200),
|
|
137
|
+
GUILayout.Height(35)));
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
#endregion
|
|
141
|
+
}
|
|
142
142
|
}
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
fileFormatVersion: 2
|
|
2
|
-
guid: 2c42360e67d1b9846af9a4f475278402
|
|
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: 2c42360e67d1b9846af9a4f475278402
|
|
3
|
+
MonoImporter:
|
|
4
|
+
externalObjects: {}
|
|
5
|
+
serializedVersion: 2
|
|
6
|
+
defaultReferences: []
|
|
7
|
+
executionOrder: 0
|
|
8
|
+
icon: {instanceID: 0}
|
|
9
|
+
userData:
|
|
10
|
+
assetBundleName:
|
|
11
|
+
assetBundleVariant:
|
|
@@ -1,168 +1,168 @@
|
|
|
1
|
-
// Original Author: Henry (Meowpixel)
|
|
2
|
-
// Updated/Reworked by: Benjamin "Sweden" Jillson : Discord: sweden_gaming For Project Eden's Garden
|
|
3
|
-
using System;
|
|
4
|
-
using UnityEditor;
|
|
5
|
-
using UnityEngine;
|
|
6
|
-
|
|
7
|
-
namespace DREditor.Minigames.CA.Editor
|
|
8
|
-
{
|
|
9
|
-
/// <summary>
|
|
10
|
-
///
|
|
11
|
-
/// </summary>
|
|
12
|
-
[Serializable]
|
|
13
|
-
public class ArgumentStockEditor
|
|
14
|
-
{
|
|
15
|
-
/// <summary>
|
|
16
|
-
///
|
|
17
|
-
/// </summary>
|
|
18
|
-
protected Action callback;
|
|
19
|
-
|
|
20
|
-
/// <summary>
|
|
21
|
-
///
|
|
22
|
-
/// </summary>
|
|
23
|
-
protected ArgumentQuestionPanel panel;
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
/// <summary>
|
|
27
|
-
///
|
|
28
|
-
/// </summary>
|
|
29
|
-
/// <param name="panel"></param>
|
|
30
|
-
/// <param name="callback"></param>
|
|
31
|
-
public virtual void DisplayStock(ArgumentQuestionPanel panel, Action callback)
|
|
32
|
-
{
|
|
33
|
-
this.callback = callback;
|
|
34
|
-
|
|
35
|
-
this.panel = panel;
|
|
36
|
-
|
|
37
|
-
DisplayStockPanel();
|
|
38
|
-
|
|
39
|
-
DisplayStockVectors();
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
#region Display Stock Panel
|
|
43
|
-
|
|
44
|
-
/// <summary>
|
|
45
|
-
///
|
|
46
|
-
/// </summary>
|
|
47
|
-
protected virtual void DisplayStockPanel()
|
|
48
|
-
{
|
|
49
|
-
EditorGUI.BeginChangeCheck();
|
|
50
|
-
|
|
51
|
-
GUILayout.Space(10);
|
|
52
|
-
|
|
53
|
-
EditorGUILayout.LabelField("Stock Panel", EditorStyles.helpBox, GUILayout.Width(67));
|
|
54
|
-
|
|
55
|
-
using (new EditorGUILayout.HorizontalScope())
|
|
56
|
-
{
|
|
57
|
-
GUILayout.Label(
|
|
58
|
-
new GUIContent(
|
|
59
|
-
"Number of Locks:",
|
|
60
|
-
"How many preceding panels must be solved before this one unlocks (0–9)."),
|
|
61
|
-
GUILayout.Width(110));
|
|
62
|
-
|
|
63
|
-
GUI.SetNextControlName("locksInput");
|
|
64
|
-
|
|
65
|
-
panel.SetNoOfLocks(EditorGUILayout.IntField(panel.noOfLocks, GUILayout.Width(33)));
|
|
66
|
-
}
|
|
67
|
-
|
|
68
|
-
if (EditorGUI.EndChangeCheck())
|
|
69
|
-
{
|
|
70
|
-
if (panel.noOfLocks < 0 || panel.noOfLocks >= 10)
|
|
71
|
-
panel.SetNoOfLocks(0);
|
|
72
|
-
|
|
73
|
-
callback?.Invoke();
|
|
74
|
-
}
|
|
75
|
-
}
|
|
76
|
-
|
|
77
|
-
#endregion
|
|
78
|
-
|
|
79
|
-
#region Display Stock Vectors
|
|
80
|
-
|
|
81
|
-
/// <summary>
|
|
82
|
-
///
|
|
83
|
-
/// </summary>
|
|
84
|
-
protected virtual void DisplayStockVectors()
|
|
85
|
-
{
|
|
86
|
-
EditorGUI.BeginChangeCheck();
|
|
87
|
-
|
|
88
|
-
DisplayFlavorText();
|
|
89
|
-
|
|
90
|
-
GUILayout.Space(5);
|
|
91
|
-
|
|
92
|
-
DisplayStockScale();
|
|
93
|
-
|
|
94
|
-
DisplayStockPosition();
|
|
95
|
-
|
|
96
|
-
GUILayout.Space(5);
|
|
97
|
-
|
|
98
|
-
if (EditorGUI.EndChangeCheck())
|
|
99
|
-
callback?.Invoke();
|
|
100
|
-
}
|
|
101
|
-
|
|
102
|
-
/// <summary>
|
|
103
|
-
///
|
|
104
|
-
/// </summary>
|
|
105
|
-
protected virtual void DisplayFlavorText()
|
|
106
|
-
{
|
|
107
|
-
GUILayout.Label(
|
|
108
|
-
new GUIContent(
|
|
109
|
-
"Stock Text:",
|
|
110
|
-
"Narrative or descriptive line shown when this stock panel is hovered."),
|
|
111
|
-
GUILayout.Width(70));
|
|
112
|
-
|
|
113
|
-
panel.SetFlavorText(
|
|
114
|
-
EditorGUILayout.TextField(
|
|
115
|
-
panel.flavorText,
|
|
116
|
-
GUILayout.Width(200),
|
|
117
|
-
GUILayout.Height(35)));
|
|
118
|
-
}
|
|
119
|
-
|
|
120
|
-
/// <summary>
|
|
121
|
-
///
|
|
122
|
-
/// </summary>
|
|
123
|
-
protected virtual void DisplayStockScale()
|
|
124
|
-
{
|
|
125
|
-
using (new EditorGUILayout.HorizontalScope())
|
|
126
|
-
{
|
|
127
|
-
CAHandyFields.DisplayStockVectorField(
|
|
128
|
-
new GUIContent(
|
|
129
|
-
"Sprite Scale: ",
|
|
130
|
-
"World-space scale of the stock's display sprite."),
|
|
131
|
-
panel.SetStockScale,
|
|
132
|
-
panel.stockScale);
|
|
133
|
-
|
|
134
|
-
CAHandyFields.DisplayStockVectorField(
|
|
135
|
-
new GUIContent(
|
|
136
|
-
"Active Sprite Scale: ",
|
|
137
|
-
"Scale of the sprite when shown in the active panel."),
|
|
138
|
-
panel.SetActiveScale,
|
|
139
|
-
panel.activeScale);
|
|
140
|
-
}
|
|
141
|
-
}
|
|
142
|
-
|
|
143
|
-
/// <summary>
|
|
144
|
-
///
|
|
145
|
-
/// </summary>
|
|
146
|
-
protected virtual void DisplayStockPosition()
|
|
147
|
-
{
|
|
148
|
-
using (new EditorGUILayout.HorizontalScope())
|
|
149
|
-
{
|
|
150
|
-
CAHandyFields.DisplayStockVectorField(
|
|
151
|
-
new GUIContent(
|
|
152
|
-
"Sprite Offset: ",
|
|
153
|
-
"Local sprite position relative to the stock panel center."),
|
|
154
|
-
panel.SetStockPosition,
|
|
155
|
-
panel.stockPosition);
|
|
156
|
-
|
|
157
|
-
CAHandyFields.DisplayStockVectorField(
|
|
158
|
-
new GUIContent(
|
|
159
|
-
"Active Sprite Offset: ",
|
|
160
|
-
"Local sprite position relative to the active panel center."),
|
|
161
|
-
panel.SetActivePosition,
|
|
162
|
-
panel.activePosition);
|
|
163
|
-
}
|
|
164
|
-
}
|
|
165
|
-
|
|
166
|
-
#endregion
|
|
167
|
-
}
|
|
1
|
+
// Original Author: Henry (Meowpixel)
|
|
2
|
+
// Updated/Reworked by: Benjamin "Sweden" Jillson : Discord: sweden_gaming For Project Eden's Garden
|
|
3
|
+
using System;
|
|
4
|
+
using UnityEditor;
|
|
5
|
+
using UnityEngine;
|
|
6
|
+
|
|
7
|
+
namespace DREditor.Minigames.CA.Editor
|
|
8
|
+
{
|
|
9
|
+
/// <summary>
|
|
10
|
+
///
|
|
11
|
+
/// </summary>
|
|
12
|
+
[Serializable]
|
|
13
|
+
public class ArgumentStockEditor
|
|
14
|
+
{
|
|
15
|
+
/// <summary>
|
|
16
|
+
///
|
|
17
|
+
/// </summary>
|
|
18
|
+
protected Action callback;
|
|
19
|
+
|
|
20
|
+
/// <summary>
|
|
21
|
+
///
|
|
22
|
+
/// </summary>
|
|
23
|
+
protected ArgumentQuestionPanel panel;
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
/// <summary>
|
|
27
|
+
///
|
|
28
|
+
/// </summary>
|
|
29
|
+
/// <param name="panel"></param>
|
|
30
|
+
/// <param name="callback"></param>
|
|
31
|
+
public virtual void DisplayStock(ArgumentQuestionPanel panel, Action callback)
|
|
32
|
+
{
|
|
33
|
+
this.callback = callback;
|
|
34
|
+
|
|
35
|
+
this.panel = panel;
|
|
36
|
+
|
|
37
|
+
DisplayStockPanel();
|
|
38
|
+
|
|
39
|
+
DisplayStockVectors();
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
#region Display Stock Panel
|
|
43
|
+
|
|
44
|
+
/// <summary>
|
|
45
|
+
///
|
|
46
|
+
/// </summary>
|
|
47
|
+
protected virtual void DisplayStockPanel()
|
|
48
|
+
{
|
|
49
|
+
EditorGUI.BeginChangeCheck();
|
|
50
|
+
|
|
51
|
+
GUILayout.Space(10);
|
|
52
|
+
|
|
53
|
+
EditorGUILayout.LabelField("Stock Panel", EditorStyles.helpBox, GUILayout.Width(67));
|
|
54
|
+
|
|
55
|
+
using (new EditorGUILayout.HorizontalScope())
|
|
56
|
+
{
|
|
57
|
+
GUILayout.Label(
|
|
58
|
+
new GUIContent(
|
|
59
|
+
"Number of Locks:",
|
|
60
|
+
"How many preceding panels must be solved before this one unlocks (0–9)."),
|
|
61
|
+
GUILayout.Width(110));
|
|
62
|
+
|
|
63
|
+
GUI.SetNextControlName("locksInput");
|
|
64
|
+
|
|
65
|
+
panel.SetNoOfLocks(EditorGUILayout.IntField(panel.noOfLocks, GUILayout.Width(33)));
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
if (EditorGUI.EndChangeCheck())
|
|
69
|
+
{
|
|
70
|
+
if (panel.noOfLocks < 0 || panel.noOfLocks >= 10)
|
|
71
|
+
panel.SetNoOfLocks(0);
|
|
72
|
+
|
|
73
|
+
callback?.Invoke();
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
#endregion
|
|
78
|
+
|
|
79
|
+
#region Display Stock Vectors
|
|
80
|
+
|
|
81
|
+
/// <summary>
|
|
82
|
+
///
|
|
83
|
+
/// </summary>
|
|
84
|
+
protected virtual void DisplayStockVectors()
|
|
85
|
+
{
|
|
86
|
+
EditorGUI.BeginChangeCheck();
|
|
87
|
+
|
|
88
|
+
DisplayFlavorText();
|
|
89
|
+
|
|
90
|
+
GUILayout.Space(5);
|
|
91
|
+
|
|
92
|
+
DisplayStockScale();
|
|
93
|
+
|
|
94
|
+
DisplayStockPosition();
|
|
95
|
+
|
|
96
|
+
GUILayout.Space(5);
|
|
97
|
+
|
|
98
|
+
if (EditorGUI.EndChangeCheck())
|
|
99
|
+
callback?.Invoke();
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
/// <summary>
|
|
103
|
+
///
|
|
104
|
+
/// </summary>
|
|
105
|
+
protected virtual void DisplayFlavorText()
|
|
106
|
+
{
|
|
107
|
+
GUILayout.Label(
|
|
108
|
+
new GUIContent(
|
|
109
|
+
"Stock Text:",
|
|
110
|
+
"Narrative or descriptive line shown when this stock panel is hovered."),
|
|
111
|
+
GUILayout.Width(70));
|
|
112
|
+
|
|
113
|
+
panel.SetFlavorText(
|
|
114
|
+
EditorGUILayout.TextField(
|
|
115
|
+
panel.flavorText,
|
|
116
|
+
GUILayout.Width(200),
|
|
117
|
+
GUILayout.Height(35)));
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
/// <summary>
|
|
121
|
+
///
|
|
122
|
+
/// </summary>
|
|
123
|
+
protected virtual void DisplayStockScale()
|
|
124
|
+
{
|
|
125
|
+
using (new EditorGUILayout.HorizontalScope())
|
|
126
|
+
{
|
|
127
|
+
CAHandyFields.DisplayStockVectorField(
|
|
128
|
+
new GUIContent(
|
|
129
|
+
"Sprite Scale: ",
|
|
130
|
+
"World-space scale of the stock's display sprite."),
|
|
131
|
+
panel.SetStockScale,
|
|
132
|
+
panel.stockScale);
|
|
133
|
+
|
|
134
|
+
CAHandyFields.DisplayStockVectorField(
|
|
135
|
+
new GUIContent(
|
|
136
|
+
"Active Sprite Scale: ",
|
|
137
|
+
"Scale of the sprite when shown in the active panel."),
|
|
138
|
+
panel.SetActiveScale,
|
|
139
|
+
panel.activeScale);
|
|
140
|
+
}
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
/// <summary>
|
|
144
|
+
///
|
|
145
|
+
/// </summary>
|
|
146
|
+
protected virtual void DisplayStockPosition()
|
|
147
|
+
{
|
|
148
|
+
using (new EditorGUILayout.HorizontalScope())
|
|
149
|
+
{
|
|
150
|
+
CAHandyFields.DisplayStockVectorField(
|
|
151
|
+
new GUIContent(
|
|
152
|
+
"Sprite Offset: ",
|
|
153
|
+
"Local sprite position relative to the stock panel center."),
|
|
154
|
+
panel.SetStockPosition,
|
|
155
|
+
panel.stockPosition);
|
|
156
|
+
|
|
157
|
+
CAHandyFields.DisplayStockVectorField(
|
|
158
|
+
new GUIContent(
|
|
159
|
+
"Active Sprite Offset: ",
|
|
160
|
+
"Local sprite position relative to the active panel center."),
|
|
161
|
+
panel.SetActivePosition,
|
|
162
|
+
panel.activePosition);
|
|
163
|
+
}
|
|
164
|
+
}
|
|
165
|
+
|
|
166
|
+
#endregion
|
|
167
|
+
}
|
|
168
168
|
}
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
fileFormatVersion: 2
|
|
2
|
-
guid: a85960d7221c95547a07cf08ce34cb9a
|
|
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: a85960d7221c95547a07cf08ce34cb9a
|
|
3
|
+
MonoImporter:
|
|
4
|
+
externalObjects: {}
|
|
5
|
+
serializedVersion: 2
|
|
6
|
+
defaultReferences: []
|
|
7
|
+
executionOrder: 0
|
|
8
|
+
icon: {instanceID: 0}
|
|
9
|
+
userData:
|
|
10
|
+
assetBundleName:
|
|
11
|
+
assetBundleVariant:
|