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/Stats/TrialStatsBase.cs
CHANGED
|
@@ -1,37 +1,37 @@
|
|
|
1
|
-
//Author: Benjamin "Sweden" Jillson : Discord: sweden_gaming For Project Eden's Garden
|
|
2
|
-
using DREditor.Dialogues.LineReading;
|
|
3
|
-
using DREditor.Services;
|
|
4
|
-
using System.Collections;
|
|
5
|
-
|
|
6
|
-
namespace DREditor.Minigames.Stats
|
|
7
|
-
{
|
|
8
|
-
/// <summary>
|
|
9
|
-
///
|
|
10
|
-
/// </summary>
|
|
11
|
-
public abstract class TrialStatsBase : ServiceHolder<TrialStatsBase>, ITweenWaiter
|
|
12
|
-
{
|
|
13
|
-
/// <summary>
|
|
14
|
-
///
|
|
15
|
-
/// </summary>
|
|
16
|
-
public abstract IEnumerator GameOverResetProcess();
|
|
17
|
-
|
|
18
|
-
/// <summary>
|
|
19
|
-
///
|
|
20
|
-
/// </summary>
|
|
21
|
-
public abstract void ShowTrialStats();
|
|
22
|
-
|
|
23
|
-
/// <summary>
|
|
24
|
-
///
|
|
25
|
-
/// </summary>
|
|
26
|
-
public abstract void HideTrialStats();
|
|
27
|
-
|
|
28
|
-
/// <summary>
|
|
29
|
-
///
|
|
30
|
-
/// </summary>
|
|
31
|
-
/// <param name="damage"></param>
|
|
32
|
-
public abstract void TakeDamage(float damage = 0);
|
|
33
|
-
|
|
34
|
-
/// <inheritdoc/>
|
|
35
|
-
public abstract IEnumerator WaitForTweenToFinish();
|
|
36
|
-
}
|
|
1
|
+
//Author: Benjamin "Sweden" Jillson : Discord: sweden_gaming For Project Eden's Garden
|
|
2
|
+
using DREditor.Dialogues.LineReading;
|
|
3
|
+
using DREditor.Services;
|
|
4
|
+
using System.Collections;
|
|
5
|
+
|
|
6
|
+
namespace DREditor.Minigames.Stats
|
|
7
|
+
{
|
|
8
|
+
/// <summary>
|
|
9
|
+
///
|
|
10
|
+
/// </summary>
|
|
11
|
+
public abstract class TrialStatsBase : ServiceHolder<TrialStatsBase>, ITweenWaiter
|
|
12
|
+
{
|
|
13
|
+
/// <summary>
|
|
14
|
+
///
|
|
15
|
+
/// </summary>
|
|
16
|
+
public abstract IEnumerator GameOverResetProcess();
|
|
17
|
+
|
|
18
|
+
/// <summary>
|
|
19
|
+
///
|
|
20
|
+
/// </summary>
|
|
21
|
+
public abstract void ShowTrialStats();
|
|
22
|
+
|
|
23
|
+
/// <summary>
|
|
24
|
+
///
|
|
25
|
+
/// </summary>
|
|
26
|
+
public abstract void HideTrialStats();
|
|
27
|
+
|
|
28
|
+
/// <summary>
|
|
29
|
+
///
|
|
30
|
+
/// </summary>
|
|
31
|
+
/// <param name="damage"></param>
|
|
32
|
+
public abstract void TakeDamage(float damage = 0);
|
|
33
|
+
|
|
34
|
+
/// <inheritdoc/>
|
|
35
|
+
public abstract IEnumerator WaitForTweenToFinish();
|
|
36
|
+
}
|
|
37
37
|
}
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
fileFormatVersion: 2
|
|
2
|
-
guid: 1b6bf77a97622124f95b54a5a825f5a9
|
|
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: 1b6bf77a97622124f95b54a5a825f5a9
|
|
3
|
+
MonoImporter:
|
|
4
|
+
externalObjects: {}
|
|
5
|
+
serializedVersion: 2
|
|
6
|
+
defaultReferences: []
|
|
7
|
+
executionOrder: 0
|
|
8
|
+
icon: {instanceID: 0}
|
|
9
|
+
userData:
|
|
10
|
+
assetBundleName:
|
|
11
|
+
assetBundleVariant:
|
package/Stats.meta
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
fileFormatVersion: 2
|
|
2
|
-
guid: 15f0801b199d4b146b3887cd0ae6268c
|
|
3
|
-
folderAsset: yes
|
|
4
|
-
DefaultImporter:
|
|
5
|
-
externalObjects: {}
|
|
6
|
-
userData:
|
|
7
|
-
assetBundleName:
|
|
8
|
-
assetBundleVariant:
|
|
1
|
+
fileFormatVersion: 2
|
|
2
|
+
guid: 15f0801b199d4b146b3887cd0ae6268c
|
|
3
|
+
folderAsset: yes
|
|
4
|
+
DefaultImporter:
|
|
5
|
+
externalObjects: {}
|
|
6
|
+
userData:
|
|
7
|
+
assetBundleName:
|
|
8
|
+
assetBundleVariant:
|
package/TBS/TBSelectBuilder.cs
CHANGED
|
@@ -1,60 +1,60 @@
|
|
|
1
|
-
//Author: Benjamin "Sweden" Jillson : Discord: sweden_gaming For Project Eden's Garden
|
|
2
|
-
using System.Collections.Generic;
|
|
3
|
-
using System.Linq;
|
|
4
|
-
using UnityEngine;
|
|
5
|
-
|
|
6
|
-
namespace DREditor.Minigames.TBS
|
|
7
|
-
{
|
|
8
|
-
/// <summary>
|
|
9
|
-
///
|
|
10
|
-
/// </summary>
|
|
11
|
-
[System.Serializable]
|
|
12
|
-
[CreateAssetMenu(menuName = "DREditor/Minigames/Truth Bullet Select", fileName = "TBS Builder")]
|
|
13
|
-
public class TBSelectBuilder : MinigameBuilderBase
|
|
14
|
-
{
|
|
15
|
-
/// <summary>
|
|
16
|
-
///
|
|
17
|
-
/// </summary>
|
|
18
|
-
public int chapter = 0;
|
|
19
|
-
|
|
20
|
-
/// <summary>
|
|
21
|
-
///
|
|
22
|
-
/// </summary>
|
|
23
|
-
public int damageOnWrong = 1;
|
|
24
|
-
|
|
25
|
-
/// <summary>
|
|
26
|
-
///
|
|
27
|
-
/// </summary>
|
|
28
|
-
public string question;
|
|
29
|
-
|
|
30
|
-
/// <summary>
|
|
31
|
-
///
|
|
32
|
-
/// </summary>
|
|
33
|
-
public List<TBSelection> selections = new();
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
/// <summary>
|
|
37
|
-
///
|
|
38
|
-
/// </summary>
|
|
39
|
-
public virtual void SetChapter(int chapter) => this.chapter = chapter;
|
|
40
|
-
|
|
41
|
-
/// <summary>
|
|
42
|
-
///
|
|
43
|
-
/// </summary>
|
|
44
|
-
public virtual void SetDamage(int damageOnWrong) => this.damageOnWrong = damageOnWrong;
|
|
45
|
-
|
|
46
|
-
/// <summary>
|
|
47
|
-
///
|
|
48
|
-
/// </summary>
|
|
49
|
-
public virtual void SetQuestion(string question) => this.question = question;
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
/// <summary>
|
|
53
|
-
///
|
|
54
|
-
/// </summary>
|
|
55
|
-
/// <param name="chosenSelection"></param>
|
|
56
|
-
/// <returns></returns>
|
|
57
|
-
public virtual TBSelection GetSelection(string chosenSelection)
|
|
58
|
-
=> selections.Where(selection => chosenSelection == selection.bulletOption.DisplayName).FirstOrDefault();
|
|
59
|
-
}
|
|
1
|
+
//Author: Benjamin "Sweden" Jillson : Discord: sweden_gaming For Project Eden's Garden
|
|
2
|
+
using System.Collections.Generic;
|
|
3
|
+
using System.Linq;
|
|
4
|
+
using UnityEngine;
|
|
5
|
+
|
|
6
|
+
namespace DREditor.Minigames.TBS
|
|
7
|
+
{
|
|
8
|
+
/// <summary>
|
|
9
|
+
///
|
|
10
|
+
/// </summary>
|
|
11
|
+
[System.Serializable]
|
|
12
|
+
[CreateAssetMenu(menuName = "DREditor/Minigames/Truth Bullet Select", fileName = "TBS Builder")]
|
|
13
|
+
public class TBSelectBuilder : MinigameBuilderBase
|
|
14
|
+
{
|
|
15
|
+
/// <summary>
|
|
16
|
+
///
|
|
17
|
+
/// </summary>
|
|
18
|
+
public int chapter = 0;
|
|
19
|
+
|
|
20
|
+
/// <summary>
|
|
21
|
+
///
|
|
22
|
+
/// </summary>
|
|
23
|
+
public int damageOnWrong = 1;
|
|
24
|
+
|
|
25
|
+
/// <summary>
|
|
26
|
+
///
|
|
27
|
+
/// </summary>
|
|
28
|
+
public string question;
|
|
29
|
+
|
|
30
|
+
/// <summary>
|
|
31
|
+
///
|
|
32
|
+
/// </summary>
|
|
33
|
+
public List<TBSelection> selections = new();
|
|
34
|
+
|
|
35
|
+
|
|
36
|
+
/// <summary>
|
|
37
|
+
///
|
|
38
|
+
/// </summary>
|
|
39
|
+
public virtual void SetChapter(int chapter) => this.chapter = chapter;
|
|
40
|
+
|
|
41
|
+
/// <summary>
|
|
42
|
+
///
|
|
43
|
+
/// </summary>
|
|
44
|
+
public virtual void SetDamage(int damageOnWrong) => this.damageOnWrong = damageOnWrong;
|
|
45
|
+
|
|
46
|
+
/// <summary>
|
|
47
|
+
///
|
|
48
|
+
/// </summary>
|
|
49
|
+
public virtual void SetQuestion(string question) => this.question = question;
|
|
50
|
+
|
|
51
|
+
|
|
52
|
+
/// <summary>
|
|
53
|
+
///
|
|
54
|
+
/// </summary>
|
|
55
|
+
/// <param name="chosenSelection"></param>
|
|
56
|
+
/// <returns></returns>
|
|
57
|
+
public virtual TBSelection GetSelection(string chosenSelection)
|
|
58
|
+
=> selections.Where(selection => chosenSelection == selection.bulletOption.DisplayName).FirstOrDefault();
|
|
59
|
+
}
|
|
60
60
|
}
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
fileFormatVersion: 2
|
|
2
|
-
guid: 86f2676411d9aec4c9e2ee932c7ae970
|
|
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: 86f2676411d9aec4c9e2ee932c7ae970
|
|
3
|
+
MonoImporter:
|
|
4
|
+
externalObjects: {}
|
|
5
|
+
serializedVersion: 2
|
|
6
|
+
defaultReferences: []
|
|
7
|
+
executionOrder: 0
|
|
8
|
+
icon: {instanceID: 0}
|
|
9
|
+
userData:
|
|
10
|
+
assetBundleName:
|
|
11
|
+
assetBundleVariant:
|
|
@@ -1,167 +1,167 @@
|
|
|
1
|
-
//Author: Benjamin "Sweden" Jillson : Discord: sweden_gaming For Project Eden's Garden
|
|
2
|
-
#if UNITY_EDITOR
|
|
3
|
-
using DREditor.Dialogues;
|
|
4
|
-
using DREditor.Investigations;
|
|
5
|
-
using DREditor.Editor.Utility;
|
|
6
|
-
using UnityEditor;
|
|
7
|
-
using UnityEngine;
|
|
8
|
-
|
|
9
|
-
namespace DREditor.Minigames.TBS
|
|
10
|
-
{
|
|
11
|
-
/// <summary>
|
|
12
|
-
///
|
|
13
|
-
/// </summary>
|
|
14
|
-
[CustomEditor(typeof(TBSelectBuilder))]
|
|
15
|
-
public class TBSelectBuilderEditor : TimedMinigameEditor<TBSelectBuilder>
|
|
16
|
-
{
|
|
17
|
-
/// <summary>
|
|
18
|
-
///
|
|
19
|
-
/// </summary>
|
|
20
|
-
protected EvidenceDatabase evidenceDatabase;
|
|
21
|
-
|
|
22
|
-
/// <summary>
|
|
23
|
-
///
|
|
24
|
-
/// </summary>
|
|
25
|
-
protected TrialDialogue allDialogue;
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
/// <inheritdoc/>
|
|
29
|
-
public override void OnInspectorGUI()
|
|
30
|
-
{
|
|
31
|
-
serializedObject.Update();
|
|
32
|
-
|
|
33
|
-
if (!DatabaseUtility.InitializeDatabase(evidenceDatabase, out evidenceDatabase))
|
|
34
|
-
return;
|
|
35
|
-
|
|
36
|
-
CreateForm();
|
|
37
|
-
|
|
38
|
-
EditorUtility.SetDirty(builder);
|
|
39
|
-
|
|
40
|
-
serializedObject.ApplyModifiedProperties();
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
/// <summary>
|
|
44
|
-
///
|
|
45
|
-
/// </summary>
|
|
46
|
-
protected virtual void CreateForm()
|
|
47
|
-
{
|
|
48
|
-
SetBasicData();
|
|
49
|
-
|
|
50
|
-
if (!EvaluateChapterEvidence())
|
|
51
|
-
return;
|
|
52
|
-
|
|
53
|
-
SetGlobalWrongDialogue();
|
|
54
|
-
|
|
55
|
-
DisplayTruthBullets();
|
|
56
|
-
}
|
|
57
|
-
|
|
58
|
-
/// <summary>
|
|
59
|
-
///
|
|
60
|
-
/// </summary>
|
|
61
|
-
protected virtual void SetBasicData()
|
|
62
|
-
{
|
|
63
|
-
builder.SetDamage(HandyFields.IntField("Damage on Wrong: ", builder.damageOnWrong, 25, 7));
|
|
64
|
-
|
|
65
|
-
builder.SetDifficultyTimes(TimerDifficultyEditor.DisplaySettings(builder.times));
|
|
66
|
-
|
|
67
|
-
builder.SetQuestion(HandyFields.StringArea("Question: ", builder.question));
|
|
68
|
-
}
|
|
69
|
-
|
|
70
|
-
/// <summary>
|
|
71
|
-
///
|
|
72
|
-
/// </summary>
|
|
73
|
-
/// <returns></returns>
|
|
74
|
-
protected virtual bool EvaluateChapterEvidence()
|
|
75
|
-
{
|
|
76
|
-
builder.SetChapter(HandyFields.IntField("Chapter: ", builder.chapter, 25, 7));
|
|
77
|
-
|
|
78
|
-
if (builder.chapter < 0 || builder.chapter > evidenceDatabase.Evidences.Count - 1)
|
|
79
|
-
{
|
|
80
|
-
GUILayout.Label("Chapter has no Evidence", GUILayout.Width(220));
|
|
81
|
-
|
|
82
|
-
return false;
|
|
83
|
-
}
|
|
84
|
-
|
|
85
|
-
if (builder.selections.Count == 0)
|
|
86
|
-
for (int i = 0; i < evidenceDatabase.Evidences[builder.chapter].TruthBullets.Count; i++)
|
|
87
|
-
builder.selections.Add(new TBSelection());
|
|
88
|
-
|
|
89
|
-
if (evidenceDatabase.Evidences[builder.chapter].TruthBullets.Count != builder.selections.Count)
|
|
90
|
-
{
|
|
91
|
-
int diff = builder.selections.Count - evidenceDatabase.Evidences[builder.chapter].TruthBullets.Count;
|
|
92
|
-
|
|
93
|
-
if (diff > 0) // Removed TB from Evidence
|
|
94
|
-
builder.selections.RemoveAt(builder.selections.Count - diff);
|
|
95
|
-
else // Added TB to Evidence
|
|
96
|
-
{
|
|
97
|
-
diff *= -1;
|
|
98
|
-
|
|
99
|
-
for (int i = 0; i < diff; i++)
|
|
100
|
-
builder.selections.Add(new TBSelection());
|
|
101
|
-
}
|
|
102
|
-
}
|
|
103
|
-
|
|
104
|
-
return true;
|
|
105
|
-
}
|
|
106
|
-
|
|
107
|
-
/// <summary>
|
|
108
|
-
///
|
|
109
|
-
/// </summary>
|
|
110
|
-
protected virtual void SetGlobalWrongDialogue()
|
|
111
|
-
{
|
|
112
|
-
using (new GUILayout.HorizontalScope())
|
|
113
|
-
{
|
|
114
|
-
GUILayout.Label("Copy All Wrong Dialogue", GUILayout.Width(170));
|
|
115
|
-
|
|
116
|
-
allDialogue = HandyFields.UnityField(allDialogue, 170, 25);
|
|
117
|
-
|
|
118
|
-
if (GUILayout.Button("Paste To All"))
|
|
119
|
-
for (int i = 0; i < builder.selections.Count; i++)
|
|
120
|
-
builder.selections[i].SetWrongDialogue(allDialogue);
|
|
121
|
-
|
|
122
|
-
if (GUILayout.Button("Clear All"))
|
|
123
|
-
for (int i = 0; i < builder.selections.Count; i++)
|
|
124
|
-
builder.selections[i].SetWrongDialogue(null);
|
|
125
|
-
}
|
|
126
|
-
|
|
127
|
-
using (new GUILayout.HorizontalScope())
|
|
128
|
-
GUILayout.Label("", GUILayout.Width(120));
|
|
129
|
-
}
|
|
130
|
-
|
|
131
|
-
/// <summary>
|
|
132
|
-
///
|
|
133
|
-
/// </summary>
|
|
134
|
-
protected virtual void DisplayTruthBullets()
|
|
135
|
-
{
|
|
136
|
-
Evidence evidence = evidenceDatabase.Evidences[builder.chapter];
|
|
137
|
-
|
|
138
|
-
for (int i = 0; i < builder.selections.Count; i++)
|
|
139
|
-
{
|
|
140
|
-
builder.selections[i].SetBullet(evidence.TruthBullets[i]);
|
|
141
|
-
|
|
142
|
-
using (new GUILayout.HorizontalScope())
|
|
143
|
-
{
|
|
144
|
-
GUILayout.Label(builder.selections[i].bulletOption.DisplayName, GUILayout.Width(120));
|
|
145
|
-
|
|
146
|
-
builder.selections[i].SetAnswer(EditorGUILayout.Toggle(builder.selections[i].isAnswer));
|
|
147
|
-
}
|
|
148
|
-
|
|
149
|
-
if (!builder.selections[i].isAnswer)
|
|
150
|
-
{
|
|
151
|
-
using (new GUILayout.HorizontalScope())
|
|
152
|
-
{
|
|
153
|
-
GUILayout.Label("On Wrong Dialogue: ", GUILayout.Width(120));
|
|
154
|
-
|
|
155
|
-
builder.selections[i].SetWrongDialogue(HandyFields.UnityField(builder.selections[i].wrongDialogue, 170, 25));
|
|
156
|
-
}
|
|
157
|
-
}
|
|
158
|
-
else
|
|
159
|
-
builder.selections[i].SetWrongDialogue(null);
|
|
160
|
-
|
|
161
|
-
using (new GUILayout.HorizontalScope())
|
|
162
|
-
GUILayout.Label("", GUILayout.Width(120));
|
|
163
|
-
}
|
|
164
|
-
}
|
|
165
|
-
}
|
|
166
|
-
}
|
|
1
|
+
//Author: Benjamin "Sweden" Jillson : Discord: sweden_gaming For Project Eden's Garden
|
|
2
|
+
#if UNITY_EDITOR
|
|
3
|
+
using DREditor.Dialogues;
|
|
4
|
+
using DREditor.Investigations;
|
|
5
|
+
using DREditor.Editor.Utility;
|
|
6
|
+
using UnityEditor;
|
|
7
|
+
using UnityEngine;
|
|
8
|
+
|
|
9
|
+
namespace DREditor.Minigames.TBS
|
|
10
|
+
{
|
|
11
|
+
/// <summary>
|
|
12
|
+
///
|
|
13
|
+
/// </summary>
|
|
14
|
+
[CustomEditor(typeof(TBSelectBuilder))]
|
|
15
|
+
public class TBSelectBuilderEditor : TimedMinigameEditor<TBSelectBuilder>
|
|
16
|
+
{
|
|
17
|
+
/// <summary>
|
|
18
|
+
///
|
|
19
|
+
/// </summary>
|
|
20
|
+
protected EvidenceDatabase evidenceDatabase;
|
|
21
|
+
|
|
22
|
+
/// <summary>
|
|
23
|
+
///
|
|
24
|
+
/// </summary>
|
|
25
|
+
protected TrialDialogue allDialogue;
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
/// <inheritdoc/>
|
|
29
|
+
public override void OnInspectorGUI()
|
|
30
|
+
{
|
|
31
|
+
serializedObject.Update();
|
|
32
|
+
|
|
33
|
+
if (!DatabaseUtility.InitializeDatabase(evidenceDatabase, out evidenceDatabase))
|
|
34
|
+
return;
|
|
35
|
+
|
|
36
|
+
CreateForm();
|
|
37
|
+
|
|
38
|
+
EditorUtility.SetDirty(builder);
|
|
39
|
+
|
|
40
|
+
serializedObject.ApplyModifiedProperties();
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
/// <summary>
|
|
44
|
+
///
|
|
45
|
+
/// </summary>
|
|
46
|
+
protected virtual void CreateForm()
|
|
47
|
+
{
|
|
48
|
+
SetBasicData();
|
|
49
|
+
|
|
50
|
+
if (!EvaluateChapterEvidence())
|
|
51
|
+
return;
|
|
52
|
+
|
|
53
|
+
SetGlobalWrongDialogue();
|
|
54
|
+
|
|
55
|
+
DisplayTruthBullets();
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
/// <summary>
|
|
59
|
+
///
|
|
60
|
+
/// </summary>
|
|
61
|
+
protected virtual void SetBasicData()
|
|
62
|
+
{
|
|
63
|
+
builder.SetDamage(HandyFields.IntField("Damage on Wrong: ", builder.damageOnWrong, 25, 7));
|
|
64
|
+
|
|
65
|
+
builder.SetDifficultyTimes(TimerDifficultyEditor.DisplaySettings(builder.times));
|
|
66
|
+
|
|
67
|
+
builder.SetQuestion(HandyFields.StringArea("Question: ", builder.question));
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
/// <summary>
|
|
71
|
+
///
|
|
72
|
+
/// </summary>
|
|
73
|
+
/// <returns></returns>
|
|
74
|
+
protected virtual bool EvaluateChapterEvidence()
|
|
75
|
+
{
|
|
76
|
+
builder.SetChapter(HandyFields.IntField("Chapter: ", builder.chapter, 25, 7));
|
|
77
|
+
|
|
78
|
+
if (builder.chapter < 0 || builder.chapter > evidenceDatabase.Evidences.Count - 1)
|
|
79
|
+
{
|
|
80
|
+
GUILayout.Label("Chapter has no Evidence", GUILayout.Width(220));
|
|
81
|
+
|
|
82
|
+
return false;
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
if (builder.selections.Count == 0)
|
|
86
|
+
for (int i = 0; i < evidenceDatabase.Evidences[builder.chapter].TruthBullets.Count; i++)
|
|
87
|
+
builder.selections.Add(new TBSelection());
|
|
88
|
+
|
|
89
|
+
if (evidenceDatabase.Evidences[builder.chapter].TruthBullets.Count != builder.selections.Count)
|
|
90
|
+
{
|
|
91
|
+
int diff = builder.selections.Count - evidenceDatabase.Evidences[builder.chapter].TruthBullets.Count;
|
|
92
|
+
|
|
93
|
+
if (diff > 0) // Removed TB from Evidence
|
|
94
|
+
builder.selections.RemoveAt(builder.selections.Count - diff);
|
|
95
|
+
else // Added TB to Evidence
|
|
96
|
+
{
|
|
97
|
+
diff *= -1;
|
|
98
|
+
|
|
99
|
+
for (int i = 0; i < diff; i++)
|
|
100
|
+
builder.selections.Add(new TBSelection());
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
return true;
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
/// <summary>
|
|
108
|
+
///
|
|
109
|
+
/// </summary>
|
|
110
|
+
protected virtual void SetGlobalWrongDialogue()
|
|
111
|
+
{
|
|
112
|
+
using (new GUILayout.HorizontalScope())
|
|
113
|
+
{
|
|
114
|
+
GUILayout.Label("Copy All Wrong Dialogue", GUILayout.Width(170));
|
|
115
|
+
|
|
116
|
+
allDialogue = HandyFields.UnityField(allDialogue, 170, 25);
|
|
117
|
+
|
|
118
|
+
if (GUILayout.Button("Paste To All"))
|
|
119
|
+
for (int i = 0; i < builder.selections.Count; i++)
|
|
120
|
+
builder.selections[i].SetWrongDialogue(allDialogue);
|
|
121
|
+
|
|
122
|
+
if (GUILayout.Button("Clear All"))
|
|
123
|
+
for (int i = 0; i < builder.selections.Count; i++)
|
|
124
|
+
builder.selections[i].SetWrongDialogue(null);
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
using (new GUILayout.HorizontalScope())
|
|
128
|
+
GUILayout.Label("", GUILayout.Width(120));
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
/// <summary>
|
|
132
|
+
///
|
|
133
|
+
/// </summary>
|
|
134
|
+
protected virtual void DisplayTruthBullets()
|
|
135
|
+
{
|
|
136
|
+
Evidence evidence = evidenceDatabase.Evidences[builder.chapter];
|
|
137
|
+
|
|
138
|
+
for (int i = 0; i < builder.selections.Count; i++)
|
|
139
|
+
{
|
|
140
|
+
builder.selections[i].SetBullet(evidence.TruthBullets[i]);
|
|
141
|
+
|
|
142
|
+
using (new GUILayout.HorizontalScope())
|
|
143
|
+
{
|
|
144
|
+
GUILayout.Label(builder.selections[i].bulletOption.DisplayName, GUILayout.Width(120));
|
|
145
|
+
|
|
146
|
+
builder.selections[i].SetAnswer(EditorGUILayout.Toggle(builder.selections[i].isAnswer));
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
if (!builder.selections[i].isAnswer)
|
|
150
|
+
{
|
|
151
|
+
using (new GUILayout.HorizontalScope())
|
|
152
|
+
{
|
|
153
|
+
GUILayout.Label("On Wrong Dialogue: ", GUILayout.Width(120));
|
|
154
|
+
|
|
155
|
+
builder.selections[i].SetWrongDialogue(HandyFields.UnityField(builder.selections[i].wrongDialogue, 170, 25));
|
|
156
|
+
}
|
|
157
|
+
}
|
|
158
|
+
else
|
|
159
|
+
builder.selections[i].SetWrongDialogue(null);
|
|
160
|
+
|
|
161
|
+
using (new GUILayout.HorizontalScope())
|
|
162
|
+
GUILayout.Label("", GUILayout.Width(120));
|
|
163
|
+
}
|
|
164
|
+
}
|
|
165
|
+
}
|
|
166
|
+
}
|
|
167
167
|
#endif
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
fileFormatVersion: 2
|
|
2
|
-
guid: 54c32e0969cf1e0458f7792e6ac0f0c8
|
|
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: 54c32e0969cf1e0458f7792e6ac0f0c8
|
|
3
|
+
MonoImporter:
|
|
4
|
+
externalObjects: {}
|
|
5
|
+
serializedVersion: 2
|
|
6
|
+
defaultReferences: []
|
|
7
|
+
executionOrder: 0
|
|
8
|
+
icon: {instanceID: 0}
|
|
9
|
+
userData:
|
|
10
|
+
assetBundleName:
|
|
11
|
+
assetBundleVariant:
|