net.dreditor.ui.savingloading 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 (38) hide show
  1. package/.attestation.p7m +0 -0
  2. package/DREditor.UI.SavingLoading.asmdef +22 -22
  3. package/DREditor.UI.SavingLoading.asmdef.meta +7 -7
  4. package/PostSavePoint.cs +57 -57
  5. package/PostSavePoint.cs.meta +11 -11
  6. package/ReturnToMenuOnPauseMenu.cs +113 -113
  7. package/ReturnToMenuOnPauseMenu.cs.meta +11 -11
  8. package/{Samples → Samples~}/DRE_SavePoint.unity +262 -262
  9. package/{Samples → Samples~}/DRE_SavePoint.unity.meta +7 -7
  10. package/{Samples → Samples~}/Save_Point_Canvas_Shell.prefab +169 -169
  11. package/{Samples → Samples~}/Save_Point_Canvas_Shell.prefab.meta +7 -7
  12. package/{Samples → Samples~}/Save_Point_Canvas_Template.prefab +563 -563
  13. package/{Samples → Samples~}/Save_Point_Canvas_Template.prefab.meta +7 -7
  14. package/{Samples → Samples~}/Save_Point_System_Template.prefab +1434 -1434
  15. package/{Samples → Samples~}/Save_Point_System_Template.prefab.meta +7 -7
  16. package/SaveDataDisplayerBase.cs +24 -24
  17. package/SaveDataDisplayerBase.cs.meta +11 -11
  18. package/SaveDateDisplayer.cs +146 -146
  19. package/SaveDateDisplayer.cs.meta +11 -11
  20. package/SaveLoadMenu.cs +298 -298
  21. package/SaveLoadMenu.cs.meta +11 -11
  22. package/SaveLoadMenuBase.cs +122 -122
  23. package/SaveLoadMenuBase.cs.meta +11 -11
  24. package/SavePointUI.cs +239 -239
  25. package/SavePointUI.cs.meta +11 -11
  26. package/SavePointUIBase.cs +134 -134
  27. package/SavePointUIBase.cs.meta +11 -11
  28. package/SavePointUIGameState.cs +120 -120
  29. package/SavePointUIGameState.cs.meta +11 -11
  30. package/SaveSlot.cs +81 -81
  31. package/SaveSlot.cs.meta +11 -11
  32. package/SaveSlotBase.cs +99 -99
  33. package/SaveSlotBase.cs.meta +11 -11
  34. package/SaveTitleDisplayer.cs +204 -204
  35. package/SaveTitleDisplayer.cs.meta +11 -11
  36. package/package.json +46 -41
  37. package/package.json.meta +7 -7
  38. package/Samples.meta +0 -8
@@ -1,135 +1,135 @@
1
- //Author: Benjamin "Sweden" Jillson : Discord: sweden_gaming For Project Eden's Garden
2
- using DREditor.EventObjects;
3
- using DREditor.Services;
4
- using UnityEngine;
5
-
6
- namespace DREditor.UI.SavingLoading
7
- {
8
- /// <summary>
9
- ///
10
- /// </summary>
11
- public abstract class SavePointUIBase : SceneEventListener
12
- {
13
- /// <summary>
14
- ///
15
- /// </summary>
16
- [Tooltip("")]
17
- [SerializeField] protected bool roomIsSavePoint = false;
18
-
19
- /// <summary>
20
- ///
21
- /// </summary>
22
- [Tooltip("")]
23
- [SerializeField] protected MenuGroupBase savePointGroup = null;
24
-
25
- /// <summary>
26
- ///
27
- /// </summary>
28
- [Tooltip("")]
29
- [SerializeField] protected SaveLoadMenuBase saveLoadMenu = null;
30
-
31
- /// <summary>
32
- ///
33
- /// </summary>
34
- [Tooltip("")]
35
- [SerializeField] protected ReturnToMenuHandler returnToMenuHandler = null;
36
-
37
-
38
- /// <summary>
39
- ///
40
- /// </summary>
41
- [Header("")]
42
- [Divider]
43
- [Tooltip("")]
44
- [SerializeField] protected BoolWithEvent isLoadingFile = null;
45
-
46
-
47
- /// <summary>
48
- ///
49
- /// </summary>
50
- protected bool hasLeaveAbility = false;
51
-
52
-
53
- /// <inheritdoc/>
54
- protected override void OnEnable()
55
- {
56
- base.OnEnable();
57
-
58
- if (isLoadingFile.Value)
59
- Response.AddListener(StartSavePointTransition);
60
- else if (savePointGroup != null)
61
- Response.AddListener(ShowSavePointUI);
62
-
63
- if (!roomIsSavePoint && saveLoadMenu != null)
64
- saveLoadMenu.AddOnSaveListener(MoveToSavePointOnBack);
65
- }
66
-
67
- /// <inheritdoc/>
68
- protected override void OnDisable()
69
- {
70
- base.OnDisable();
71
-
72
- Response.RemoveListener(ShowSavePointUI);
73
-
74
- Response.RemoveListener(StartSavePointTransition);
75
-
76
- if (!roomIsSavePoint && saveLoadMenu != null)
77
- saveLoadMenu.RemoveOnSaveListener(MoveToSavePointOnBack);
78
-
79
- if (hasLeaveAbility && saveLoadMenu != null)
80
- saveLoadMenu.GetComponentInChildren<MenuGroupBase>().OnBack.RemoveAllListeners();
81
- }
82
-
83
-
84
- /// <summary>
85
- ///
86
- /// </summary>
87
- public virtual void ExecuteValidSavePoint()
88
- {
89
- if (SavePointIsValid())
90
- LoadSavePoint();
91
- else if (roomIsSavePoint)
92
- return;
93
- else
94
- returnToMenuHandler.ReturnToMenu();
95
- }
96
-
97
- /// <summary>
98
- ///
99
- /// </summary>
100
- /// <returns></returns>
101
- protected abstract bool SavePointIsValid();
102
-
103
- /// <summary>
104
- ///
105
- /// </summary>
106
- protected abstract void LoadSavePoint();
107
-
108
- /// <summary>
109
- ///
110
- /// </summary>
111
- protected virtual void ShowSavePointUI() => savePointGroup.Show();
112
-
113
- /// <summary>
114
- ///
115
- /// </summary>
116
- protected abstract void StartSavePointTransition();
117
-
118
- /// <summary>
119
- ///
120
- /// </summary>
121
- protected virtual void MoveToSavePointOnBack()
122
- {
123
- if (!hasLeaveAbility)
124
- {
125
- hasLeaveAbility = true;
126
-
127
- MenuGroupBase menuGroup = saveLoadMenu.GetComponentInChildren<MenuGroupBase>();
128
-
129
- menuGroup.OnBack.AddListener(menuGroup.Hide);
130
-
131
- menuGroup.OnBack.AddListener(StartSavePointTransition);
132
- }
133
- }
134
- }
1
+ //Author: Benjamin "Sweden" Jillson : Discord: sweden_gaming For Project Eden's Garden
2
+ using DREditor.EventObjects;
3
+ using DREditor.Services;
4
+ using UnityEngine;
5
+
6
+ namespace DREditor.UI.SavingLoading
7
+ {
8
+ /// <summary>
9
+ ///
10
+ /// </summary>
11
+ public abstract class SavePointUIBase : SceneEventListener
12
+ {
13
+ /// <summary>
14
+ ///
15
+ /// </summary>
16
+ [Tooltip("")]
17
+ [SerializeField] protected bool roomIsSavePoint = false;
18
+
19
+ /// <summary>
20
+ ///
21
+ /// </summary>
22
+ [Tooltip("")]
23
+ [SerializeField] protected MenuGroupBase savePointGroup = null;
24
+
25
+ /// <summary>
26
+ ///
27
+ /// </summary>
28
+ [Tooltip("")]
29
+ [SerializeField] protected SaveLoadMenuBase saveLoadMenu = null;
30
+
31
+ /// <summary>
32
+ ///
33
+ /// </summary>
34
+ [Tooltip("")]
35
+ [SerializeField] protected ReturnToMenuHandler returnToMenuHandler = null;
36
+
37
+
38
+ /// <summary>
39
+ ///
40
+ /// </summary>
41
+ [Header("")]
42
+ [Divider]
43
+ [Tooltip("")]
44
+ [SerializeField] protected BoolWithEvent isLoadingFile = null;
45
+
46
+
47
+ /// <summary>
48
+ ///
49
+ /// </summary>
50
+ protected bool hasLeaveAbility = false;
51
+
52
+
53
+ /// <inheritdoc/>
54
+ protected override void OnEnable()
55
+ {
56
+ base.OnEnable();
57
+
58
+ if (isLoadingFile.Value)
59
+ Response.AddListener(StartSavePointTransition);
60
+ else if (savePointGroup != null)
61
+ Response.AddListener(ShowSavePointUI);
62
+
63
+ if (!roomIsSavePoint && saveLoadMenu != null)
64
+ saveLoadMenu.AddOnSaveListener(MoveToSavePointOnBack);
65
+ }
66
+
67
+ /// <inheritdoc/>
68
+ protected override void OnDisable()
69
+ {
70
+ base.OnDisable();
71
+
72
+ Response.RemoveListener(ShowSavePointUI);
73
+
74
+ Response.RemoveListener(StartSavePointTransition);
75
+
76
+ if (!roomIsSavePoint && saveLoadMenu != null)
77
+ saveLoadMenu.RemoveOnSaveListener(MoveToSavePointOnBack);
78
+
79
+ if (hasLeaveAbility && saveLoadMenu != null)
80
+ saveLoadMenu.GetComponentInChildren<MenuGroupBase>().OnBack.RemoveAllListeners();
81
+ }
82
+
83
+
84
+ /// <summary>
85
+ ///
86
+ /// </summary>
87
+ public virtual void ExecuteValidSavePoint()
88
+ {
89
+ if (SavePointIsValid())
90
+ LoadSavePoint();
91
+ else if (roomIsSavePoint)
92
+ return;
93
+ else
94
+ returnToMenuHandler.ReturnToMenu();
95
+ }
96
+
97
+ /// <summary>
98
+ ///
99
+ /// </summary>
100
+ /// <returns></returns>
101
+ protected abstract bool SavePointIsValid();
102
+
103
+ /// <summary>
104
+ ///
105
+ /// </summary>
106
+ protected abstract void LoadSavePoint();
107
+
108
+ /// <summary>
109
+ ///
110
+ /// </summary>
111
+ protected virtual void ShowSavePointUI() => savePointGroup.Show();
112
+
113
+ /// <summary>
114
+ ///
115
+ /// </summary>
116
+ protected abstract void StartSavePointTransition();
117
+
118
+ /// <summary>
119
+ ///
120
+ /// </summary>
121
+ protected virtual void MoveToSavePointOnBack()
122
+ {
123
+ if (!hasLeaveAbility)
124
+ {
125
+ hasLeaveAbility = true;
126
+
127
+ MenuGroupBase menuGroup = saveLoadMenu.GetComponentInChildren<MenuGroupBase>();
128
+
129
+ menuGroup.OnBack.AddListener(menuGroup.Hide);
130
+
131
+ menuGroup.OnBack.AddListener(StartSavePointTransition);
132
+ }
133
+ }
134
+ }
135
135
  }
@@ -1,11 +1,11 @@
1
- fileFormatVersion: 2
2
- guid: 0b42b8b825442724782f0a15abf71fd2
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: 0b42b8b825442724782f0a15abf71fd2
3
+ MonoImporter:
4
+ externalObjects: {}
5
+ serializedVersion: 2
6
+ defaultReferences: []
7
+ executionOrder: 0
8
+ icon: {instanceID: 0}
9
+ userData:
10
+ assetBundleName:
11
+ assetBundleVariant:
@@ -1,121 +1,121 @@
1
- //Author: Benjamin "Sweden" Jillson : Discord: sweden_gaming For Project Eden's Garden
2
- using DREditor.EventObjects;
3
- using UnityEngine;
4
-
5
- namespace DREditor.UI.SavingLoading
6
- {
7
- /// <summary>
8
- ///
9
- /// </summary>
10
- [ClassHeader(nameof(SceneEventListener) + ": Should listen to OnFinishedLoadingRoom." +
11
- "\n\n")]
12
- public class SavePointUIGameState : SceneEventListener
13
- {
14
- /// <summary>
15
- ///
16
- /// </summary>
17
- [Header("")]
18
- [Divider]
19
- [Tooltip("")]
20
- [SerializeField] protected BoolWithEvent isLoadingFile = null;
21
-
22
- /// <summary>
23
- ///
24
- /// </summary>
25
- [Tooltip("")]
26
- [SerializeField] protected BoolWithEvent controlsMenuForceDisable = null;
27
-
28
- /// <summary>
29
- ///
30
- /// </summary>
31
- [Tooltip("")]
32
- [SerializeField] protected BoolWithEvent skipActivateControls = null;
33
-
34
- /// <summary>
35
- ///
36
- /// </summary>
37
- [Tooltip("")]
38
- [SerializeField] protected BoolWithEvent onLastObjective = null;
39
-
40
-
41
- /// <summary>
42
- ///
43
- /// </summary>
44
- [Header("")]
45
- [Divider]
46
- [Tooltip("")]
47
- [SerializeField] protected BoolWithEvent inTrialMode = null;
48
-
49
- /// <summary>
50
- ///
51
- /// </summary>
52
- [Divider]
53
-
54
- [Tooltip("")]
55
- [SerializeField] protected IntWithEvent currentAddState = null;
56
-
57
- /// <summary>
58
- ///
59
- /// </summary>
60
- [Tooltip("")]
61
- [SerializeField] protected int endChapterStateIndex = 4;
62
-
63
-
64
- /// <summary>
65
- ///
66
- /// </summary>
67
- protected virtual void Awake() => InitializeEndOfChapter();
68
-
69
- /// <summary>
70
- ///
71
- /// </summary>
72
- protected virtual void InitializeEndOfChapter()
73
- {
74
- if (currentAddState != null && onLastObjective.Value)
75
- currentAddState.SetValue(endChapterStateIndex);
76
- }
77
-
78
-
79
- /// <inheritdoc/>
80
- protected override void OnEnable()
81
- {
82
- base.OnEnable();
83
-
84
- controlsMenuForceDisable.SetValue(true);
85
-
86
- if (!isLoadingFile.Value)
87
- RemoveControls();
88
- }
89
-
90
- /// <inheritdoc/>
91
- protected override void OnDisable()
92
- {
93
- base.OnDisable();
94
-
95
- controlsMenuForceDisable.SetValue(false);
96
-
97
- AddControls();
98
- }
99
-
100
-
101
- /// <inheritdoc/>
102
- public override void OnEventRaised()
103
- {
104
- base.OnEventRaised();
105
-
106
- if (!isLoadingFile.Value)
107
- AddControls();
108
- }
109
-
110
-
111
- /// <summary>
112
- ///
113
- /// </summary>
114
- protected virtual void RemoveControls() => skipActivateControls.SetValue(true);
115
-
116
- /// <summary>
117
- ///
118
- /// </summary>
119
- protected virtual void AddControls() => skipActivateControls.SetValue(false);
120
- }
1
+ //Author: Benjamin "Sweden" Jillson : Discord: sweden_gaming For Project Eden's Garden
2
+ using DREditor.EventObjects;
3
+ using UnityEngine;
4
+
5
+ namespace DREditor.UI.SavingLoading
6
+ {
7
+ /// <summary>
8
+ ///
9
+ /// </summary>
10
+ [ClassHeader(nameof(SceneEventListener) + ": Should listen to OnFinishedLoadingRoom." +
11
+ "\n\n")]
12
+ public class SavePointUIGameState : SceneEventListener
13
+ {
14
+ /// <summary>
15
+ ///
16
+ /// </summary>
17
+ [Header("")]
18
+ [Divider]
19
+ [Tooltip("")]
20
+ [SerializeField] protected BoolWithEvent isLoadingFile = null;
21
+
22
+ /// <summary>
23
+ ///
24
+ /// </summary>
25
+ [Tooltip("")]
26
+ [SerializeField] protected BoolWithEvent controlsMenuForceDisable = null;
27
+
28
+ /// <summary>
29
+ ///
30
+ /// </summary>
31
+ [Tooltip("")]
32
+ [SerializeField] protected BoolWithEvent skipActivateControls = null;
33
+
34
+ /// <summary>
35
+ ///
36
+ /// </summary>
37
+ [Tooltip("")]
38
+ [SerializeField] protected BoolWithEvent onLastObjective = null;
39
+
40
+
41
+ /// <summary>
42
+ ///
43
+ /// </summary>
44
+ [Header("")]
45
+ [Divider]
46
+ [Tooltip("")]
47
+ [SerializeField] protected BoolWithEvent inTrialMode = null;
48
+
49
+ /// <summary>
50
+ ///
51
+ /// </summary>
52
+ [Divider]
53
+
54
+ [Tooltip("")]
55
+ [SerializeField] protected IntWithEvent currentAddState = null;
56
+
57
+ /// <summary>
58
+ ///
59
+ /// </summary>
60
+ [Tooltip("")]
61
+ [SerializeField] protected int endChapterStateIndex = 4;
62
+
63
+
64
+ /// <summary>
65
+ ///
66
+ /// </summary>
67
+ protected virtual void Awake() => InitializeEndOfChapter();
68
+
69
+ /// <summary>
70
+ ///
71
+ /// </summary>
72
+ protected virtual void InitializeEndOfChapter()
73
+ {
74
+ if (currentAddState != null && onLastObjective.Value)
75
+ currentAddState.SetValue(endChapterStateIndex);
76
+ }
77
+
78
+
79
+ /// <inheritdoc/>
80
+ protected override void OnEnable()
81
+ {
82
+ base.OnEnable();
83
+
84
+ controlsMenuForceDisable.SetValue(true);
85
+
86
+ if (!isLoadingFile.Value)
87
+ RemoveControls();
88
+ }
89
+
90
+ /// <inheritdoc/>
91
+ protected override void OnDisable()
92
+ {
93
+ base.OnDisable();
94
+
95
+ controlsMenuForceDisable.SetValue(false);
96
+
97
+ AddControls();
98
+ }
99
+
100
+
101
+ /// <inheritdoc/>
102
+ public override void OnEventRaised()
103
+ {
104
+ base.OnEventRaised();
105
+
106
+ if (!isLoadingFile.Value)
107
+ AddControls();
108
+ }
109
+
110
+
111
+ /// <summary>
112
+ ///
113
+ /// </summary>
114
+ protected virtual void RemoveControls() => skipActivateControls.SetValue(true);
115
+
116
+ /// <summary>
117
+ ///
118
+ /// </summary>
119
+ protected virtual void AddControls() => skipActivateControls.SetValue(false);
120
+ }
121
121
  }
@@ -1,11 +1,11 @@
1
- fileFormatVersion: 2
2
- guid: d5410115d46c95a4fa0c5ca40e55728e
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: d5410115d46c95a4fa0c5ca40e55728e
3
+ MonoImporter:
4
+ externalObjects: {}
5
+ serializedVersion: 2
6
+ defaultReferences: []
7
+ executionOrder: 0
8
+ icon: {instanceID: 0}
9
+ userData:
10
+ assetBundleName:
11
+ assetBundleVariant: