net.dreditor.minigames.ss 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.
Files changed (44) hide show
  1. package/.attestation.p7m +0 -0
  2. package/DREditor.Minigames.SS.asmdef +20 -20
  3. package/DREditor.Minigames.SS.asmdef.meta +7 -7
  4. package/{Samples → Samples~}/SS_CG.prefab +116 -116
  5. package/{Samples → Samples~}/SS_CG.prefab.meta +7 -7
  6. package/{Samples → Samples~}/SS_Canvas_Shell.prefab +99 -99
  7. package/{Samples → Samples~}/SS_Canvas_Shell.prefab.meta +7 -7
  8. package/{Samples → Samples~}/SS_Canvas_Template.prefab +841 -841
  9. package/{Samples → Samples~}/SS_Canvas_Template.prefab.meta +7 -7
  10. package/{Samples → Samples~}/SS_Intro_Template.prefab +79 -79
  11. package/{Samples → Samples~}/SS_Intro_Template.prefab.meta +7 -7
  12. package/{Samples → Samples~}/SS_Manager_Template.prefab +530 -530
  13. package/{Samples → Samples~}/SS_Manager_Template.prefab.meta +7 -7
  14. package/{Samples → Samples~}/SS_Reticle_Template.prefab +244 -244
  15. package/{Samples → Samples~}/SS_Reticle_Template.prefab.meta +7 -7
  16. package/Spot.cs +85 -85
  17. package/Spot.cs.meta +11 -11
  18. package/SpotColliderHandler.cs +67 -67
  19. package/SpotColliderHandler.cs.meta +11 -11
  20. package/SpotSelectionBuilder.cs +88 -88
  21. package/SpotSelectionBuilder.cs.meta +11 -11
  22. package/SpotSelectionBuilderEditor.cs +134 -134
  23. package/SpotSelectionBuilderEditor.cs.meta +11 -11
  24. package/SpotSelectionComponent.cs +26 -26
  25. package/SpotSelectionComponent.cs.meta +11 -11
  26. package/SpotSelectionDisplayer.cs +28 -28
  27. package/SpotSelectionDisplayer.cs.meta +11 -11
  28. package/SpotSelectionEditorComponentBase.cs +24 -24
  29. package/SpotSelectionEditorComponentBase.cs.meta +11 -11
  30. package/SpotSelectionImageDisplayer.cs +29 -29
  31. package/SpotSelectionImageDisplayer.cs.meta +11 -11
  32. package/SpotSelectionManager.cs +308 -308
  33. package/SpotSelectionManager.cs.meta +11 -11
  34. package/SpotSelectionManagerBase.cs +83 -83
  35. package/SpotSelectionManagerBase.cs.meta +1 -1
  36. package/SpotSelectionReticle.cs +45 -45
  37. package/SpotSelectionReticle.cs.meta +11 -11
  38. package/SpotSelectionToolEditor.cs +171 -171
  39. package/SpotSelectionToolEditor.cs.meta +11 -11
  40. package/SpotsEditor.cs +190 -190
  41. package/SpotsEditor.cs.meta +11 -11
  42. package/package.json +43 -38
  43. package/package.json.meta +7 -7
  44. package/Samples.meta +0 -8
@@ -1,135 +1,135 @@
1
- //Author: Benjamin "Sweden" Jillson : Discord: sweden_gaming For Project Eden's Garden
2
- #if UNITY_EDITOR
3
- using DREditor.Editor.Utility;
4
- using UnityEditor;
5
- using UnityEngine;
6
-
7
- namespace DREditor.Minigames.SS
8
- {
9
- /// <summary>
10
- ///
11
- /// </summary>
12
- [CustomEditor(typeof(SpotSelectionBuilder))]
13
- public class SpotSelectionBuilderEditor : TimedMinigameEditor<SpotSelectionBuilder>
14
- {
15
- /// <summary>
16
- ///
17
- /// </summary>
18
- protected SpotSelectionToolEditor toolEditor;
19
-
20
- /// <summary>
21
- ///
22
- /// </summary>
23
- protected SpotsEditor spotsEditor;
24
-
25
-
26
- /// <inheritdoc/>
27
- protected override void OnEnable()
28
- {
29
- base.OnEnable();
30
-
31
- if (builder != null && toolEditor == null)
32
- toolEditor = new(builder);
33
-
34
- if (builder != null && spotsEditor == null)
35
- spotsEditor = new(builder);
36
- }
37
-
38
-
39
- /// <inheritdoc/>
40
- public override void OnInspectorGUI()
41
- {
42
- serializedObject.Update();
43
-
44
- CreateForm();
45
-
46
- EditorUtility.SetDirty(builder);
47
-
48
- serializedObject.ApplyModifiedProperties();
49
- }
50
-
51
- /// <summary>
52
- ///
53
- /// </summary>
54
- protected virtual void CreateForm()
55
- {
56
- DisplayBaseInformation();
57
-
58
- DisplayBuildTools();
59
-
60
- DisplayBuilder();
61
-
62
- DisplaySpots();
63
- }
64
-
65
-
66
- /// <summary>
67
- ///
68
- /// </summary>
69
- protected virtual void DisplayBaseInformation()
70
- {
71
- builder.SetQuestion(HandyFields.StringArea("Question: ", builder.question));
72
-
73
- builder.SetDamageOnWrong(HandyFields.IntField("Damage on Wrong: ", builder.damageOnWrong, 25, 7));
74
-
75
- builder.SetDifficultyTimes(TimerDifficultyEditor.DisplaySettings(builder.times));
76
- }
77
-
78
-
79
- /// <summary>
80
- ///
81
- /// </summary>
82
- protected virtual void DisplayBuildTools() => toolEditor?.Display();
83
-
84
-
85
- /// <summary>
86
- ///
87
- /// </summary>
88
- protected virtual void DisplayBuilder()
89
- {
90
- DisplaySelectionImage();
91
-
92
- DisplayDeleteSpotsButton();
93
- }
94
-
95
- /// <summary>
96
- ///
97
- /// </summary>
98
- protected virtual void DisplaySelectionImage()
99
- {
100
- builder.SetSprite(HandyFields.SpriteField("Room Image: ", builder.sprite));
101
-
102
- GUILayout.Space(30);
103
- }
104
-
105
- /// <summary>
106
- ///
107
- /// </summary>
108
- protected virtual void DisplayDeleteSpotsButton()
109
- {
110
- if (builder.spots.Count > 0)
111
- {
112
- using (new GUILayout.HorizontalScope())
113
- {
114
- GUILayout.Space(60);
115
-
116
- if (GUILayout.Button("Delete All Spots", GUILayout.Width(120)) &&
117
- EditorUtility.DisplayDialog(
118
- "Clear All",
119
- "Are you sure you want to Delete ALL spots from the list?",
120
- "Yes", "No"))
121
- builder.spots.Clear();
122
- }
123
- }
124
-
125
- GUILayout.Space(30);
126
- }
127
-
128
-
129
- /// <summary>
130
- ///
131
- /// </summary>
132
- protected virtual void DisplaySpots() => spotsEditor?.Display();
133
- }
134
- }
1
+ //Author: Benjamin "Sweden" Jillson : Discord: sweden_gaming For Project Eden's Garden
2
+ #if UNITY_EDITOR
3
+ using DREditor.Editor.Utility;
4
+ using UnityEditor;
5
+ using UnityEngine;
6
+
7
+ namespace DREditor.Minigames.SS
8
+ {
9
+ /// <summary>
10
+ ///
11
+ /// </summary>
12
+ [CustomEditor(typeof(SpotSelectionBuilder))]
13
+ public class SpotSelectionBuilderEditor : TimedMinigameEditor<SpotSelectionBuilder>
14
+ {
15
+ /// <summary>
16
+ ///
17
+ /// </summary>
18
+ protected SpotSelectionToolEditor toolEditor;
19
+
20
+ /// <summary>
21
+ ///
22
+ /// </summary>
23
+ protected SpotsEditor spotsEditor;
24
+
25
+
26
+ /// <inheritdoc/>
27
+ protected override void OnEnable()
28
+ {
29
+ base.OnEnable();
30
+
31
+ if (builder != null && toolEditor == null)
32
+ toolEditor = new(builder);
33
+
34
+ if (builder != null && spotsEditor == null)
35
+ spotsEditor = new(builder);
36
+ }
37
+
38
+
39
+ /// <inheritdoc/>
40
+ public override void OnInspectorGUI()
41
+ {
42
+ serializedObject.Update();
43
+
44
+ CreateForm();
45
+
46
+ EditorUtility.SetDirty(builder);
47
+
48
+ serializedObject.ApplyModifiedProperties();
49
+ }
50
+
51
+ /// <summary>
52
+ ///
53
+ /// </summary>
54
+ protected virtual void CreateForm()
55
+ {
56
+ DisplayBaseInformation();
57
+
58
+ DisplayBuildTools();
59
+
60
+ DisplayBuilder();
61
+
62
+ DisplaySpots();
63
+ }
64
+
65
+
66
+ /// <summary>
67
+ ///
68
+ /// </summary>
69
+ protected virtual void DisplayBaseInformation()
70
+ {
71
+ builder.SetQuestion(HandyFields.StringArea("Question: ", builder.question));
72
+
73
+ builder.SetDamageOnWrong(HandyFields.IntField("Damage on Wrong: ", builder.damageOnWrong, 25, 7));
74
+
75
+ builder.SetDifficultyTimes(TimerDifficultyEditor.DisplaySettings(builder.times));
76
+ }
77
+
78
+
79
+ /// <summary>
80
+ ///
81
+ /// </summary>
82
+ protected virtual void DisplayBuildTools() => toolEditor?.Display();
83
+
84
+
85
+ /// <summary>
86
+ ///
87
+ /// </summary>
88
+ protected virtual void DisplayBuilder()
89
+ {
90
+ DisplaySelectionImage();
91
+
92
+ DisplayDeleteSpotsButton();
93
+ }
94
+
95
+ /// <summary>
96
+ ///
97
+ /// </summary>
98
+ protected virtual void DisplaySelectionImage()
99
+ {
100
+ builder.SetSprite(HandyFields.SpriteField("Room Image: ", builder.sprite));
101
+
102
+ GUILayout.Space(30);
103
+ }
104
+
105
+ /// <summary>
106
+ ///
107
+ /// </summary>
108
+ protected virtual void DisplayDeleteSpotsButton()
109
+ {
110
+ if (builder.spots.Count > 0)
111
+ {
112
+ using (new GUILayout.HorizontalScope())
113
+ {
114
+ GUILayout.Space(60);
115
+
116
+ if (GUILayout.Button("Delete All Spots", GUILayout.Width(120)) &&
117
+ EditorUtility.DisplayDialog(
118
+ "Clear All",
119
+ "Are you sure you want to Delete ALL spots from the list?",
120
+ "Yes", "No"))
121
+ builder.spots.Clear();
122
+ }
123
+ }
124
+
125
+ GUILayout.Space(30);
126
+ }
127
+
128
+
129
+ /// <summary>
130
+ ///
131
+ /// </summary>
132
+ protected virtual void DisplaySpots() => spotsEditor?.Display();
133
+ }
134
+ }
135
135
  #endif
@@ -1,11 +1,11 @@
1
- fileFormatVersion: 2
2
- guid: ff93bdb5167902d478bee3f559fd4824
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: ff93bdb5167902d478bee3f559fd4824
3
+ MonoImporter:
4
+ externalObjects: {}
5
+ serializedVersion: 2
6
+ defaultReferences: []
7
+ executionOrder: 0
8
+ icon: {instanceID: 0}
9
+ userData:
10
+ assetBundleName:
11
+ assetBundleVariant:
@@ -1,27 +1,27 @@
1
- //Author: Benjamin "Sweden" Jillson : Discord: sweden_gaming For Project Eden's Garden
2
- using DREditor.UIHandling;
3
- using System.Collections;
4
- using UnityEngine;
5
-
6
- namespace DREditor.Minigames.SS
7
- {
8
- /// <summary>
9
- ///
10
- /// </summary>
11
- public abstract class SpotSelectionComponent : MonoBehaviour, IUIVisibility
12
- {
13
- /// <summary>
14
- ///
15
- /// </summary>
16
- public abstract void Initialize(SpotSelectionBuilder builder);
17
-
18
- /// <inheritdoc/>
19
- public abstract void Show();
20
-
21
- /// <inheritdoc/>
22
- public abstract void Hide();
23
-
24
- /// <inheritdoc/>
25
- public abstract IEnumerator WaitForChangeToComplete();
26
- }
1
+ //Author: Benjamin "Sweden" Jillson : Discord: sweden_gaming For Project Eden's Garden
2
+ using DREditor.UIHandling;
3
+ using System.Collections;
4
+ using UnityEngine;
5
+
6
+ namespace DREditor.Minigames.SS
7
+ {
8
+ /// <summary>
9
+ ///
10
+ /// </summary>
11
+ public abstract class SpotSelectionComponent : MonoBehaviour, IUIVisibility
12
+ {
13
+ /// <summary>
14
+ ///
15
+ /// </summary>
16
+ public abstract void Initialize(SpotSelectionBuilder builder);
17
+
18
+ /// <inheritdoc/>
19
+ public abstract void Show();
20
+
21
+ /// <inheritdoc/>
22
+ public abstract void Hide();
23
+
24
+ /// <inheritdoc/>
25
+ public abstract IEnumerator WaitForChangeToComplete();
26
+ }
27
27
  }
@@ -1,11 +1,11 @@
1
- fileFormatVersion: 2
2
- guid: ad4260f37ca138d45acd36ce83e78cb8
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: ad4260f37ca138d45acd36ce83e78cb8
3
+ MonoImporter:
4
+ externalObjects: {}
5
+ serializedVersion: 2
6
+ defaultReferences: []
7
+ executionOrder: 0
8
+ icon: {instanceID: 0}
9
+ userData:
10
+ assetBundleName:
11
+ assetBundleVariant:
@@ -1,29 +1,29 @@
1
- //Author: Benjamin "Sweden" Jillson : Discord: sweden_gaming For Project Eden's Garden
2
- using DREditor.UIHandling;
3
- using System.Collections;
4
- using UnityEngine;
5
-
6
- namespace DREditor.Minigames.SS
7
- {
8
- /// <summary>
9
- ///
10
- /// </summary>
11
- public abstract class SpotSelectionDisplayer : SpotSelectionComponent
12
- {
13
- /// <summary>
14
- ///
15
- /// </summary>
16
- [Tooltip("")]
17
- [SerializeField] protected UIVisibilityComponent displayer = null;
18
-
19
-
20
- /// <inheritdoc/>
21
- public override void Show() => displayer.Show();
22
-
23
- /// <inheritdoc/>
24
- public override void Hide() => displayer.Hide();
25
-
26
- /// <inheritdoc/>
27
- public override IEnumerator WaitForChangeToComplete() => displayer.WaitForChangeToComplete();
28
- }
1
+ //Author: Benjamin "Sweden" Jillson : Discord: sweden_gaming For Project Eden's Garden
2
+ using DREditor.UIHandling;
3
+ using System.Collections;
4
+ using UnityEngine;
5
+
6
+ namespace DREditor.Minigames.SS
7
+ {
8
+ /// <summary>
9
+ ///
10
+ /// </summary>
11
+ public abstract class SpotSelectionDisplayer : SpotSelectionComponent
12
+ {
13
+ /// <summary>
14
+ ///
15
+ /// </summary>
16
+ [Tooltip("")]
17
+ [SerializeField] protected UIVisibilityComponent displayer = null;
18
+
19
+
20
+ /// <inheritdoc/>
21
+ public override void Show() => displayer.Show();
22
+
23
+ /// <inheritdoc/>
24
+ public override void Hide() => displayer.Hide();
25
+
26
+ /// <inheritdoc/>
27
+ public override IEnumerator WaitForChangeToComplete() => displayer.WaitForChangeToComplete();
28
+ }
29
29
  }
@@ -1,11 +1,11 @@
1
- fileFormatVersion: 2
2
- guid: 2d1b4c0ad21e229498448edc674fae4f
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: 2d1b4c0ad21e229498448edc674fae4f
3
+ MonoImporter:
4
+ externalObjects: {}
5
+ serializedVersion: 2
6
+ defaultReferences: []
7
+ executionOrder: 0
8
+ icon: {instanceID: 0}
9
+ userData:
10
+ assetBundleName:
11
+ assetBundleVariant:
@@ -1,25 +1,25 @@
1
- //Author: Benjamin "Sweden" Jillson : Discord: sweden_gaming For Project Eden's Garden
2
-
3
- namespace DREditor.Minigames.SS
4
- {
5
- /// <summary>
6
- ///
7
- /// </summary>
8
- [System.Serializable]
9
- public abstract class SpotSelectionEditorComponentBase
10
- {
11
- /// <summary>
12
- ///
13
- /// </summary>
14
- protected SpotSelectionBuilder builder;
15
-
16
-
17
- protected SpotSelectionEditorComponentBase(SpotSelectionBuilder builder) => this.builder = builder;
18
-
19
-
20
- /// <summary>
21
- ///
22
- /// </summary>
23
- public abstract void Display();
24
- }
1
+ //Author: Benjamin "Sweden" Jillson : Discord: sweden_gaming For Project Eden's Garden
2
+
3
+ namespace DREditor.Minigames.SS
4
+ {
5
+ /// <summary>
6
+ ///
7
+ /// </summary>
8
+ [System.Serializable]
9
+ public abstract class SpotSelectionEditorComponentBase
10
+ {
11
+ /// <summary>
12
+ ///
13
+ /// </summary>
14
+ protected SpotSelectionBuilder builder;
15
+
16
+
17
+ protected SpotSelectionEditorComponentBase(SpotSelectionBuilder builder) => this.builder = builder;
18
+
19
+
20
+ /// <summary>
21
+ ///
22
+ /// </summary>
23
+ public abstract void Display();
24
+ }
25
25
  }
@@ -1,11 +1,11 @@
1
- fileFormatVersion: 2
2
- guid: 2302f94a32e2e5e47a2b3e8069390e21
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: 2302f94a32e2e5e47a2b3e8069390e21
3
+ MonoImporter:
4
+ externalObjects: {}
5
+ serializedVersion: 2
6
+ defaultReferences: []
7
+ executionOrder: 0
8
+ icon: {instanceID: 0}
9
+ userData:
10
+ assetBundleName:
11
+ assetBundleVariant:
@@ -1,30 +1,30 @@
1
- //Author: Benjamin "Sweden" Jillson : Discord: sweden_gaming For Project Eden's Garden
2
- using DREditor.UIHandling;
3
- using UnityEngine;
4
- using UnityEngine.UI;
5
-
6
- namespace DREditor.Minigames.SS
7
- {
8
- /// <summary>
9
- ///
10
- /// </summary>
11
- [ClassHeader(nameof(SpotSelectionDisplayer) + ", " + nameof(SpotSelectionComponent) + ", " + nameof(IUIVisibility) +
12
- "\n\n")]
13
- public class SpotSelectionImageDisplayer : SpotSelectionDisplayer
14
- {
15
- /// <summary>
16
- ///
17
- /// </summary>
18
- [Tooltip("")]
19
- [SerializeField] protected Image CG = null;
20
-
21
-
22
- /// <inheritdoc/>
23
- public override void Initialize(SpotSelectionBuilder builder)
24
- {
25
- CG.sprite = builder.sprite;
26
-
27
- displayer.Show();
28
- }
29
- }
1
+ //Author: Benjamin "Sweden" Jillson : Discord: sweden_gaming For Project Eden's Garden
2
+ using DREditor.UIHandling;
3
+ using UnityEngine;
4
+ using UnityEngine.UI;
5
+
6
+ namespace DREditor.Minigames.SS
7
+ {
8
+ /// <summary>
9
+ ///
10
+ /// </summary>
11
+ [ClassHeader(nameof(SpotSelectionDisplayer) + ", " + nameof(SpotSelectionComponent) + ", " + nameof(IUIVisibility) +
12
+ "\n\n")]
13
+ public class SpotSelectionImageDisplayer : SpotSelectionDisplayer
14
+ {
15
+ /// <summary>
16
+ ///
17
+ /// </summary>
18
+ [Tooltip("")]
19
+ [SerializeField] protected Image CG = null;
20
+
21
+
22
+ /// <inheritdoc/>
23
+ public override void Initialize(SpotSelectionBuilder builder)
24
+ {
25
+ CG.sprite = builder.sprite;
26
+
27
+ displayer.Show();
28
+ }
29
+ }
30
30
  }
@@ -1,11 +1,11 @@
1
- fileFormatVersion: 2
2
- guid: 8240d8a3b1fa29d4e9bb3b6eb3495dca
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: 8240d8a3b1fa29d4e9bb3b6eb3495dca
3
+ MonoImporter:
4
+ externalObjects: {}
5
+ serializedVersion: 2
6
+ defaultReferences: []
7
+ executionOrder: 0
8
+ icon: {instanceID: 0}
9
+ userData:
10
+ assetBundleName:
11
+ assetBundleVariant: