net.dreditor.ui.savingloading 0.1.6 → 0.1.8
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/DREditor.UI.SavingLoading.asmdef +22 -22
- package/DREditor.UI.SavingLoading.asmdef.meta +7 -7
- package/PostSavePoint.cs +57 -57
- package/PostSavePoint.cs.meta +11 -11
- package/ReturnToMenuOnPauseMenu.cs +113 -113
- package/ReturnToMenuOnPauseMenu.cs.meta +11 -11
- package/{Samples → Samples~}/DRE_SavePoint.unity +262 -262
- package/{Samples → Samples~}/DRE_SavePoint.unity.meta +7 -7
- package/{Samples → Samples~}/Save_Point_Canvas_Shell.prefab +169 -169
- package/{Samples → Samples~}/Save_Point_Canvas_Shell.prefab.meta +7 -7
- package/{Samples → Samples~}/Save_Point_Canvas_Template.prefab +563 -563
- package/{Samples → Samples~}/Save_Point_Canvas_Template.prefab.meta +7 -7
- package/{Samples → Samples~}/Save_Point_System_Template.prefab +1434 -1434
- package/{Samples → Samples~}/Save_Point_System_Template.prefab.meta +7 -7
- package/SaveDataDisplayerBase.cs +24 -24
- package/SaveDataDisplayerBase.cs.meta +11 -11
- package/SaveDateDisplayer.cs +146 -146
- package/SaveDateDisplayer.cs.meta +11 -11
- package/SaveLoadMenu.cs +298 -298
- package/SaveLoadMenu.cs.meta +11 -11
- package/SaveLoadMenuBase.cs +122 -122
- package/SaveLoadMenuBase.cs.meta +11 -11
- package/SavePointUI.cs +239 -239
- package/SavePointUI.cs.meta +11 -11
- package/SavePointUIBase.cs +134 -134
- package/SavePointUIBase.cs.meta +11 -11
- package/SavePointUIGameState.cs +120 -120
- package/SavePointUIGameState.cs.meta +11 -11
- package/SaveSlot.cs +81 -81
- package/SaveSlot.cs.meta +11 -11
- package/SaveSlotBase.cs +99 -99
- package/SaveSlotBase.cs.meta +11 -11
- package/SaveTitleDisplayer.cs +204 -204
- package/SaveTitleDisplayer.cs.meta +11 -11
- package/package.json +46 -41
- package/package.json.meta +7 -7
- package/Samples.meta +0 -8
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
fileFormatVersion: 2
|
|
2
|
-
guid: a32160ffe8df8294f9bd35d1b2339612
|
|
3
|
-
PrefabImporter:
|
|
4
|
-
externalObjects: {}
|
|
5
|
-
userData:
|
|
6
|
-
assetBundleName:
|
|
7
|
-
assetBundleVariant:
|
|
1
|
+
fileFormatVersion: 2
|
|
2
|
+
guid: a32160ffe8df8294f9bd35d1b2339612
|
|
3
|
+
PrefabImporter:
|
|
4
|
+
externalObjects: {}
|
|
5
|
+
userData:
|
|
6
|
+
assetBundleName:
|
|
7
|
+
assetBundleVariant:
|
package/SaveDataDisplayerBase.cs
CHANGED
|
@@ -1,25 +1,25 @@
|
|
|
1
|
-
//Author: Benjamin "Sweden" Jillson : Discord: sweden_gaming For Project Eden's Garden
|
|
2
|
-
using System.Collections.Generic;
|
|
3
|
-
using UnityEngine;
|
|
4
|
-
|
|
5
|
-
namespace DREditor.UI.SavingLoading
|
|
6
|
-
{
|
|
7
|
-
/// <summary>
|
|
8
|
-
///
|
|
9
|
-
/// </summary>
|
|
10
|
-
public abstract class SaveDataDisplayerBase : MonoBehaviour
|
|
11
|
-
{
|
|
12
|
-
/// <summary>
|
|
13
|
-
///
|
|
14
|
-
/// </summary>
|
|
15
|
-
/// <param name="saveDatas"></param>
|
|
16
|
-
/// <param name="id"></param>
|
|
17
|
-
public abstract void Display(Dictionary<string, object> saveDatas, int id);
|
|
18
|
-
|
|
19
|
-
/// <summary>
|
|
20
|
-
///
|
|
21
|
-
/// </summary>
|
|
22
|
-
/// <param name="id"></param>
|
|
23
|
-
public abstract void OnSaveNotFound(int id);
|
|
24
|
-
}
|
|
1
|
+
//Author: Benjamin "Sweden" Jillson : Discord: sweden_gaming For Project Eden's Garden
|
|
2
|
+
using System.Collections.Generic;
|
|
3
|
+
using UnityEngine;
|
|
4
|
+
|
|
5
|
+
namespace DREditor.UI.SavingLoading
|
|
6
|
+
{
|
|
7
|
+
/// <summary>
|
|
8
|
+
///
|
|
9
|
+
/// </summary>
|
|
10
|
+
public abstract class SaveDataDisplayerBase : MonoBehaviour
|
|
11
|
+
{
|
|
12
|
+
/// <summary>
|
|
13
|
+
///
|
|
14
|
+
/// </summary>
|
|
15
|
+
/// <param name="saveDatas"></param>
|
|
16
|
+
/// <param name="id"></param>
|
|
17
|
+
public abstract void Display(Dictionary<string, object> saveDatas, int id);
|
|
18
|
+
|
|
19
|
+
/// <summary>
|
|
20
|
+
///
|
|
21
|
+
/// </summary>
|
|
22
|
+
/// <param name="id"></param>
|
|
23
|
+
public abstract void OnSaveNotFound(int id);
|
|
24
|
+
}
|
|
25
25
|
}
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
fileFormatVersion: 2
|
|
2
|
-
guid: 4f1268aa4a793284db5c5527f7e1e5c6
|
|
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: 4f1268aa4a793284db5c5527f7e1e5c6
|
|
3
|
+
MonoImporter:
|
|
4
|
+
externalObjects: {}
|
|
5
|
+
serializedVersion: 2
|
|
6
|
+
defaultReferences: []
|
|
7
|
+
executionOrder: 0
|
|
8
|
+
icon: {instanceID: 0}
|
|
9
|
+
userData:
|
|
10
|
+
assetBundleName:
|
|
11
|
+
assetBundleVariant:
|
package/SaveDateDisplayer.cs
CHANGED
|
@@ -1,147 +1,147 @@
|
|
|
1
|
-
//Author: Benjamin "Sweden" Jillson : Discord: sweden_gaming For Project Eden's Garden
|
|
2
|
-
using DREditor.Saving;
|
|
3
|
-
using System;
|
|
4
|
-
using System.Collections.Generic;
|
|
5
|
-
using System.Globalization;
|
|
6
|
-
using TMPro;
|
|
7
|
-
using UnityEngine;
|
|
8
|
-
|
|
9
|
-
namespace DREditor.UI.SavingLoading
|
|
10
|
-
{
|
|
11
|
-
/// <summary>
|
|
12
|
-
///
|
|
13
|
-
/// </summary>
|
|
14
|
-
[ClassHeader(nameof(SaveDataDisplayerBase) +
|
|
15
|
-
"\n\n")]
|
|
16
|
-
public class SaveDateDisplayer : SaveDataDisplayerBase
|
|
17
|
-
{
|
|
18
|
-
/// <summary>
|
|
19
|
-
///
|
|
20
|
-
/// </summary>
|
|
21
|
-
[Tooltip("")]
|
|
22
|
-
[SerializeField] protected bool debugLogs = false;
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
/// <summary>
|
|
26
|
-
///
|
|
27
|
-
/// </summary>
|
|
28
|
-
[Header("")]
|
|
29
|
-
[Divider]
|
|
30
|
-
[Tooltip("")]
|
|
31
|
-
[SerializeField] protected TextMeshProUGUI date = null;
|
|
32
|
-
|
|
33
|
-
/// <summary>
|
|
34
|
-
///
|
|
35
|
-
/// </summary>
|
|
36
|
-
[Tooltip("")]
|
|
37
|
-
[SerializeField] protected TextMeshProUGUI timeOfSave = null;
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
/// <summary>
|
|
41
|
-
///
|
|
42
|
-
/// </summary>
|
|
43
|
-
[Header("")]
|
|
44
|
-
[Divider]
|
|
45
|
-
[Tooltip("")]
|
|
46
|
-
[SerializeField] protected string dateFormat = "MM/dd/yyyy";
|
|
47
|
-
|
|
48
|
-
/// <summary>
|
|
49
|
-
///
|
|
50
|
-
/// </summary>
|
|
51
|
-
[Tooltip("")]
|
|
52
|
-
[SerializeField] protected string timeFormat = "HH:mm:ss";
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
/// <summary>
|
|
56
|
-
///
|
|
57
|
-
/// </summary>
|
|
58
|
-
protected Dictionary<string, object> saveDatas;
|
|
59
|
-
|
|
60
|
-
/// <summary>
|
|
61
|
-
///
|
|
62
|
-
/// </summary>
|
|
63
|
-
protected readonly string yearKey = "Year";
|
|
64
|
-
|
|
65
|
-
/// <summary>
|
|
66
|
-
///
|
|
67
|
-
/// </summary>
|
|
68
|
-
protected readonly string monthKey = "Month";
|
|
69
|
-
|
|
70
|
-
/// <summary>
|
|
71
|
-
///
|
|
72
|
-
/// </summary>
|
|
73
|
-
protected readonly string dayKey = "Day";
|
|
74
|
-
|
|
75
|
-
/// <summary>
|
|
76
|
-
///
|
|
77
|
-
/// </summary>
|
|
78
|
-
protected readonly string hourKey = "Hour";
|
|
79
|
-
|
|
80
|
-
/// <summary>
|
|
81
|
-
///
|
|
82
|
-
/// </summary>
|
|
83
|
-
protected readonly string minuteKey = "Minute";
|
|
84
|
-
|
|
85
|
-
/// <summary>
|
|
86
|
-
///
|
|
87
|
-
/// </summary>
|
|
88
|
-
protected readonly string secondKey = "Second";
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
/// <inheritdoc/>
|
|
92
|
-
public override void Display(Dictionary<string, object> saveDatas, int id)
|
|
93
|
-
{
|
|
94
|
-
this.saveDatas = saveDatas;
|
|
95
|
-
|
|
96
|
-
DateTime dateTime = GetSaveFileDateTime();
|
|
97
|
-
|
|
98
|
-
date.text = dateTime.ToString(dateFormat, CultureInfo.InvariantCulture);
|
|
99
|
-
|
|
100
|
-
timeOfSave.text = dateTime.ToString(timeFormat, CultureInfo.InvariantCulture);
|
|
101
|
-
|
|
102
|
-
this.saveDatas = null;
|
|
103
|
-
}
|
|
104
|
-
|
|
105
|
-
/// <summary>
|
|
106
|
-
///
|
|
107
|
-
/// </summary>
|
|
108
|
-
/// <returns></returns>
|
|
109
|
-
protected virtual DateTime GetSaveFileDateTime()
|
|
110
|
-
{
|
|
111
|
-
if (debugLogs)
|
|
112
|
-
LogDateTime();
|
|
113
|
-
|
|
114
|
-
return new DateTime(
|
|
115
|
-
saveDatas.Get<int>(yearKey),
|
|
116
|
-
saveDatas.Get<int>(monthKey),
|
|
117
|
-
saveDatas.Get<int>(dayKey),
|
|
118
|
-
saveDatas.Get<int>(hourKey),
|
|
119
|
-
saveDatas.Get<int>(minuteKey),
|
|
120
|
-
saveDatas.Get<int>(secondKey));
|
|
121
|
-
}
|
|
122
|
-
|
|
123
|
-
/// <summary>
|
|
124
|
-
///
|
|
125
|
-
/// </summary>
|
|
126
|
-
protected virtual void LogDateTime()
|
|
127
|
-
{
|
|
128
|
-
UnityEngine.Debug.Log(saveDatas.Values.Count);
|
|
129
|
-
|
|
130
|
-
UnityEngine.Debug.Log(
|
|
131
|
-
saveDatas.Get<int>(yearKey)
|
|
132
|
-
+ " " + saveDatas.Get<int>(monthKey)
|
|
133
|
-
+ " " + saveDatas.Get<int>(dayKey)
|
|
134
|
-
+ " " + saveDatas.Get<int>(hourKey)
|
|
135
|
-
+ " " + saveDatas.Get<int>(minuteKey)
|
|
136
|
-
+ " " + saveDatas.Get<int>(secondKey));
|
|
137
|
-
}
|
|
138
|
-
|
|
139
|
-
/// <inheritdoc/>
|
|
140
|
-
public override void OnSaveNotFound(int id)
|
|
141
|
-
{
|
|
142
|
-
date.text = "";
|
|
143
|
-
|
|
144
|
-
timeOfSave.text = "";
|
|
145
|
-
}
|
|
146
|
-
}
|
|
1
|
+
//Author: Benjamin "Sweden" Jillson : Discord: sweden_gaming For Project Eden's Garden
|
|
2
|
+
using DREditor.Saving;
|
|
3
|
+
using System;
|
|
4
|
+
using System.Collections.Generic;
|
|
5
|
+
using System.Globalization;
|
|
6
|
+
using TMPro;
|
|
7
|
+
using UnityEngine;
|
|
8
|
+
|
|
9
|
+
namespace DREditor.UI.SavingLoading
|
|
10
|
+
{
|
|
11
|
+
/// <summary>
|
|
12
|
+
///
|
|
13
|
+
/// </summary>
|
|
14
|
+
[ClassHeader(nameof(SaveDataDisplayerBase) +
|
|
15
|
+
"\n\n")]
|
|
16
|
+
public class SaveDateDisplayer : SaveDataDisplayerBase
|
|
17
|
+
{
|
|
18
|
+
/// <summary>
|
|
19
|
+
///
|
|
20
|
+
/// </summary>
|
|
21
|
+
[Tooltip("")]
|
|
22
|
+
[SerializeField] protected bool debugLogs = false;
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
/// <summary>
|
|
26
|
+
///
|
|
27
|
+
/// </summary>
|
|
28
|
+
[Header("")]
|
|
29
|
+
[Divider]
|
|
30
|
+
[Tooltip("")]
|
|
31
|
+
[SerializeField] protected TextMeshProUGUI date = null;
|
|
32
|
+
|
|
33
|
+
/// <summary>
|
|
34
|
+
///
|
|
35
|
+
/// </summary>
|
|
36
|
+
[Tooltip("")]
|
|
37
|
+
[SerializeField] protected TextMeshProUGUI timeOfSave = null;
|
|
38
|
+
|
|
39
|
+
|
|
40
|
+
/// <summary>
|
|
41
|
+
///
|
|
42
|
+
/// </summary>
|
|
43
|
+
[Header("")]
|
|
44
|
+
[Divider]
|
|
45
|
+
[Tooltip("")]
|
|
46
|
+
[SerializeField] protected string dateFormat = "MM/dd/yyyy";
|
|
47
|
+
|
|
48
|
+
/// <summary>
|
|
49
|
+
///
|
|
50
|
+
/// </summary>
|
|
51
|
+
[Tooltip("")]
|
|
52
|
+
[SerializeField] protected string timeFormat = "HH:mm:ss";
|
|
53
|
+
|
|
54
|
+
|
|
55
|
+
/// <summary>
|
|
56
|
+
///
|
|
57
|
+
/// </summary>
|
|
58
|
+
protected Dictionary<string, object> saveDatas;
|
|
59
|
+
|
|
60
|
+
/// <summary>
|
|
61
|
+
///
|
|
62
|
+
/// </summary>
|
|
63
|
+
protected readonly string yearKey = "Year";
|
|
64
|
+
|
|
65
|
+
/// <summary>
|
|
66
|
+
///
|
|
67
|
+
/// </summary>
|
|
68
|
+
protected readonly string monthKey = "Month";
|
|
69
|
+
|
|
70
|
+
/// <summary>
|
|
71
|
+
///
|
|
72
|
+
/// </summary>
|
|
73
|
+
protected readonly string dayKey = "Day";
|
|
74
|
+
|
|
75
|
+
/// <summary>
|
|
76
|
+
///
|
|
77
|
+
/// </summary>
|
|
78
|
+
protected readonly string hourKey = "Hour";
|
|
79
|
+
|
|
80
|
+
/// <summary>
|
|
81
|
+
///
|
|
82
|
+
/// </summary>
|
|
83
|
+
protected readonly string minuteKey = "Minute";
|
|
84
|
+
|
|
85
|
+
/// <summary>
|
|
86
|
+
///
|
|
87
|
+
/// </summary>
|
|
88
|
+
protected readonly string secondKey = "Second";
|
|
89
|
+
|
|
90
|
+
|
|
91
|
+
/// <inheritdoc/>
|
|
92
|
+
public override void Display(Dictionary<string, object> saveDatas, int id)
|
|
93
|
+
{
|
|
94
|
+
this.saveDatas = saveDatas;
|
|
95
|
+
|
|
96
|
+
DateTime dateTime = GetSaveFileDateTime();
|
|
97
|
+
|
|
98
|
+
date.text = dateTime.ToString(dateFormat, CultureInfo.InvariantCulture);
|
|
99
|
+
|
|
100
|
+
timeOfSave.text = dateTime.ToString(timeFormat, CultureInfo.InvariantCulture);
|
|
101
|
+
|
|
102
|
+
this.saveDatas = null;
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
/// <summary>
|
|
106
|
+
///
|
|
107
|
+
/// </summary>
|
|
108
|
+
/// <returns></returns>
|
|
109
|
+
protected virtual DateTime GetSaveFileDateTime()
|
|
110
|
+
{
|
|
111
|
+
if (debugLogs)
|
|
112
|
+
LogDateTime();
|
|
113
|
+
|
|
114
|
+
return new DateTime(
|
|
115
|
+
saveDatas.Get<int>(yearKey),
|
|
116
|
+
saveDatas.Get<int>(monthKey),
|
|
117
|
+
saveDatas.Get<int>(dayKey),
|
|
118
|
+
saveDatas.Get<int>(hourKey),
|
|
119
|
+
saveDatas.Get<int>(minuteKey),
|
|
120
|
+
saveDatas.Get<int>(secondKey));
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
/// <summary>
|
|
124
|
+
///
|
|
125
|
+
/// </summary>
|
|
126
|
+
protected virtual void LogDateTime()
|
|
127
|
+
{
|
|
128
|
+
UnityEngine.Debug.Log(saveDatas.Values.Count);
|
|
129
|
+
|
|
130
|
+
UnityEngine.Debug.Log(
|
|
131
|
+
saveDatas.Get<int>(yearKey)
|
|
132
|
+
+ " " + saveDatas.Get<int>(monthKey)
|
|
133
|
+
+ " " + saveDatas.Get<int>(dayKey)
|
|
134
|
+
+ " " + saveDatas.Get<int>(hourKey)
|
|
135
|
+
+ " " + saveDatas.Get<int>(minuteKey)
|
|
136
|
+
+ " " + saveDatas.Get<int>(secondKey));
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
/// <inheritdoc/>
|
|
140
|
+
public override void OnSaveNotFound(int id)
|
|
141
|
+
{
|
|
142
|
+
date.text = "";
|
|
143
|
+
|
|
144
|
+
timeOfSave.text = "";
|
|
145
|
+
}
|
|
146
|
+
}
|
|
147
147
|
}
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
fileFormatVersion: 2
|
|
2
|
-
guid: 3680ed320a4cf694c89ee0eba0025453
|
|
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: 3680ed320a4cf694c89ee0eba0025453
|
|
3
|
+
MonoImporter:
|
|
4
|
+
externalObjects: {}
|
|
5
|
+
serializedVersion: 2
|
|
6
|
+
defaultReferences: []
|
|
7
|
+
executionOrder: 0
|
|
8
|
+
icon: {instanceID: 0}
|
|
9
|
+
userData:
|
|
10
|
+
assetBundleName:
|
|
11
|
+
assetBundleVariant:
|