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
package/Spot.cs CHANGED
@@ -1,86 +1,86 @@
1
- //Author: Benjamin "Sweden" Jillson : Discord: sweden_gaming For Project Eden's Garden
2
- using DREditor.Dialogues;
3
- using UnityEngine;
4
-
5
- namespace DREditor.Minigames.SS
6
- {
7
- /// <summary>
8
- ///
9
- /// </summary>
10
- [System.Serializable]
11
- public class Spot
12
- {
13
- /// <summary>
14
- ///
15
- /// </summary>
16
- public string spotName;
17
-
18
- /// <summary>
19
- ///
20
- /// </summary>
21
- public Vector3 position;
22
-
23
- /// <summary>
24
- ///
25
- /// </summary>
26
- public Vector3 rotation;
27
-
28
- /// <summary>
29
- ///
30
- /// </summary>
31
- public Vector2 size;
32
-
33
- /// <summary>
34
- ///
35
- /// </summary>
36
- public Vector2 center;
37
-
38
- /// <summary>
39
- ///
40
- /// </summary>
41
- public bool isAnswer = false;
42
-
43
- /// <summary>
44
- ///
45
- /// </summary>
46
- public TrialDialogue wrongDialogue;
47
-
48
-
49
- /// <summary>
50
- ///
51
- /// </summary>
52
- /// <param name="spotName"></param>
53
- public virtual void SetSpotName(string spotName) => this.spotName = spotName;
54
-
55
- /// <summary>
56
- ///
57
- /// </summary>
58
- /// <param name="isAnswer"></param>
59
- public virtual void SetIsAnswer(bool isAnswer) => this.isAnswer = isAnswer;
60
-
61
- /// <summary>
62
- ///
63
- /// </summary>
64
- /// <param name="wrongDialogue"></param>
65
- public virtual void SetWrongDialogue(TrialDialogue wrongDialogue) => this.wrongDialogue = wrongDialogue;
66
-
67
- /// <summary>
68
- ///
69
- /// </summary>
70
- /// <param name="position"></param>
71
- /// <param name="rotation"></param>
72
- /// <param name="size"></param>
73
- /// <param name="center"></param>
74
- public virtual void SetTransformProperties(
75
- Vector3 position,
76
- Vector3 rotation,
77
- Vector2 size,
78
- Vector2 center)
79
- {
80
- this.position = position;
81
- this.rotation = rotation;
82
- this.size = size;
83
- this.center = center;
84
- }
85
- }
1
+ //Author: Benjamin "Sweden" Jillson : Discord: sweden_gaming For Project Eden's Garden
2
+ using DREditor.Dialogues;
3
+ using UnityEngine;
4
+
5
+ namespace DREditor.Minigames.SS
6
+ {
7
+ /// <summary>
8
+ ///
9
+ /// </summary>
10
+ [System.Serializable]
11
+ public class Spot
12
+ {
13
+ /// <summary>
14
+ ///
15
+ /// </summary>
16
+ public string spotName;
17
+
18
+ /// <summary>
19
+ ///
20
+ /// </summary>
21
+ public Vector3 position;
22
+
23
+ /// <summary>
24
+ ///
25
+ /// </summary>
26
+ public Vector3 rotation;
27
+
28
+ /// <summary>
29
+ ///
30
+ /// </summary>
31
+ public Vector2 size;
32
+
33
+ /// <summary>
34
+ ///
35
+ /// </summary>
36
+ public Vector2 center;
37
+
38
+ /// <summary>
39
+ ///
40
+ /// </summary>
41
+ public bool isAnswer = false;
42
+
43
+ /// <summary>
44
+ ///
45
+ /// </summary>
46
+ public TrialDialogue wrongDialogue;
47
+
48
+
49
+ /// <summary>
50
+ ///
51
+ /// </summary>
52
+ /// <param name="spotName"></param>
53
+ public virtual void SetSpotName(string spotName) => this.spotName = spotName;
54
+
55
+ /// <summary>
56
+ ///
57
+ /// </summary>
58
+ /// <param name="isAnswer"></param>
59
+ public virtual void SetIsAnswer(bool isAnswer) => this.isAnswer = isAnswer;
60
+
61
+ /// <summary>
62
+ ///
63
+ /// </summary>
64
+ /// <param name="wrongDialogue"></param>
65
+ public virtual void SetWrongDialogue(TrialDialogue wrongDialogue) => this.wrongDialogue = wrongDialogue;
66
+
67
+ /// <summary>
68
+ ///
69
+ /// </summary>
70
+ /// <param name="position"></param>
71
+ /// <param name="rotation"></param>
72
+ /// <param name="size"></param>
73
+ /// <param name="center"></param>
74
+ public virtual void SetTransformProperties(
75
+ Vector3 position,
76
+ Vector3 rotation,
77
+ Vector2 size,
78
+ Vector2 center)
79
+ {
80
+ this.position = position;
81
+ this.rotation = rotation;
82
+ this.size = size;
83
+ this.center = center;
84
+ }
85
+ }
86
86
  }
package/Spot.cs.meta CHANGED
@@ -1,11 +1,11 @@
1
- fileFormatVersion: 2
2
- guid: c2f8415bb11974749aa31d7aa7e2b748
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: c2f8415bb11974749aa31d7aa7e2b748
3
+ MonoImporter:
4
+ externalObjects: {}
5
+ serializedVersion: 2
6
+ defaultReferences: []
7
+ executionOrder: 0
8
+ icon: {instanceID: 0}
9
+ userData:
10
+ assetBundleName:
11
+ assetBundleVariant:
@@ -1,68 +1,68 @@
1
- //Author: Benjamin "Sweden" Jillson : Discord: sweden_gaming For Project Eden's Garden
2
- using DREditor.UIHandling;
3
- using System.Collections;
4
- using System.Collections.Generic;
5
- using UnityEngine;
6
-
7
- namespace DREditor.Minigames.SS
8
- {
9
- /// <summary>
10
- ///
11
- /// </summary>
12
- [ClassHeader(nameof(SpotSelectionComponent) + ", " + nameof(IUIVisibility) +
13
- "\n\n")]
14
- public class SpotColliderHandler : SpotSelectionComponent
15
- {
16
- /// <summary>
17
- ///
18
- /// </summary>
19
- [Tooltip("")]
20
- [SerializeField] protected Transform parentTransform = null;
21
-
22
-
23
- /// <summary>
24
- ///
25
- /// </summary>
26
- protected List<BoxCollider2D> colliders = new();
27
-
28
-
29
- /// <inheritdoc/>
30
- public override void Initialize(SpotSelectionBuilder builder)
31
- {
32
- for (int i = 0; i < builder.spots.Count; i++)
33
- {
34
- Spot spot = builder.spots[i];
35
-
36
- GameObject gameObject = new(spot.spotName);
37
-
38
- gameObject.transform.parent = parentTransform;
39
-
40
- gameObject.transform.localScale = new Vector3(1, 1, 1);
41
-
42
- gameObject.transform.position = spot.position * parentTransform.localScale.x;
43
-
44
- gameObject.transform.eulerAngles = spot.rotation;
45
-
46
- BoxCollider2D boxCollider = gameObject.AddComponent<BoxCollider2D>();
47
-
48
- boxCollider.size = spot.size;
49
-
50
- boxCollider.offset = spot.center;
51
-
52
- colliders.Add(boxCollider);
53
- }
54
- }
55
-
56
- /// <inheritdoc/>
57
- public override void Show() => colliders.ForEach(collider => collider.enabled = true);
58
-
59
- /// <inheritdoc/>
60
- public override void Hide() => colliders.ForEach(collider => collider.enabled = false);
61
-
62
- /// <inheritdoc/>
63
- public override IEnumerator WaitForChangeToComplete()
64
- {
65
- yield break;
66
- }
67
- }
1
+ //Author: Benjamin "Sweden" Jillson : Discord: sweden_gaming For Project Eden's Garden
2
+ using DREditor.UIHandling;
3
+ using System.Collections;
4
+ using System.Collections.Generic;
5
+ using UnityEngine;
6
+
7
+ namespace DREditor.Minigames.SS
8
+ {
9
+ /// <summary>
10
+ ///
11
+ /// </summary>
12
+ [ClassHeader(nameof(SpotSelectionComponent) + ", " + nameof(IUIVisibility) +
13
+ "\n\n")]
14
+ public class SpotColliderHandler : SpotSelectionComponent
15
+ {
16
+ /// <summary>
17
+ ///
18
+ /// </summary>
19
+ [Tooltip("")]
20
+ [SerializeField] protected Transform parentTransform = null;
21
+
22
+
23
+ /// <summary>
24
+ ///
25
+ /// </summary>
26
+ protected List<BoxCollider2D> colliders = new();
27
+
28
+
29
+ /// <inheritdoc/>
30
+ public override void Initialize(SpotSelectionBuilder builder)
31
+ {
32
+ for (int i = 0; i < builder.spots.Count; i++)
33
+ {
34
+ Spot spot = builder.spots[i];
35
+
36
+ GameObject gameObject = new(spot.spotName);
37
+
38
+ gameObject.transform.parent = parentTransform;
39
+
40
+ gameObject.transform.localScale = new Vector3(1, 1, 1);
41
+
42
+ gameObject.transform.position = spot.position * parentTransform.localScale.x;
43
+
44
+ gameObject.transform.eulerAngles = spot.rotation;
45
+
46
+ BoxCollider2D boxCollider = gameObject.AddComponent<BoxCollider2D>();
47
+
48
+ boxCollider.size = spot.size;
49
+
50
+ boxCollider.offset = spot.center;
51
+
52
+ colliders.Add(boxCollider);
53
+ }
54
+ }
55
+
56
+ /// <inheritdoc/>
57
+ public override void Show() => colliders.ForEach(collider => collider.enabled = true);
58
+
59
+ /// <inheritdoc/>
60
+ public override void Hide() => colliders.ForEach(collider => collider.enabled = false);
61
+
62
+ /// <inheritdoc/>
63
+ public override IEnumerator WaitForChangeToComplete()
64
+ {
65
+ yield break;
66
+ }
67
+ }
68
68
  }
@@ -1,11 +1,11 @@
1
- fileFormatVersion: 2
2
- guid: d7743c8f3f445d94ab11035b581aab33
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: d7743c8f3f445d94ab11035b581aab33
3
+ MonoImporter:
4
+ externalObjects: {}
5
+ serializedVersion: 2
6
+ defaultReferences: []
7
+ executionOrder: 0
8
+ icon: {instanceID: 0}
9
+ userData:
10
+ assetBundleName:
11
+ assetBundleVariant:
@@ -1,89 +1,89 @@
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.SS
7
- {
8
- /// <summary>
9
- ///
10
- /// </summary>
11
- [System.Serializable]
12
- [CreateAssetMenu(menuName = "DREditor/Minigames/Spot Selection", fileName = "SS Builder")]
13
- public class SpotSelectionBuilder : MinigameBuilderBase
14
- {
15
- /// <summary>
16
- ///
17
- /// </summary>
18
- public Sprite sprite = null;
19
-
20
- /// <summary>
21
- ///
22
- /// </summary>
23
- public List<Spot> spots = new();
24
-
25
- /// <summary>
26
- ///
27
- /// </summary>
28
- public string question = "";
29
-
30
- /// <summary>
31
- ///
32
- /// </summary>
33
- public int damageOnWrong = 1;
34
-
35
-
36
- /// <summary>
37
- ///
38
- /// </summary>
39
- /// <param name="sprite"></param>
40
- public virtual void SetSprite(Sprite sprite) => this.sprite = sprite;
41
-
42
- /// <summary>
43
- ///
44
- /// </summary>
45
- /// <param name="question"></param>
46
- public virtual void SetQuestion(string question) => this.question = question;
47
-
48
- /// <summary>
49
- ///
50
- /// </summary>
51
- /// <param name="damageOnWrong"></param>
52
- public virtual void SetDamageOnWrong(int damageOnWrong) => this.damageOnWrong = damageOnWrong;
53
-
54
- /// <summary>
55
- ///
56
- /// </summary>
57
- /// <param name="name"></param>
58
- /// <returns></returns>
59
- public virtual Spot GetSpotWithName(string name) => spots.Where(spot => spot.spotName == name).FirstOrDefault();
60
-
61
-
62
- #if UNITY_EDITOR
63
-
64
- /// <summary>
65
- ///
66
- /// </summary>
67
- public string testCanvas = "SS_Canvas";
68
-
69
- /// <summary>
70
- ///
71
- /// </summary>
72
- public string testCG = "SS_CG";
73
-
74
-
75
- /// <summary>
76
- ///
77
- /// </summary>
78
- /// <param name="testCanvas"></param>
79
- public virtual void SetTestCanvas(string testCanvas) => this.testCanvas = testCanvas;
80
-
81
- /// <summary>
82
- ///
83
- /// </summary>
84
- /// <param name="testCG"></param>
85
- public virtual void SetTestCG(string testCG) => this.testCG = testCG;
86
-
87
- #endif
88
- }
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.SS
7
+ {
8
+ /// <summary>
9
+ ///
10
+ /// </summary>
11
+ [System.Serializable]
12
+ [CreateAssetMenu(menuName = "DREditor/Minigames/Spot Selection", fileName = "SS Builder")]
13
+ public class SpotSelectionBuilder : MinigameBuilderBase
14
+ {
15
+ /// <summary>
16
+ ///
17
+ /// </summary>
18
+ public Sprite sprite = null;
19
+
20
+ /// <summary>
21
+ ///
22
+ /// </summary>
23
+ public List<Spot> spots = new();
24
+
25
+ /// <summary>
26
+ ///
27
+ /// </summary>
28
+ public string question = "";
29
+
30
+ /// <summary>
31
+ ///
32
+ /// </summary>
33
+ public int damageOnWrong = 1;
34
+
35
+
36
+ /// <summary>
37
+ ///
38
+ /// </summary>
39
+ /// <param name="sprite"></param>
40
+ public virtual void SetSprite(Sprite sprite) => this.sprite = sprite;
41
+
42
+ /// <summary>
43
+ ///
44
+ /// </summary>
45
+ /// <param name="question"></param>
46
+ public virtual void SetQuestion(string question) => this.question = question;
47
+
48
+ /// <summary>
49
+ ///
50
+ /// </summary>
51
+ /// <param name="damageOnWrong"></param>
52
+ public virtual void SetDamageOnWrong(int damageOnWrong) => this.damageOnWrong = damageOnWrong;
53
+
54
+ /// <summary>
55
+ ///
56
+ /// </summary>
57
+ /// <param name="name"></param>
58
+ /// <returns></returns>
59
+ public virtual Spot GetSpotWithName(string name) => spots.Where(spot => spot.spotName == name).FirstOrDefault();
60
+
61
+
62
+ #if UNITY_EDITOR
63
+
64
+ /// <summary>
65
+ ///
66
+ /// </summary>
67
+ public string testCanvas = "SS_Canvas";
68
+
69
+ /// <summary>
70
+ ///
71
+ /// </summary>
72
+ public string testCG = "SS_CG";
73
+
74
+
75
+ /// <summary>
76
+ ///
77
+ /// </summary>
78
+ /// <param name="testCanvas"></param>
79
+ public virtual void SetTestCanvas(string testCanvas) => this.testCanvas = testCanvas;
80
+
81
+ /// <summary>
82
+ ///
83
+ /// </summary>
84
+ /// <param name="testCG"></param>
85
+ public virtual void SetTestCG(string testCG) => this.testCG = testCG;
86
+
87
+ #endif
88
+ }
89
89
  }
@@ -1,11 +1,11 @@
1
- fileFormatVersion: 2
2
- guid: 20edcadcdb408d94a924dbae47f52c21
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: 20edcadcdb408d94a924dbae47f52c21
3
+ MonoImporter:
4
+ externalObjects: {}
5
+ serializedVersion: 2
6
+ defaultReferences: []
7
+ executionOrder: 0
8
+ icon: {instanceID: 0}
9
+ userData:
10
+ assetBundleName:
11
+ assetBundleVariant: