net.dreditor.chapterselection 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/ChapterSceneByLatestObjective.cs +188 -188
- package/ChapterSceneByLatestObjective.cs.meta +1 -1
- package/ChapterSceneHandler.cs +151 -151
- package/ChapterSceneHandler.cs.meta +11 -11
- package/ChapterSectionBase.cs +139 -139
- package/ChapterSectionBase.cs.meta +11 -11
- package/ChapterSelectCollection.cs +48 -48
- package/ChapterSelectCollection.cs.meta +1 -1
- package/ChapterSelectCollectionBase.cs +71 -71
- package/ChapterSelectCollectionBase.cs.meta +1 -1
- package/ChapterSelectData.cs +55 -55
- package/ChapterSelectData.cs.meta +11 -11
- package/ChapterSelectDatabase.cs +28 -28
- package/ChapterSelectDatabase.cs.meta +11 -11
- package/ChapterSelectFallbackEvaluator.cs +24 -24
- package/ChapterSelectFallbackEvaluator.cs.meta +1 -1
- package/ChapterSelectHandler.cs +60 -60
- package/ChapterSelectHandler.cs.meta +11 -11
- package/ChapterSelectHistoryManager.cs +15 -15
- package/ChapterSelectHistoryManager.cs.meta +1 -1
- package/ChapterSelectManager.cs +196 -196
- package/ChapterSelectManager.cs.meta +11 -11
- package/ChapterSelectSaveData.cs +53 -53
- package/ChapterSelectSaveData.cs.meta +1 -1
- package/ChapterSelectUIHandler.cs +136 -136
- package/ChapterSelectUIHandler.cs.meta +11 -11
- package/ChapterSubSectionBase.cs +77 -77
- package/ChapterSubSectionBase.cs.meta +1 -1
- package/DREditor.ChapterSelection.asmdef +19 -19
- package/DREditor.ChapterSelection.asmdef.meta +7 -7
- package/IChapterSelectData.cs +14 -14
- package/IChapterSelectData.cs.meta +1 -1
- package/{Samples → Samples~}/Animations/ChapSelect.controller +191 -191
- package/{Samples → Samples~}/Animations/ChapSelect.controller.meta +8 -8
- package/{Samples → Samples~}/Animations/HideChapterSelect.anim +232 -232
- package/{Samples → Samples~}/Animations/HideChapterSelect.anim.meta +8 -8
- package/{Samples → Samples~}/Animations.meta +8 -8
- package/{Samples → Samples~}/CS_Select_Button_DRE.prefab +305 -305
- package/{Samples → Samples~}/CS_Select_Button_DRE.prefab.meta +7 -7
- package/{Samples → Samples~}/Chapter_Scene_UI_Canvas_Shell.prefab +393 -393
- package/{Samples → Samples~}/Chapter_Scene_UI_Canvas_Shell.prefab.meta +7 -7
- package/{Samples → Samples~}/Chapter_Scene_UI_Canvas_Template.prefab +771 -771
- package/{Samples → Samples~}/Chapter_Scene_UI_Canvas_Template.prefab.meta +7 -7
- package/{Samples → Samples~}/Chapter_Select_Difficulty_UI_Canvas_Template.prefab +226 -226
- package/{Samples → Samples~}/Chapter_Select_Difficulty_UI_Canvas_Template.prefab.meta +7 -7
- package/{Samples → Samples~}/Chapter_Select_History_Manager.prefab +98 -98
- package/{Samples → Samples~}/Chapter_Select_History_Manager.prefab.meta +7 -7
- package/{Samples → Samples~}/Chapter_Select_System_Shell.prefab +61 -61
- package/{Samples → Samples~}/Chapter_Select_System_Shell.prefab.meta +7 -7
- package/{Samples → Samples~}/Chapter_Select_System_Template.prefab +549 -549
- package/{Samples → Samples~}/Chapter_Select_System_Template.prefab.meta +7 -7
- package/{Samples → Samples~}/Chapter_Select_UI_Canvas_Shell.prefab +543 -543
- package/{Samples → Samples~}/Chapter_Select_UI_Canvas_Shell.prefab.meta +7 -7
- package/{Samples → Samples~}/Chapter_Select_UI_Canvas_Template.prefab +1001 -1001
- package/{Samples → Samples~}/Chapter_Select_UI_Canvas_Template.prefab.meta +7 -7
- package/{Samples → Samples~}/StartChapterSelectGame.asset +15 -15
- package/{Samples → Samples~}/StartChapterSelectGame.asset.meta +8 -8
- package/SceneDataProvider.cs +25 -25
- package/SceneDataProvider.cs.meta +11 -11
- package/SceneDataProviderBase.cs +36 -36
- package/SceneDataProviderBase.cs.meta +11 -11
- package/UnlockChapterSelectScene.cs +48 -48
- package/UnlockChapterSelectScene.cs.meta +1 -1
- package/package.json +42 -37
- package/package.json.meta +7 -7
- package/Samples.meta +0 -8
|
@@ -1,137 +1,137 @@
|
|
|
1
|
-
//Author: Benjamin "Sweden" Jillson : Discord: sweden_gaming For Project Eden's Garden
|
|
2
|
-
using DREditor.UI;
|
|
3
|
-
using System.Collections.Generic;
|
|
4
|
-
using UnityEngine;
|
|
5
|
-
using UnityEngine.Events;
|
|
6
|
-
using UnityEngine.InputSystem;
|
|
7
|
-
using static UnityEngine.InputSystem.InputAction;
|
|
8
|
-
|
|
9
|
-
namespace DREditor.ChapterSelection
|
|
10
|
-
{
|
|
11
|
-
/// <summary>
|
|
12
|
-
///
|
|
13
|
-
/// </summary>
|
|
14
|
-
[ClassHeader(nameof(IndexSelector) +
|
|
15
|
-
"\n\n")]
|
|
16
|
-
public class ChapterSelectUIHandler : IndexSelector
|
|
17
|
-
{
|
|
18
|
-
/// <summary>
|
|
19
|
-
///
|
|
20
|
-
/// </summary>
|
|
21
|
-
[Tooltip("")]
|
|
22
|
-
[SerializeField] protected InputActionReference submit = null;
|
|
23
|
-
|
|
24
|
-
/// <summary>
|
|
25
|
-
///
|
|
26
|
-
/// </summary>
|
|
27
|
-
[Tooltip("")]
|
|
28
|
-
[SerializeField] protected InputActionReference navigate = null;
|
|
29
|
-
|
|
30
|
-
/// <summary>
|
|
31
|
-
///
|
|
32
|
-
/// </summary>
|
|
33
|
-
[Tooltip("")]
|
|
34
|
-
[SerializeField] protected ChapterSelectCollectionBase chapterSelectDatabase = null;
|
|
35
|
-
|
|
36
|
-
/// <summary>
|
|
37
|
-
///
|
|
38
|
-
/// </summary>
|
|
39
|
-
[Tooltip("")]
|
|
40
|
-
[SerializeField] protected MenuGroupBase menuGroup = null;
|
|
41
|
-
|
|
42
|
-
/// <summary>
|
|
43
|
-
///
|
|
44
|
-
/// </summary>
|
|
45
|
-
[Tooltip("")]
|
|
46
|
-
[SerializeField] protected ChapterSectionBase modifyingSection = null;
|
|
47
|
-
|
|
48
|
-
/// <summary>
|
|
49
|
-
///
|
|
50
|
-
/// </summary>
|
|
51
|
-
[Tooltip("")]
|
|
52
|
-
[SerializeField] protected List<ChapterSectionBase> chapterSections = new();
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
[Header("")]
|
|
56
|
-
[Divider]
|
|
57
|
-
[Header("")]
|
|
58
|
-
[SerializeField] protected UnityEvent OnSubmit;
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
public override int SelectionMaximum { get => GetMaxSection(); set => base.SelectionMaximum = value; }
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
/// <summary>
|
|
65
|
-
///
|
|
66
|
-
/// </summary>
|
|
67
|
-
protected override void OnEnable()
|
|
68
|
-
{
|
|
69
|
-
base.OnEnable();
|
|
70
|
-
|
|
71
|
-
menuGroup.StartEvents.AddListener(ActivateControls);
|
|
72
|
-
|
|
73
|
-
menuGroup.EndEvents.AddListener(DeactivateControls);
|
|
74
|
-
}
|
|
75
|
-
|
|
76
|
-
/// <summary>
|
|
77
|
-
///
|
|
78
|
-
/// </summary>
|
|
79
|
-
protected override void OnDisable()
|
|
80
|
-
{
|
|
81
|
-
base.OnDisable();
|
|
82
|
-
|
|
83
|
-
menuGroup.StartEvents.RemoveListener(ActivateControls);
|
|
84
|
-
|
|
85
|
-
menuGroup.EndEvents.RemoveListener(DeactivateControls);
|
|
86
|
-
}
|
|
87
|
-
|
|
88
|
-
/// <inheritdoc/>
|
|
89
|
-
public override void ActivateControls()
|
|
90
|
-
{
|
|
91
|
-
navigate.action.performed += EvaluateChapter;
|
|
92
|
-
|
|
93
|
-
submit.action.started += InvokeSubmit;
|
|
94
|
-
}
|
|
95
|
-
|
|
96
|
-
/// <inheritdoc/>
|
|
97
|
-
public override void DeactivateControls()
|
|
98
|
-
{
|
|
99
|
-
navigate.action.performed -= EvaluateChapter;
|
|
100
|
-
|
|
101
|
-
submit.action.started -= InvokeSubmit;
|
|
102
|
-
}
|
|
103
|
-
|
|
104
|
-
/// <summary>
|
|
105
|
-
///
|
|
106
|
-
/// </summary>
|
|
107
|
-
/// <param name="ctx"></param>
|
|
108
|
-
protected virtual void EvaluateChapter(CallbackContext ctx) => Move((int)ctx.ReadValue<Vector2>().x);
|
|
109
|
-
|
|
110
|
-
/// <summary>
|
|
111
|
-
///
|
|
112
|
-
/// </summary>
|
|
113
|
-
/// <returns></returns>
|
|
114
|
-
protected virtual int GetMaxSection() =>
|
|
115
|
-
modifyingSection != null ? modifyingSection.GetMaxSection() : chapterSelectDatabase.GetDataCount() - 1;
|
|
116
|
-
|
|
117
|
-
/// <summary>
|
|
118
|
-
///
|
|
119
|
-
/// </summary>
|
|
120
|
-
/// <param name="ctx"></param>
|
|
121
|
-
protected virtual void InvokeSubmit(CallbackContext ctx)
|
|
122
|
-
{
|
|
123
|
-
SubmitSectionIndex();
|
|
124
|
-
|
|
125
|
-
OnSubmit.Invoke();
|
|
126
|
-
}
|
|
127
|
-
|
|
128
|
-
/// <summary>
|
|
129
|
-
///
|
|
130
|
-
/// </summary>
|
|
131
|
-
protected virtual void SubmitSectionIndex()
|
|
132
|
-
{
|
|
133
|
-
foreach (ChapterSectionBase section in chapterSections)
|
|
134
|
-
section.OnParentSubmittedIndex(SelectedIndex);
|
|
135
|
-
}
|
|
136
|
-
}
|
|
1
|
+
//Author: Benjamin "Sweden" Jillson : Discord: sweden_gaming For Project Eden's Garden
|
|
2
|
+
using DREditor.UI;
|
|
3
|
+
using System.Collections.Generic;
|
|
4
|
+
using UnityEngine;
|
|
5
|
+
using UnityEngine.Events;
|
|
6
|
+
using UnityEngine.InputSystem;
|
|
7
|
+
using static UnityEngine.InputSystem.InputAction;
|
|
8
|
+
|
|
9
|
+
namespace DREditor.ChapterSelection
|
|
10
|
+
{
|
|
11
|
+
/// <summary>
|
|
12
|
+
///
|
|
13
|
+
/// </summary>
|
|
14
|
+
[ClassHeader(nameof(IndexSelector) +
|
|
15
|
+
"\n\n")]
|
|
16
|
+
public class ChapterSelectUIHandler : IndexSelector
|
|
17
|
+
{
|
|
18
|
+
/// <summary>
|
|
19
|
+
///
|
|
20
|
+
/// </summary>
|
|
21
|
+
[Tooltip("")]
|
|
22
|
+
[SerializeField] protected InputActionReference submit = null;
|
|
23
|
+
|
|
24
|
+
/// <summary>
|
|
25
|
+
///
|
|
26
|
+
/// </summary>
|
|
27
|
+
[Tooltip("")]
|
|
28
|
+
[SerializeField] protected InputActionReference navigate = null;
|
|
29
|
+
|
|
30
|
+
/// <summary>
|
|
31
|
+
///
|
|
32
|
+
/// </summary>
|
|
33
|
+
[Tooltip("")]
|
|
34
|
+
[SerializeField] protected ChapterSelectCollectionBase chapterSelectDatabase = null;
|
|
35
|
+
|
|
36
|
+
/// <summary>
|
|
37
|
+
///
|
|
38
|
+
/// </summary>
|
|
39
|
+
[Tooltip("")]
|
|
40
|
+
[SerializeField] protected MenuGroupBase menuGroup = null;
|
|
41
|
+
|
|
42
|
+
/// <summary>
|
|
43
|
+
///
|
|
44
|
+
/// </summary>
|
|
45
|
+
[Tooltip("")]
|
|
46
|
+
[SerializeField] protected ChapterSectionBase modifyingSection = null;
|
|
47
|
+
|
|
48
|
+
/// <summary>
|
|
49
|
+
///
|
|
50
|
+
/// </summary>
|
|
51
|
+
[Tooltip("")]
|
|
52
|
+
[SerializeField] protected List<ChapterSectionBase> chapterSections = new();
|
|
53
|
+
|
|
54
|
+
|
|
55
|
+
[Header("")]
|
|
56
|
+
[Divider]
|
|
57
|
+
[Header("")]
|
|
58
|
+
[SerializeField] protected UnityEvent OnSubmit;
|
|
59
|
+
|
|
60
|
+
|
|
61
|
+
public override int SelectionMaximum { get => GetMaxSection(); set => base.SelectionMaximum = value; }
|
|
62
|
+
|
|
63
|
+
|
|
64
|
+
/// <summary>
|
|
65
|
+
///
|
|
66
|
+
/// </summary>
|
|
67
|
+
protected override void OnEnable()
|
|
68
|
+
{
|
|
69
|
+
base.OnEnable();
|
|
70
|
+
|
|
71
|
+
menuGroup.StartEvents.AddListener(ActivateControls);
|
|
72
|
+
|
|
73
|
+
menuGroup.EndEvents.AddListener(DeactivateControls);
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
/// <summary>
|
|
77
|
+
///
|
|
78
|
+
/// </summary>
|
|
79
|
+
protected override void OnDisable()
|
|
80
|
+
{
|
|
81
|
+
base.OnDisable();
|
|
82
|
+
|
|
83
|
+
menuGroup.StartEvents.RemoveListener(ActivateControls);
|
|
84
|
+
|
|
85
|
+
menuGroup.EndEvents.RemoveListener(DeactivateControls);
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
/// <inheritdoc/>
|
|
89
|
+
public override void ActivateControls()
|
|
90
|
+
{
|
|
91
|
+
navigate.action.performed += EvaluateChapter;
|
|
92
|
+
|
|
93
|
+
submit.action.started += InvokeSubmit;
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
/// <inheritdoc/>
|
|
97
|
+
public override void DeactivateControls()
|
|
98
|
+
{
|
|
99
|
+
navigate.action.performed -= EvaluateChapter;
|
|
100
|
+
|
|
101
|
+
submit.action.started -= InvokeSubmit;
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
/// <summary>
|
|
105
|
+
///
|
|
106
|
+
/// </summary>
|
|
107
|
+
/// <param name="ctx"></param>
|
|
108
|
+
protected virtual void EvaluateChapter(CallbackContext ctx) => Move((int)ctx.ReadValue<Vector2>().x);
|
|
109
|
+
|
|
110
|
+
/// <summary>
|
|
111
|
+
///
|
|
112
|
+
/// </summary>
|
|
113
|
+
/// <returns></returns>
|
|
114
|
+
protected virtual int GetMaxSection() =>
|
|
115
|
+
modifyingSection != null ? modifyingSection.GetMaxSection() : chapterSelectDatabase.GetDataCount() - 1;
|
|
116
|
+
|
|
117
|
+
/// <summary>
|
|
118
|
+
///
|
|
119
|
+
/// </summary>
|
|
120
|
+
/// <param name="ctx"></param>
|
|
121
|
+
protected virtual void InvokeSubmit(CallbackContext ctx)
|
|
122
|
+
{
|
|
123
|
+
SubmitSectionIndex();
|
|
124
|
+
|
|
125
|
+
OnSubmit.Invoke();
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
/// <summary>
|
|
129
|
+
///
|
|
130
|
+
/// </summary>
|
|
131
|
+
protected virtual void SubmitSectionIndex()
|
|
132
|
+
{
|
|
133
|
+
foreach (ChapterSectionBase section in chapterSections)
|
|
134
|
+
section.OnParentSubmittedIndex(SelectedIndex);
|
|
135
|
+
}
|
|
136
|
+
}
|
|
137
137
|
}
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
fileFormatVersion: 2
|
|
2
|
-
guid: 4af7ab2389efc884eb0d95543a08caab
|
|
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: 4af7ab2389efc884eb0d95543a08caab
|
|
3
|
+
MonoImporter:
|
|
4
|
+
externalObjects: {}
|
|
5
|
+
serializedVersion: 2
|
|
6
|
+
defaultReferences: []
|
|
7
|
+
executionOrder: 0
|
|
8
|
+
icon: {instanceID: 0}
|
|
9
|
+
userData:
|
|
10
|
+
assetBundleName:
|
|
11
|
+
assetBundleVariant:
|
package/ChapterSubSectionBase.cs
CHANGED
|
@@ -1,78 +1,78 @@
|
|
|
1
|
-
//Author: Benjamin "Sweden" Jillson : Discord: sweden_gaming For Project Eden's Garden
|
|
2
|
-
using DREditor.UI;
|
|
3
|
-
using System.Collections.Generic;
|
|
4
|
-
using UnityEngine;
|
|
5
|
-
using UnityEngine.Events;
|
|
6
|
-
|
|
7
|
-
namespace DREditor.ChapterSelection
|
|
8
|
-
{
|
|
9
|
-
/// <summary>
|
|
10
|
-
///
|
|
11
|
-
/// </summary>
|
|
12
|
-
public abstract class ChapterSubSectionBase : ChapterSectionBase
|
|
13
|
-
{
|
|
14
|
-
/// <summary>
|
|
15
|
-
///
|
|
16
|
-
/// </summary>
|
|
17
|
-
[Tooltip("")]
|
|
18
|
-
[SerializeField] protected MenuGroupBase startGameGroup = null;
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
/// <summary>
|
|
22
|
-
///
|
|
23
|
-
/// </summary>
|
|
24
|
-
protected readonly List<UnityAction> buttonActions = new();
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
protected virtual void OnEnable() => SubscribeButtonSelection();
|
|
28
|
-
|
|
29
|
-
/// <summary>
|
|
30
|
-
///
|
|
31
|
-
/// </summary>
|
|
32
|
-
protected virtual void SubscribeButtonSelection()
|
|
33
|
-
{
|
|
34
|
-
foreach (var button in sectionButtons)
|
|
35
|
-
{
|
|
36
|
-
void ButtonAction() => SetSelectedSection(button);
|
|
37
|
-
|
|
38
|
-
button.onClick.AddListener(ButtonAction);
|
|
39
|
-
|
|
40
|
-
button.onClick.AddListener(ChangeGroup);
|
|
41
|
-
|
|
42
|
-
buttonActions.Add(ButtonAction);
|
|
43
|
-
}
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
/// <summary>
|
|
47
|
-
///
|
|
48
|
-
/// </summary>
|
|
49
|
-
protected virtual void ChangeGroup()
|
|
50
|
-
{
|
|
51
|
-
if (startGameGroup != null && TryGetComponent(out MenuGroupBase menuGroup))
|
|
52
|
-
menuGroup.ChangeGroup(startGameGroup);
|
|
53
|
-
else if (startGameGroup == null)
|
|
54
|
-
UnityEngine.Debug.LogError($"ALERT: The field: {nameof(startGameGroup)} has not been assigned!");
|
|
55
|
-
else
|
|
56
|
-
UnityEngine.Debug.LogError($"ALERT: There is no Menu Group on {gameObject.name} when there must be!");
|
|
57
|
-
}
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
protected virtual void OnDisable() => UnsubscribeButtonSelection();
|
|
61
|
-
|
|
62
|
-
/// <summary>
|
|
63
|
-
///
|
|
64
|
-
/// </summary>
|
|
65
|
-
protected virtual void UnsubscribeButtonSelection()
|
|
66
|
-
{
|
|
67
|
-
for (int i = 0; i < sectionButtons.Count; i++)
|
|
68
|
-
{
|
|
69
|
-
if (i < buttonActions.Count)
|
|
70
|
-
sectionButtons[i].onClick.RemoveListener(buttonActions[i]);
|
|
71
|
-
|
|
72
|
-
sectionButtons[i].onClick.RemoveListener(ChangeGroup);
|
|
73
|
-
}
|
|
74
|
-
|
|
75
|
-
buttonActions.Clear();
|
|
76
|
-
}
|
|
77
|
-
}
|
|
1
|
+
//Author: Benjamin "Sweden" Jillson : Discord: sweden_gaming For Project Eden's Garden
|
|
2
|
+
using DREditor.UI;
|
|
3
|
+
using System.Collections.Generic;
|
|
4
|
+
using UnityEngine;
|
|
5
|
+
using UnityEngine.Events;
|
|
6
|
+
|
|
7
|
+
namespace DREditor.ChapterSelection
|
|
8
|
+
{
|
|
9
|
+
/// <summary>
|
|
10
|
+
///
|
|
11
|
+
/// </summary>
|
|
12
|
+
public abstract class ChapterSubSectionBase : ChapterSectionBase
|
|
13
|
+
{
|
|
14
|
+
/// <summary>
|
|
15
|
+
///
|
|
16
|
+
/// </summary>
|
|
17
|
+
[Tooltip("")]
|
|
18
|
+
[SerializeField] protected MenuGroupBase startGameGroup = null;
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
/// <summary>
|
|
22
|
+
///
|
|
23
|
+
/// </summary>
|
|
24
|
+
protected readonly List<UnityAction> buttonActions = new();
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
protected virtual void OnEnable() => SubscribeButtonSelection();
|
|
28
|
+
|
|
29
|
+
/// <summary>
|
|
30
|
+
///
|
|
31
|
+
/// </summary>
|
|
32
|
+
protected virtual void SubscribeButtonSelection()
|
|
33
|
+
{
|
|
34
|
+
foreach (var button in sectionButtons)
|
|
35
|
+
{
|
|
36
|
+
void ButtonAction() => SetSelectedSection(button);
|
|
37
|
+
|
|
38
|
+
button.onClick.AddListener(ButtonAction);
|
|
39
|
+
|
|
40
|
+
button.onClick.AddListener(ChangeGroup);
|
|
41
|
+
|
|
42
|
+
buttonActions.Add(ButtonAction);
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
/// <summary>
|
|
47
|
+
///
|
|
48
|
+
/// </summary>
|
|
49
|
+
protected virtual void ChangeGroup()
|
|
50
|
+
{
|
|
51
|
+
if (startGameGroup != null && TryGetComponent(out MenuGroupBase menuGroup))
|
|
52
|
+
menuGroup.ChangeGroup(startGameGroup);
|
|
53
|
+
else if (startGameGroup == null)
|
|
54
|
+
UnityEngine.Debug.LogError($"ALERT: The field: {nameof(startGameGroup)} has not been assigned!");
|
|
55
|
+
else
|
|
56
|
+
UnityEngine.Debug.LogError($"ALERT: There is no Menu Group on {gameObject.name} when there must be!");
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
|
|
60
|
+
protected virtual void OnDisable() => UnsubscribeButtonSelection();
|
|
61
|
+
|
|
62
|
+
/// <summary>
|
|
63
|
+
///
|
|
64
|
+
/// </summary>
|
|
65
|
+
protected virtual void UnsubscribeButtonSelection()
|
|
66
|
+
{
|
|
67
|
+
for (int i = 0; i < sectionButtons.Count; i++)
|
|
68
|
+
{
|
|
69
|
+
if (i < buttonActions.Count)
|
|
70
|
+
sectionButtons[i].onClick.RemoveListener(buttonActions[i]);
|
|
71
|
+
|
|
72
|
+
sectionButtons[i].onClick.RemoveListener(ChangeGroup);
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
buttonActions.Clear();
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
78
|
}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
fileFormatVersion: 2
|
|
1
|
+
fileFormatVersion: 2
|
|
2
2
|
guid: a9a15a288bec1784ea1c99a2755eb588
|
|
@@ -1,20 +1,20 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "DREditor.ChapterSelection",
|
|
3
|
-
"rootNamespace": "",
|
|
4
|
-
"references": [
|
|
5
|
-
"Unity.InputSystem",
|
|
6
|
-
"DREditor",
|
|
7
|
-
"DREditor.Controls",
|
|
8
|
-
"DREditor.Progressing.Handling",
|
|
9
|
-
"DREditor.UI"
|
|
10
|
-
],
|
|
11
|
-
"includePlatforms": [],
|
|
12
|
-
"excludePlatforms": [],
|
|
13
|
-
"allowUnsafeCode": false,
|
|
14
|
-
"overrideReferences": false,
|
|
15
|
-
"precompiledReferences": [],
|
|
16
|
-
"autoReferenced": true,
|
|
17
|
-
"defineConstraints": [],
|
|
18
|
-
"versionDefines": [],
|
|
19
|
-
"noEngineReferences": false
|
|
1
|
+
{
|
|
2
|
+
"name": "DREditor.ChapterSelection",
|
|
3
|
+
"rootNamespace": "",
|
|
4
|
+
"references": [
|
|
5
|
+
"Unity.InputSystem",
|
|
6
|
+
"DREditor",
|
|
7
|
+
"DREditor.Controls",
|
|
8
|
+
"DREditor.Progressing.Handling",
|
|
9
|
+
"DREditor.UI"
|
|
10
|
+
],
|
|
11
|
+
"includePlatforms": [],
|
|
12
|
+
"excludePlatforms": [],
|
|
13
|
+
"allowUnsafeCode": false,
|
|
14
|
+
"overrideReferences": false,
|
|
15
|
+
"precompiledReferences": [],
|
|
16
|
+
"autoReferenced": true,
|
|
17
|
+
"defineConstraints": [],
|
|
18
|
+
"versionDefines": [],
|
|
19
|
+
"noEngineReferences": false
|
|
20
20
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
fileFormatVersion: 2
|
|
2
|
-
guid: c1ee9901181da6d48ba38434873e8802
|
|
3
|
-
AssemblyDefinitionImporter:
|
|
4
|
-
externalObjects: {}
|
|
5
|
-
userData:
|
|
6
|
-
assetBundleName:
|
|
7
|
-
assetBundleVariant:
|
|
1
|
+
fileFormatVersion: 2
|
|
2
|
+
guid: c1ee9901181da6d48ba38434873e8802
|
|
3
|
+
AssemblyDefinitionImporter:
|
|
4
|
+
externalObjects: {}
|
|
5
|
+
userData:
|
|
6
|
+
assetBundleName:
|
|
7
|
+
assetBundleVariant:
|
package/IChapterSelectData.cs
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
//Author: Benjamin "Sweden" Jillson : Discord: sweden_gaming For Project Eden's Garden
|
|
2
|
-
namespace DREditor.ChapterSelection
|
|
3
|
-
{
|
|
4
|
-
/// <summary>
|
|
5
|
-
///
|
|
6
|
-
/// </summary>
|
|
7
|
-
public interface IChapterSelectData
|
|
8
|
-
{
|
|
9
|
-
/// <summary>
|
|
10
|
-
///
|
|
11
|
-
/// </summary>
|
|
12
|
-
/// <param name="obj"></param>
|
|
13
|
-
void Add(object obj);
|
|
14
|
-
}
|
|
1
|
+
//Author: Benjamin "Sweden" Jillson : Discord: sweden_gaming For Project Eden's Garden
|
|
2
|
+
namespace DREditor.ChapterSelection
|
|
3
|
+
{
|
|
4
|
+
/// <summary>
|
|
5
|
+
///
|
|
6
|
+
/// </summary>
|
|
7
|
+
public interface IChapterSelectData
|
|
8
|
+
{
|
|
9
|
+
/// <summary>
|
|
10
|
+
///
|
|
11
|
+
/// </summary>
|
|
12
|
+
/// <param name="obj"></param>
|
|
13
|
+
void Add(object obj);
|
|
14
|
+
}
|
|
15
15
|
}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
fileFormatVersion: 2
|
|
1
|
+
fileFormatVersion: 2
|
|
2
2
|
guid: ff0f169197939ff4689c68d1902a2594
|