net.dreditor.minigames 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/BulletDifficulty.cs +36 -36
- package/BulletDifficulty.cs.meta +11 -11
- package/BulletDifficultyEditor.cs +380 -380
- package/BulletDifficultyEditor.cs.meta +11 -11
- package/DREditor.Minigames.asmdef +36 -36
- package/DREditor.Minigames.asmdef.meta +7 -7
- package/DifficultyEditorBase.cs +60 -60
- package/DifficultyEditorBase.cs.meta +11 -11
- package/IShatterGraphic.cs +32 -32
- package/IShatterGraphic.cs.meta +11 -11
- package/IShatterText.cs +33 -33
- package/IShatterText.cs.meta +11 -11
- package/InitializeTrialOffsets.cs +51 -51
- package/InitializeTrialOffsets.cs.meta +11 -11
- package/MinigameBuilderBase.cs +28 -28
- package/MinigameBuilderBase.cs.meta +11 -11
- package/MinigameControlsUIHandler.cs +94 -94
- package/MinigameControlsUIHandler.cs.meta +11 -11
- package/MinigameManagerBase.cs +197 -197
- package/MinigameManagerBase.cs.meta +11 -11
- package/QuestionToggle.cs +154 -154
- package/QuestionToggle.cs.meta +11 -11
- package/RestoreControlsUIPostDialogue.cs +100 -100
- package/RestoreControlsUIPostDialogue.cs.meta +1 -1
- package/{Samples → Samples~}/Bullet Shatter Mesh Generator.asset +23 -23
- package/{Samples → Samples~}/Bullet Shatter Mesh Generator.asset.meta +8 -8
- package/{Samples → Samples~}/HasStamina.asset +21 -21
- package/{Samples → Samples~}/HasStamina.asset.meta +8 -8
- package/{Samples → Samples~}/IsDrainingStamina.asset +21 -21
- package/{Samples → Samples~}/IsDrainingStamina.asset.meta +8 -8
- package/{Samples → Samples~}/MinigameInputAllowed.asset +21 -21
- package/{Samples → Samples~}/MinigameInputAllowed.asset.meta +8 -8
- package/{Samples → Samples~}/Minigame_Controls_UI_Handler.prefab +53 -53
- package/{Samples → Samples~}/Minigame_Controls_UI_Handler.prefab.meta +7 -7
- package/{Samples → Samples~}/Quad Shatter.asset +31 -31
- package/{Samples → Samples~}/Quad Shatter.asset.meta +8 -8
- package/{Samples → Samples~}/ShatterCameraEnabled.asset +21 -21
- package/{Samples → Samples~}/ShatterCameraEnabled.asset.meta +8 -8
- package/{Samples → Samples~}/Shatter_Graphic.prefab +98 -98
- package/{Samples → Samples~}/Shatter_Graphic.prefab.meta +7 -7
- package/{Samples → Samples~}/Stamina_Handler.prefab +59 -59
- package/{Samples → Samples~}/Stamina_Handler.prefab.meta +7 -7
- package/{Samples → Samples~}/TBS_Manager_Shell.prefab +60 -60
- package/{Samples → Samples~}/TBS_Manager_Shell.prefab.meta +7 -7
- package/{Samples → Samples~}/TBS_Manager_Template.prefab +504 -504
- package/{Samples → Samples~}/TBS_Manager_Template.prefab.meta +7 -7
- package/{Samples → Samples~}/Trial_UI_Shatter_Canvas_Shell.prefab +289 -289
- package/{Samples → Samples~}/Trial_UI_Shatter_Canvas_Shell.prefab.meta +7 -7
- package/{Samples → Samples~}/Trial_UI_Shatter_Canvas_Template.prefab +449 -449
- package/{Samples → Samples~}/Trial_UI_Shatter_Canvas_Template.prefab.meta +7 -7
- package/{Samples → Samples~}/Triangle Shatter.asset +31 -31
- package/{Samples → Samples~}/Triangle Shatter.asset.meta +8 -8
- package/{Samples → Samples~}/Truth_Bullet_Menu_Canvas_Shell.prefab +221 -221
- package/{Samples → Samples~}/Truth_Bullet_Menu_Canvas_Shell.prefab.meta +7 -7
- package/{Samples → Samples~}/Truth_Bullet_Menu_Canvas_Template.prefab +525 -525
- package/{Samples → Samples~}/Truth_Bullet_Menu_Canvas_Template.prefab.meta +7 -7
- package/{Samples → Samples~}/Truth_Bullet_Menu_Holder_Shell.prefab +38 -38
- package/{Samples → Samples~}/Truth_Bullet_Menu_Holder_Shell.prefab.meta +7 -7
- package/{Samples → Samples~}/Truth_Bullet_Menu_Holder_Template.prefab +1159 -1159
- package/{Samples → Samples~}/Truth_Bullet_Menu_Holder_Template.prefab.meta +7 -7
- package/{Samples → Samples~}/Truth_Bullet_Minigame_Canvas_Template.prefab +494 -494
- package/{Samples → Samples~}/Truth_Bullet_Minigame_Canvas_Template.prefab.meta +7 -7
- package/{Samples → Samples~}/Truth_Bullet_Option_ETemplate.prefab +294 -294
- package/{Samples → Samples~}/Truth_Bullet_Option_ETemplate.prefab.meta +7 -7
- package/Shattering/BreakTex.renderTexture +39 -39
- package/Shattering/BreakTex.renderTexture.meta +8 -8
- package/Shattering/BulletShatter.cs +176 -176
- package/Shattering/BulletShatter.cs.meta +11 -11
- package/Shattering/IShatterableCanvas.cs +20 -20
- package/Shattering/IShatterableCanvas.cs.meta +11 -11
- package/Shattering/MeshGenerator.cs +178 -178
- package/Shattering/MeshGenerator.cs.meta +11 -11
- package/Shattering/RenderCanvasOnShatter.cs +47 -47
- package/Shattering/RenderCanvasOnShatter.cs.meta +11 -11
- package/Shattering/ShatterCameraRender.cs +79 -79
- package/Shattering/ShatterCameraRender.cs.meta +11 -11
- package/Shattering/ShatterGraphic.cs +135 -135
- package/Shattering/ShatterGraphic.cs.meta +11 -11
- package/Shattering/ShatterMeshGraphic.cs +304 -304
- package/Shattering/ShatterMeshGraphic.cs.meta +11 -11
- package/Shattering/ShatterProcess.cs +282 -282
- package/Shattering/ShatterProcess.cs.meta +11 -11
- package/Shattering/ShatterProcessBase.cs +51 -51
- package/Shattering/ShatterProcessBase.cs.meta +11 -11
- package/Shattering/ShatterQuad.cs +56 -56
- package/Shattering/ShatterQuad.cs.meta +11 -11
- package/Shattering/ShatterQuadProcess.cs +65 -65
- package/Shattering/ShatterQuadProcess.cs.meta +11 -11
- package/Shattering/ShatterShape.cs +84 -84
- package/Shattering/ShatterShape.cs.meta +11 -11
- package/Shattering/ShatterTri.cs +27 -27
- package/Shattering/ShatterTri.cs.meta +11 -11
- package/Shattering/ShatterTriProcess.cs +179 -179
- package/Shattering/ShatterTriProcess.cs.meta +11 -11
- package/Shattering/ShatterWithUI.cs +68 -68
- package/Shattering/ShatterWithUI.cs.meta +11 -11
- package/Shattering/SplitShatter.cs +114 -114
- package/Shattering/SplitShatter.cs.meta +11 -11
- package/Shattering/TMPTextShatter.cs +243 -243
- package/Shattering/TMPTextShatter.cs.meta +11 -11
- package/Shattering/UIBreakVisibility.cs +172 -172
- package/Shattering/UIBreakVisibility.cs.meta +11 -11
- package/Shattering.meta +8 -8
- package/ShuffleUtility.cs +32 -32
- package/ShuffleUtility.cs.meta +11 -11
- package/SimpleRandom.cs +32 -32
- package/SimpleRandom.cs.meta +11 -11
- package/Stats/ColorHealthBar.cs +56 -56
- package/Stats/ColorHealthBar.cs.meta +11 -11
- package/Stats/ColorHealthModifier.cs +138 -138
- package/Stats/ColorHealthModifier.cs.meta +11 -11
- package/Stats/GaugeHandler.cs +72 -72
- package/Stats/GaugeHandler.cs.meta +1 -1
- package/Stats/HealthBarModifier.cs +89 -89
- package/Stats/HealthBarModifier.cs.meta +11 -11
- package/Stats/HealthStat.cs +77 -77
- package/Stats/HealthStat.cs.meta +11 -11
- package/Stats/HealthStatBase.cs +26 -26
- package/Stats/HealthStatBase.cs.meta +11 -11
- package/Stats/IGauge.cs +36 -36
- package/Stats/IGauge.cs.meta +1 -1
- package/Stats/InfluenceGauge.cs +107 -107
- package/Stats/InfluenceGauge.cs.meta +11 -11
- package/Stats/InfluenceGaugeBase.cs +42 -42
- package/Stats/InfluenceGaugeBase.cs.meta +11 -11
- package/Stats/SimpleGauge.cs +46 -46
- package/Stats/SimpleGauge.cs.meta +1 -1
- package/Stats/StaminaHandler.cs +153 -153
- package/Stats/StaminaHandler.cs.meta +11 -11
- package/Stats/TrialStats.cs +140 -140
- package/Stats/TrialStats.cs.meta +11 -11
- package/Stats/TrialStatsBase.cs +36 -36
- package/Stats/TrialStatsBase.cs.meta +11 -11
- package/Stats.meta +8 -8
- package/TBS/TBSelectBuilder.cs +59 -59
- package/TBS/TBSelectBuilder.cs.meta +11 -11
- package/TBS/TBSelectBuilderEditor.cs +166 -166
- package/TBS/TBSelectBuilderEditor.cs.meta +11 -11
- package/TBS/TBSelectManager.cs +315 -315
- package/TBS/TBSelectManager.cs.meta +11 -11
- package/TBS/TBSelection.cs +46 -46
- package/TBS/TBSelection.cs.meta +11 -11
- package/TBS/TrialTruthBulletMenu.cs +24 -24
- package/TBS/TrialTruthBulletMenu.cs.meta +11 -11
- package/TBS.meta +8 -8
- package/ThreadSafeSimpleRandom.cs +29 -29
- package/ThreadSafeSimpleRandom.cs.meta +11 -11
- package/TimedDifficultyEditor.cs +56 -56
- package/TimedDifficultyEditor.cs.meta +11 -11
- package/TimedMinigameEditor.cs +31 -31
- package/TimedMinigameEditor.cs.meta +11 -11
- package/TimerBase.cs +189 -189
- package/TimerBase.cs.meta +11 -11
- package/TimerDifficulty.cs +45 -45
- package/TimerDifficulty.cs.meta +11 -11
- package/TrialDialogueMinigame.cs +276 -276
- package/TrialDialogueMinigame.cs.meta +11 -11
- package/TrialDiscussion.cs +68 -68
- package/TrialDiscussion.cs.meta +11 -11
- package/TrialTimer.cs +113 -113
- package/TrialTimer.cs.meta +11 -11
- package/TrialTimerBase.cs +129 -129
- package/TrialTimerBase.cs.meta +11 -11
- package/package.json +56 -51
- package/package.json.meta +7 -7
- package/Samples.meta +0 -8
package/QuestionToggle.cs
CHANGED
|
@@ -1,155 +1,155 @@
|
|
|
1
|
-
//Author: Benjamin "Sweden" Jillson : Discord: sweden_gaming For Project Eden's Garden
|
|
2
|
-
using DREditor.UIHandling;
|
|
3
|
-
using System.Collections;
|
|
4
|
-
using TMPro;
|
|
5
|
-
using UnityEngine;
|
|
6
|
-
using UnityEngine.InputSystem;
|
|
7
|
-
using static UnityEngine.InputSystem.InputAction;
|
|
8
|
-
|
|
9
|
-
namespace DREditor.Minigames
|
|
10
|
-
{
|
|
11
|
-
/// <summary>
|
|
12
|
-
///
|
|
13
|
-
/// </summary>
|
|
14
|
-
[ClassHeader("")]
|
|
15
|
-
public class QuestionToggle : MonoBehaviour
|
|
16
|
-
{
|
|
17
|
-
/// <summary>
|
|
18
|
-
///
|
|
19
|
-
/// </summary>
|
|
20
|
-
[Tooltip("")]
|
|
21
|
-
[SerializeField] protected InputActionReference toggleQuestion = null;
|
|
22
|
-
|
|
23
|
-
/// <summary>
|
|
24
|
-
///
|
|
25
|
-
/// </summary>
|
|
26
|
-
[Tooltip("")]
|
|
27
|
-
[SerializeField] protected UIVisibilityComponent fullUIVisibility = null;
|
|
28
|
-
|
|
29
|
-
/// <summary>
|
|
30
|
-
///
|
|
31
|
-
/// </summary>
|
|
32
|
-
[Tooltip("")]
|
|
33
|
-
[SerializeField] protected UIVisibilityComponent questionVisibility = null;
|
|
34
|
-
|
|
35
|
-
/// <summary>
|
|
36
|
-
///
|
|
37
|
-
/// </summary>
|
|
38
|
-
[Tooltip("")]
|
|
39
|
-
[SerializeField] protected ToggleTextVisibility controlsToggle = null;
|
|
40
|
-
|
|
41
|
-
/// <summary>
|
|
42
|
-
///
|
|
43
|
-
/// </summary>
|
|
44
|
-
[Tooltip("")]
|
|
45
|
-
[SerializeField] protected TextMeshProUGUI questionText = null;
|
|
46
|
-
|
|
47
|
-
/// <summary>
|
|
48
|
-
///
|
|
49
|
-
/// </summary>
|
|
50
|
-
[Tooltip("")]
|
|
51
|
-
[SerializeField] protected float toggleWaitTime = 1;
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
/// <summary>
|
|
55
|
-
///
|
|
56
|
-
/// </summary>
|
|
57
|
-
protected bool showing = false;
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
/// <summary>
|
|
61
|
-
///
|
|
62
|
-
/// </summary>
|
|
63
|
-
/// <param name="questionText"></param>
|
|
64
|
-
public virtual void Initialize(string questionText)
|
|
65
|
-
{
|
|
66
|
-
SetQuestion(questionText);
|
|
67
|
-
|
|
68
|
-
Activate();
|
|
69
|
-
}
|
|
70
|
-
|
|
71
|
-
/// <summary>
|
|
72
|
-
///
|
|
73
|
-
/// </summary>
|
|
74
|
-
/// <param name="text"></param>
|
|
75
|
-
public virtual void SetQuestion(string text) => questionText.text = text;
|
|
76
|
-
|
|
77
|
-
/// <summary>
|
|
78
|
-
///
|
|
79
|
-
/// </summary>
|
|
80
|
-
public virtual void Activate()
|
|
81
|
-
{
|
|
82
|
-
fullUIVisibility.Show();
|
|
83
|
-
|
|
84
|
-
toggleQuestion.action.started += ToggleQuestion;
|
|
85
|
-
}
|
|
86
|
-
|
|
87
|
-
/// <summary>
|
|
88
|
-
///
|
|
89
|
-
/// </summary>
|
|
90
|
-
public virtual void Deactivate()
|
|
91
|
-
{
|
|
92
|
-
toggleQuestion.action.started -= ToggleQuestion;
|
|
93
|
-
|
|
94
|
-
ResolveVisuals();
|
|
95
|
-
}
|
|
96
|
-
|
|
97
|
-
/// <summary>
|
|
98
|
-
///
|
|
99
|
-
/// </summary>
|
|
100
|
-
protected virtual void ResolveVisuals()
|
|
101
|
-
{
|
|
102
|
-
if (showing)
|
|
103
|
-
{
|
|
104
|
-
questionVisibility.Hide();
|
|
105
|
-
|
|
106
|
-
controlsToggle.Toggle();
|
|
107
|
-
|
|
108
|
-
showing = !showing;
|
|
109
|
-
}
|
|
110
|
-
|
|
111
|
-
fullUIVisibility.Hide();
|
|
112
|
-
}
|
|
113
|
-
|
|
114
|
-
/// <summary>
|
|
115
|
-
///
|
|
116
|
-
/// </summary>
|
|
117
|
-
/// <param name="ctx"></param>
|
|
118
|
-
protected virtual void ToggleQuestion(CallbackContext ctx)
|
|
119
|
-
{
|
|
120
|
-
toggleQuestion.action.started -= ToggleQuestion;
|
|
121
|
-
|
|
122
|
-
controlsToggle.Toggle();
|
|
123
|
-
|
|
124
|
-
if (showing)
|
|
125
|
-
questionVisibility.Hide();
|
|
126
|
-
else
|
|
127
|
-
questionVisibility.Show();
|
|
128
|
-
|
|
129
|
-
showing = !showing;
|
|
130
|
-
|
|
131
|
-
StartCoroutine(Wait());
|
|
132
|
-
}
|
|
133
|
-
|
|
134
|
-
/// <summary>
|
|
135
|
-
///
|
|
136
|
-
/// </summary>
|
|
137
|
-
/// <returns></returns>
|
|
138
|
-
protected virtual IEnumerator Wait()
|
|
139
|
-
{
|
|
140
|
-
yield return new WaitForSecondsRealtime(toggleWaitTime);
|
|
141
|
-
|
|
142
|
-
yield return questionVisibility.WaitForChangeToComplete();
|
|
143
|
-
|
|
144
|
-
toggleQuestion.action.started += ToggleQuestion;
|
|
145
|
-
|
|
146
|
-
yield break;
|
|
147
|
-
}
|
|
148
|
-
|
|
149
|
-
/// <summary>
|
|
150
|
-
///
|
|
151
|
-
/// </summary>
|
|
152
|
-
protected virtual void OnDestroy()
|
|
153
|
-
=> toggleQuestion.action.started -= ToggleQuestion;
|
|
154
|
-
}
|
|
1
|
+
//Author: Benjamin "Sweden" Jillson : Discord: sweden_gaming For Project Eden's Garden
|
|
2
|
+
using DREditor.UIHandling;
|
|
3
|
+
using System.Collections;
|
|
4
|
+
using TMPro;
|
|
5
|
+
using UnityEngine;
|
|
6
|
+
using UnityEngine.InputSystem;
|
|
7
|
+
using static UnityEngine.InputSystem.InputAction;
|
|
8
|
+
|
|
9
|
+
namespace DREditor.Minigames
|
|
10
|
+
{
|
|
11
|
+
/// <summary>
|
|
12
|
+
///
|
|
13
|
+
/// </summary>
|
|
14
|
+
[ClassHeader("")]
|
|
15
|
+
public class QuestionToggle : MonoBehaviour
|
|
16
|
+
{
|
|
17
|
+
/// <summary>
|
|
18
|
+
///
|
|
19
|
+
/// </summary>
|
|
20
|
+
[Tooltip("")]
|
|
21
|
+
[SerializeField] protected InputActionReference toggleQuestion = null;
|
|
22
|
+
|
|
23
|
+
/// <summary>
|
|
24
|
+
///
|
|
25
|
+
/// </summary>
|
|
26
|
+
[Tooltip("")]
|
|
27
|
+
[SerializeField] protected UIVisibilityComponent fullUIVisibility = null;
|
|
28
|
+
|
|
29
|
+
/// <summary>
|
|
30
|
+
///
|
|
31
|
+
/// </summary>
|
|
32
|
+
[Tooltip("")]
|
|
33
|
+
[SerializeField] protected UIVisibilityComponent questionVisibility = null;
|
|
34
|
+
|
|
35
|
+
/// <summary>
|
|
36
|
+
///
|
|
37
|
+
/// </summary>
|
|
38
|
+
[Tooltip("")]
|
|
39
|
+
[SerializeField] protected ToggleTextVisibility controlsToggle = null;
|
|
40
|
+
|
|
41
|
+
/// <summary>
|
|
42
|
+
///
|
|
43
|
+
/// </summary>
|
|
44
|
+
[Tooltip("")]
|
|
45
|
+
[SerializeField] protected TextMeshProUGUI questionText = null;
|
|
46
|
+
|
|
47
|
+
/// <summary>
|
|
48
|
+
///
|
|
49
|
+
/// </summary>
|
|
50
|
+
[Tooltip("")]
|
|
51
|
+
[SerializeField] protected float toggleWaitTime = 1;
|
|
52
|
+
|
|
53
|
+
|
|
54
|
+
/// <summary>
|
|
55
|
+
///
|
|
56
|
+
/// </summary>
|
|
57
|
+
protected bool showing = false;
|
|
58
|
+
|
|
59
|
+
|
|
60
|
+
/// <summary>
|
|
61
|
+
///
|
|
62
|
+
/// </summary>
|
|
63
|
+
/// <param name="questionText"></param>
|
|
64
|
+
public virtual void Initialize(string questionText)
|
|
65
|
+
{
|
|
66
|
+
SetQuestion(questionText);
|
|
67
|
+
|
|
68
|
+
Activate();
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
/// <summary>
|
|
72
|
+
///
|
|
73
|
+
/// </summary>
|
|
74
|
+
/// <param name="text"></param>
|
|
75
|
+
public virtual void SetQuestion(string text) => questionText.text = text;
|
|
76
|
+
|
|
77
|
+
/// <summary>
|
|
78
|
+
///
|
|
79
|
+
/// </summary>
|
|
80
|
+
public virtual void Activate()
|
|
81
|
+
{
|
|
82
|
+
fullUIVisibility.Show();
|
|
83
|
+
|
|
84
|
+
toggleQuestion.action.started += ToggleQuestion;
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
/// <summary>
|
|
88
|
+
///
|
|
89
|
+
/// </summary>
|
|
90
|
+
public virtual void Deactivate()
|
|
91
|
+
{
|
|
92
|
+
toggleQuestion.action.started -= ToggleQuestion;
|
|
93
|
+
|
|
94
|
+
ResolveVisuals();
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
/// <summary>
|
|
98
|
+
///
|
|
99
|
+
/// </summary>
|
|
100
|
+
protected virtual void ResolveVisuals()
|
|
101
|
+
{
|
|
102
|
+
if (showing)
|
|
103
|
+
{
|
|
104
|
+
questionVisibility.Hide();
|
|
105
|
+
|
|
106
|
+
controlsToggle.Toggle();
|
|
107
|
+
|
|
108
|
+
showing = !showing;
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
fullUIVisibility.Hide();
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
/// <summary>
|
|
115
|
+
///
|
|
116
|
+
/// </summary>
|
|
117
|
+
/// <param name="ctx"></param>
|
|
118
|
+
protected virtual void ToggleQuestion(CallbackContext ctx)
|
|
119
|
+
{
|
|
120
|
+
toggleQuestion.action.started -= ToggleQuestion;
|
|
121
|
+
|
|
122
|
+
controlsToggle.Toggle();
|
|
123
|
+
|
|
124
|
+
if (showing)
|
|
125
|
+
questionVisibility.Hide();
|
|
126
|
+
else
|
|
127
|
+
questionVisibility.Show();
|
|
128
|
+
|
|
129
|
+
showing = !showing;
|
|
130
|
+
|
|
131
|
+
StartCoroutine(Wait());
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
/// <summary>
|
|
135
|
+
///
|
|
136
|
+
/// </summary>
|
|
137
|
+
/// <returns></returns>
|
|
138
|
+
protected virtual IEnumerator Wait()
|
|
139
|
+
{
|
|
140
|
+
yield return new WaitForSecondsRealtime(toggleWaitTime);
|
|
141
|
+
|
|
142
|
+
yield return questionVisibility.WaitForChangeToComplete();
|
|
143
|
+
|
|
144
|
+
toggleQuestion.action.started += ToggleQuestion;
|
|
145
|
+
|
|
146
|
+
yield break;
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
/// <summary>
|
|
150
|
+
///
|
|
151
|
+
/// </summary>
|
|
152
|
+
protected virtual void OnDestroy()
|
|
153
|
+
=> toggleQuestion.action.started -= ToggleQuestion;
|
|
154
|
+
}
|
|
155
155
|
}
|
package/QuestionToggle.cs.meta
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
fileFormatVersion: 2
|
|
2
|
-
guid: 6b632daf8d87f5c44a8e17b468fb7cd1
|
|
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: 6b632daf8d87f5c44a8e17b468fb7cd1
|
|
3
|
+
MonoImporter:
|
|
4
|
+
externalObjects: {}
|
|
5
|
+
serializedVersion: 2
|
|
6
|
+
defaultReferences: []
|
|
7
|
+
executionOrder: 0
|
|
8
|
+
icon: {instanceID: 0}
|
|
9
|
+
userData:
|
|
10
|
+
assetBundleName:
|
|
11
|
+
assetBundleVariant:
|
|
@@ -1,101 +1,101 @@
|
|
|
1
|
-
//Author: Benjamin "Sweden" Jillson : Discord: sweden_gaming For Project Eden's Garden
|
|
2
|
-
using DREditor.Dialogues;
|
|
3
|
-
using DREditor.EventObjects;
|
|
4
|
-
using DREditor.Services;
|
|
5
|
-
using UnityEngine;
|
|
6
|
-
|
|
7
|
-
namespace DREditor.Minigames
|
|
8
|
-
{
|
|
9
|
-
/// <summary>
|
|
10
|
-
///
|
|
11
|
-
/// </summary>
|
|
12
|
-
[ClassHeader("")]
|
|
13
|
-
public class RestoreControlsUIPostDialogue : MonoBehaviour
|
|
14
|
-
{
|
|
15
|
-
/// <summary>
|
|
16
|
-
///
|
|
17
|
-
/// </summary>
|
|
18
|
-
[Tooltip("")]
|
|
19
|
-
[SerializeField] protected StringWithEvent currentControlsKey = null;
|
|
20
|
-
|
|
21
|
-
/// <summary>
|
|
22
|
-
///
|
|
23
|
-
/// </summary>
|
|
24
|
-
[Tooltip("")]
|
|
25
|
-
[SerializeField] protected string scanningKey = "trialdialogue";
|
|
26
|
-
|
|
27
|
-
/// <summary>
|
|
28
|
-
///
|
|
29
|
-
/// </summary>
|
|
30
|
-
[ReadOnly]
|
|
31
|
-
[Tooltip("")]
|
|
32
|
-
[SerializeField] protected string originalKey = "";
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
/// <summary>
|
|
36
|
-
///
|
|
37
|
-
/// </summary>
|
|
38
|
-
protected IDialogueManager dialogueManager;
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
protected virtual void OnEnable() => currentControlsKey.AddListener(CheckInitializeKey);
|
|
42
|
-
|
|
43
|
-
protected virtual void OnDisable()
|
|
44
|
-
{
|
|
45
|
-
currentControlsKey.RemoveListener(CheckInitializeKey);
|
|
46
|
-
|
|
47
|
-
dialogueManager?.GetFinisher().UnsubscribeToOnFinishOfDialogue(RestoreKey);
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
/// <summary>
|
|
51
|
-
///
|
|
52
|
-
/// </summary>
|
|
53
|
-
/// <param name="key"></param>
|
|
54
|
-
protected virtual void CheckInitializeKey(string key)
|
|
55
|
-
{
|
|
56
|
-
if (IsScannedKey(key))
|
|
57
|
-
OnScannedKeyFound();
|
|
58
|
-
else
|
|
59
|
-
InitializeOriginalKey();
|
|
60
|
-
}
|
|
61
|
-
|
|
62
|
-
/// <summary>
|
|
63
|
-
///
|
|
64
|
-
/// </summary>
|
|
65
|
-
/// <param name="key"></param>
|
|
66
|
-
/// <returns></returns>
|
|
67
|
-
protected virtual bool IsScannedKey(string key) => key == scanningKey;
|
|
68
|
-
|
|
69
|
-
/// <summary>
|
|
70
|
-
///
|
|
71
|
-
/// </summary>
|
|
72
|
-
protected virtual void OnScannedKeyFound()
|
|
73
|
-
{
|
|
74
|
-
currentControlsKey.RemoveListener(CheckInitializeKey);
|
|
75
|
-
|
|
76
|
-
if (ServiceLocator.HasService(out dialogueManager))
|
|
77
|
-
dialogueManager.GetFinisher().SubscribeToOnFinishOfDialogue(RestoreKey);
|
|
78
|
-
}
|
|
79
|
-
|
|
80
|
-
/// <summary>
|
|
81
|
-
///
|
|
82
|
-
/// </summary>
|
|
83
|
-
protected virtual void InitializeOriginalKey()
|
|
84
|
-
{
|
|
85
|
-
if (currentControlsKey.Value != scanningKey)
|
|
86
|
-
originalKey = currentControlsKey.Value;
|
|
87
|
-
}
|
|
88
|
-
|
|
89
|
-
/// <summary>
|
|
90
|
-
///
|
|
91
|
-
/// </summary>
|
|
92
|
-
protected virtual void RestoreKey()
|
|
93
|
-
{
|
|
94
|
-
dialogueManager?.GetFinisher().UnsubscribeToOnFinishOfDialogue(RestoreKey);
|
|
95
|
-
|
|
96
|
-
currentControlsKey.SetValue(originalKey);
|
|
97
|
-
|
|
98
|
-
currentControlsKey.AddListener(CheckInitializeKey);
|
|
99
|
-
}
|
|
100
|
-
}
|
|
1
|
+
//Author: Benjamin "Sweden" Jillson : Discord: sweden_gaming For Project Eden's Garden
|
|
2
|
+
using DREditor.Dialogues;
|
|
3
|
+
using DREditor.EventObjects;
|
|
4
|
+
using DREditor.Services;
|
|
5
|
+
using UnityEngine;
|
|
6
|
+
|
|
7
|
+
namespace DREditor.Minigames
|
|
8
|
+
{
|
|
9
|
+
/// <summary>
|
|
10
|
+
///
|
|
11
|
+
/// </summary>
|
|
12
|
+
[ClassHeader("")]
|
|
13
|
+
public class RestoreControlsUIPostDialogue : MonoBehaviour
|
|
14
|
+
{
|
|
15
|
+
/// <summary>
|
|
16
|
+
///
|
|
17
|
+
/// </summary>
|
|
18
|
+
[Tooltip("")]
|
|
19
|
+
[SerializeField] protected StringWithEvent currentControlsKey = null;
|
|
20
|
+
|
|
21
|
+
/// <summary>
|
|
22
|
+
///
|
|
23
|
+
/// </summary>
|
|
24
|
+
[Tooltip("")]
|
|
25
|
+
[SerializeField] protected string scanningKey = "trialdialogue";
|
|
26
|
+
|
|
27
|
+
/// <summary>
|
|
28
|
+
///
|
|
29
|
+
/// </summary>
|
|
30
|
+
[ReadOnly]
|
|
31
|
+
[Tooltip("")]
|
|
32
|
+
[SerializeField] protected string originalKey = "";
|
|
33
|
+
|
|
34
|
+
|
|
35
|
+
/// <summary>
|
|
36
|
+
///
|
|
37
|
+
/// </summary>
|
|
38
|
+
protected IDialogueManager dialogueManager;
|
|
39
|
+
|
|
40
|
+
|
|
41
|
+
protected virtual void OnEnable() => currentControlsKey.AddListener(CheckInitializeKey);
|
|
42
|
+
|
|
43
|
+
protected virtual void OnDisable()
|
|
44
|
+
{
|
|
45
|
+
currentControlsKey.RemoveListener(CheckInitializeKey);
|
|
46
|
+
|
|
47
|
+
dialogueManager?.GetFinisher().UnsubscribeToOnFinishOfDialogue(RestoreKey);
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
/// <summary>
|
|
51
|
+
///
|
|
52
|
+
/// </summary>
|
|
53
|
+
/// <param name="key"></param>
|
|
54
|
+
protected virtual void CheckInitializeKey(string key)
|
|
55
|
+
{
|
|
56
|
+
if (IsScannedKey(key))
|
|
57
|
+
OnScannedKeyFound();
|
|
58
|
+
else
|
|
59
|
+
InitializeOriginalKey();
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
/// <summary>
|
|
63
|
+
///
|
|
64
|
+
/// </summary>
|
|
65
|
+
/// <param name="key"></param>
|
|
66
|
+
/// <returns></returns>
|
|
67
|
+
protected virtual bool IsScannedKey(string key) => key == scanningKey;
|
|
68
|
+
|
|
69
|
+
/// <summary>
|
|
70
|
+
///
|
|
71
|
+
/// </summary>
|
|
72
|
+
protected virtual void OnScannedKeyFound()
|
|
73
|
+
{
|
|
74
|
+
currentControlsKey.RemoveListener(CheckInitializeKey);
|
|
75
|
+
|
|
76
|
+
if (ServiceLocator.HasService(out dialogueManager))
|
|
77
|
+
dialogueManager.GetFinisher().SubscribeToOnFinishOfDialogue(RestoreKey);
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
/// <summary>
|
|
81
|
+
///
|
|
82
|
+
/// </summary>
|
|
83
|
+
protected virtual void InitializeOriginalKey()
|
|
84
|
+
{
|
|
85
|
+
if (currentControlsKey.Value != scanningKey)
|
|
86
|
+
originalKey = currentControlsKey.Value;
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
/// <summary>
|
|
90
|
+
///
|
|
91
|
+
/// </summary>
|
|
92
|
+
protected virtual void RestoreKey()
|
|
93
|
+
{
|
|
94
|
+
dialogueManager?.GetFinisher().UnsubscribeToOnFinishOfDialogue(RestoreKey);
|
|
95
|
+
|
|
96
|
+
currentControlsKey.SetValue(originalKey);
|
|
97
|
+
|
|
98
|
+
currentControlsKey.AddListener(CheckInitializeKey);
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
101
|
}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
fileFormatVersion: 2
|
|
1
|
+
fileFormatVersion: 2
|
|
2
2
|
guid: 134c7b5389d92a14fbc80606f01394a3
|
|
@@ -1,23 +1,23 @@
|
|
|
1
|
-
%YAML 1.1
|
|
2
|
-
%TAG !u! tag:unity3d.com,2011:
|
|
3
|
-
--- !u!114 &11400000
|
|
4
|
-
MonoBehaviour:
|
|
5
|
-
m_ObjectHideFlags: 0
|
|
6
|
-
m_CorrespondingSourceObject: {fileID: 0}
|
|
7
|
-
m_PrefabInstance: {fileID: 0}
|
|
8
|
-
m_PrefabAsset: {fileID: 0}
|
|
9
|
-
m_GameObject: {fileID: 0}
|
|
10
|
-
m_Enabled: 1
|
|
11
|
-
m_EditorHideFlags: 0
|
|
12
|
-
m_Script: {fileID: 11500000, guid: 8a1731c7e2622884ab8452ffa01a107c, type: 3}
|
|
13
|
-
m_Name: Bullet Shatter Mesh Generator
|
|
14
|
-
m_EditorClassIdentifier:
|
|
15
|
-
horizontalResolution: 16
|
|
16
|
-
verticalResolution: 9
|
|
17
|
-
horizontalSize: 1920
|
|
18
|
-
verticleSize: 1080
|
|
19
|
-
maxOffset: 0.36942
|
|
20
|
-
forceMultiplier: 550
|
|
21
|
-
centerBreakFactor: 0.5
|
|
22
|
-
initialExplosionRadius: 1200
|
|
23
|
-
explosionRadius: 960
|
|
1
|
+
%YAML 1.1
|
|
2
|
+
%TAG !u! tag:unity3d.com,2011:
|
|
3
|
+
--- !u!114 &11400000
|
|
4
|
+
MonoBehaviour:
|
|
5
|
+
m_ObjectHideFlags: 0
|
|
6
|
+
m_CorrespondingSourceObject: {fileID: 0}
|
|
7
|
+
m_PrefabInstance: {fileID: 0}
|
|
8
|
+
m_PrefabAsset: {fileID: 0}
|
|
9
|
+
m_GameObject: {fileID: 0}
|
|
10
|
+
m_Enabled: 1
|
|
11
|
+
m_EditorHideFlags: 0
|
|
12
|
+
m_Script: {fileID: 11500000, guid: 8a1731c7e2622884ab8452ffa01a107c, type: 3}
|
|
13
|
+
m_Name: Bullet Shatter Mesh Generator
|
|
14
|
+
m_EditorClassIdentifier:
|
|
15
|
+
horizontalResolution: 16
|
|
16
|
+
verticalResolution: 9
|
|
17
|
+
horizontalSize: 1920
|
|
18
|
+
verticleSize: 1080
|
|
19
|
+
maxOffset: 0.36942
|
|
20
|
+
forceMultiplier: 550
|
|
21
|
+
centerBreakFactor: 0.5
|
|
22
|
+
initialExplosionRadius: 1200
|
|
23
|
+
explosionRadius: 960
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
fileFormatVersion: 2
|
|
2
|
-
guid: abd08977c45f602429e2ef1fd452197a
|
|
3
|
-
NativeFormatImporter:
|
|
4
|
-
externalObjects: {}
|
|
5
|
-
mainObjectFileID: 11400000
|
|
6
|
-
userData:
|
|
7
|
-
assetBundleName:
|
|
8
|
-
assetBundleVariant:
|
|
1
|
+
fileFormatVersion: 2
|
|
2
|
+
guid: abd08977c45f602429e2ef1fd452197a
|
|
3
|
+
NativeFormatImporter:
|
|
4
|
+
externalObjects: {}
|
|
5
|
+
mainObjectFileID: 11400000
|
|
6
|
+
userData:
|
|
7
|
+
assetBundleName:
|
|
8
|
+
assetBundleVariant:
|
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
%YAML 1.1
|
|
2
|
-
%TAG !u! tag:unity3d.com,2011:
|
|
3
|
-
--- !u!114 &11400000
|
|
4
|
-
MonoBehaviour:
|
|
5
|
-
m_ObjectHideFlags: 0
|
|
6
|
-
m_CorrespondingSourceObject: {fileID: 0}
|
|
7
|
-
m_PrefabInstance: {fileID: 0}
|
|
8
|
-
m_PrefabAsset: {fileID: 0}
|
|
9
|
-
m_GameObject: {fileID: 0}
|
|
10
|
-
m_Enabled: 1
|
|
11
|
-
m_EditorHideFlags: 0
|
|
12
|
-
m_Script: {fileID: 11500000, guid: ba8f98926693a40d88c7ad327c8a8f3b, type: 3}
|
|
13
|
-
m_Name: HasStamina
|
|
14
|
-
m_EditorClassIdentifier:
|
|
15
|
-
debug: 0
|
|
16
|
-
alwaysInvokeOnSetValue: 0
|
|
17
|
-
OnChange:
|
|
18
|
-
m_PersistentCalls:
|
|
19
|
-
m_Calls: []
|
|
20
|
-
InitialValue: 0
|
|
21
|
-
_value: 0
|
|
1
|
+
%YAML 1.1
|
|
2
|
+
%TAG !u! tag:unity3d.com,2011:
|
|
3
|
+
--- !u!114 &11400000
|
|
4
|
+
MonoBehaviour:
|
|
5
|
+
m_ObjectHideFlags: 0
|
|
6
|
+
m_CorrespondingSourceObject: {fileID: 0}
|
|
7
|
+
m_PrefabInstance: {fileID: 0}
|
|
8
|
+
m_PrefabAsset: {fileID: 0}
|
|
9
|
+
m_GameObject: {fileID: 0}
|
|
10
|
+
m_Enabled: 1
|
|
11
|
+
m_EditorHideFlags: 0
|
|
12
|
+
m_Script: {fileID: 11500000, guid: ba8f98926693a40d88c7ad327c8a8f3b, type: 3}
|
|
13
|
+
m_Name: HasStamina
|
|
14
|
+
m_EditorClassIdentifier:
|
|
15
|
+
debug: 0
|
|
16
|
+
alwaysInvokeOnSetValue: 0
|
|
17
|
+
OnChange:
|
|
18
|
+
m_PersistentCalls:
|
|
19
|
+
m_Calls: []
|
|
20
|
+
InitialValue: 0
|
|
21
|
+
_value: 0
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
fileFormatVersion: 2
|
|
2
|
-
guid: 9ca4484c1cb7077429755d2ed079d37e
|
|
3
|
-
NativeFormatImporter:
|
|
4
|
-
externalObjects: {}
|
|
5
|
-
mainObjectFileID: 11400000
|
|
6
|
-
userData:
|
|
7
|
-
assetBundleName:
|
|
8
|
-
assetBundleVariant:
|
|
1
|
+
fileFormatVersion: 2
|
|
2
|
+
guid: 9ca4484c1cb7077429755d2ed079d37e
|
|
3
|
+
NativeFormatImporter:
|
|
4
|
+
externalObjects: {}
|
|
5
|
+
mainObjectFileID: 11400000
|
|
6
|
+
userData:
|
|
7
|
+
assetBundleName:
|
|
8
|
+
assetBundleVariant:
|