net.dreditor.presents 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/DREditor.Presents.asmdef +15 -15
- package/DREditor.Presents.asmdef.meta +7 -7
- package/Editor/CreatePresentsWizard.cs +159 -159
- package/Editor/CreatePresentsWizard.cs.meta +11 -11
- package/Editor/DREditor.Presents.Editor.asmdef +17 -17
- package/Editor/DREditor.Presents.Editor.asmdef.meta +7 -7
- package/Editor/DescriptionsByIDOption.cs +105 -105
- package/Editor/DescriptionsByIDOption.cs.meta +1 -1
- package/Editor/PresentDatabaseEditor.cs +183 -183
- package/Editor/PresentDatabaseEditor.cs.meta +11 -11
- package/Editor/PresentEditor.cs +152 -152
- package/Editor/PresentEditor.cs.meta +11 -11
- package/Editor/PresentGoogleSheetsImportOption.cs +54 -54
- package/Editor/PresentGoogleSheetsImportOption.cs.meta +1 -1
- package/Editor/PresentImportOptionBase.cs +131 -131
- package/Editor/PresentImportOptionBase.cs.meta +1 -1
- package/Editor/PresentReactionLevelOption.cs +80 -80
- package/Editor/PresentReactionLevelOption.cs.meta +1 -1
- package/Editor/PresentUtility.cs +41 -41
- package/Editor/PresentUtility.cs.meta +11 -11
- package/Editor/ReactionByIDCharactersOption.cs +135 -135
- package/Editor/ReactionByIDCharactersOption.cs.meta +1 -1
- package/Editor/ReactionByIDOption.cs +53 -53
- package/Editor/ReactionByIDOption.cs.meta +1 -1
- package/Editor/ReactionImportOption.cs +73 -73
- package/Editor/ReactionImportOption.cs.meta +1 -1
- package/Editor/ReactionImporter.cs +58 -58
- package/Editor/ReactionImporter.cs.meta +11 -11
- package/Editor/RenamePresentsByIDOption.cs +95 -95
- package/Editor/RenamePresentsByIDOption.cs.meta +1 -1
- package/Editor/StudentReactionCollectionEditor.cs +103 -103
- package/Editor/StudentReactionCollectionEditor.cs.meta +1 -1
- package/Editor/StudentReactionEditor.cs +82 -82
- package/Editor/StudentReactionEditor.cs.meta +1 -1
- package/Editor.meta +8 -8
- package/IAmountablePresent.cs +28 -28
- package/IAmountablePresent.cs.meta +1 -1
- package/INewPresentObtained.cs +21 -21
- package/INewPresentObtained.cs.meta +1 -1
- package/IPresentData.cs +9 -9
- package/IPresentData.cs.meta +1 -1
- package/IPresentManager.cs +37 -37
- package/IPresentManager.cs.meta +1 -1
- package/IReactionEntry.cs +20 -20
- package/IReactionEntry.cs.meta +1 -1
- package/Present.cs +23 -23
- package/Present.cs.meta +11 -11
- package/PresentData.cs +49 -49
- package/PresentData.cs.meta +11 -11
- package/PresentDatabase.cs +27 -27
- package/PresentDatabase.cs.meta +11 -11
- package/PresentManager.cs +70 -70
- package/PresentManager.cs.meta +11 -11
- package/PresentManagerBase.cs +34 -34
- package/PresentManagerBase.cs.meta +1 -1
- package/PresentReactionLevel.cs +12 -12
- package/PresentReactionLevel.cs.meta +11 -11
- package/PresentSaveBase.cs +25 -25
- package/PresentSaveBase.cs.meta +1 -1
- package/ReactionLevelDatabase.cs +34 -34
- package/ReactionLevelDatabase.cs.meta +11 -11
- package/{Samples → Samples~}/Present_Manager.prefab +54 -54
- package/{Samples → Samples~}/Present_Manager.prefab.meta +7 -7
- package/StudentReaction.cs +27 -27
- package/StudentReaction.cs.meta +1 -1
- package/StudentReactionCollection.cs +44 -44
- package/StudentReactionCollection.cs.meta +1 -1
- package/package.json +39 -34
- package/package.json.meta +7 -7
- package/Samples.meta +0 -8
package/PresentManager.cs
CHANGED
|
@@ -1,71 +1,71 @@
|
|
|
1
|
-
//Author: Benjamin "Sweden" Jillson : Discord: sweden_gaming For Project Eden's Garden
|
|
2
|
-
using DREditor.Saving;
|
|
3
|
-
using DREditor.Services;
|
|
4
|
-
using DREditor.Utility;
|
|
5
|
-
using System.Collections.Generic;
|
|
6
|
-
using UnityEngine;
|
|
7
|
-
|
|
8
|
-
namespace DREditor.Presents
|
|
9
|
-
{
|
|
10
|
-
/// <summary>
|
|
11
|
-
///
|
|
12
|
-
/// </summary>
|
|
13
|
-
[ClassHeader(nameof(ServiceHolder<IPresentManager>) + " for type: " + nameof(IPresentManager) +
|
|
14
|
-
"\n\n")]
|
|
15
|
-
public class PresentManager : PresentManagerBase<PresentData>, IDRESaveable, IDRELoadableManager, ILoadOnChapterSelect
|
|
16
|
-
{
|
|
17
|
-
/// <summary>
|
|
18
|
-
///
|
|
19
|
-
/// </summary>
|
|
20
|
-
[Header("")]
|
|
21
|
-
[Divider]
|
|
22
|
-
[Tooltip("")]
|
|
23
|
-
[SerializeField] protected string saveKey = "presentData";
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
/// <inheritdoc/>
|
|
27
|
-
public override void AddPresent(int id, int amt = 1)
|
|
28
|
-
{
|
|
29
|
-
IAmountablePresent data = Get<IAmountablePresent>(id);
|
|
30
|
-
|
|
31
|
-
if (data != null)
|
|
32
|
-
data.Add(amt);
|
|
33
|
-
else
|
|
34
|
-
presentDatas.Add(new(id, amt));
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
/// <inheritdoc/>
|
|
39
|
-
public virtual void Save(Dictionary<string, object> saveData) => saveData.Set(saveKey, presentDatas);
|
|
40
|
-
|
|
41
|
-
/// <inheritdoc/>
|
|
42
|
-
public virtual void LoadManager(Dictionary<string, object> saveDatas, bool inChapterSelect)
|
|
43
|
-
{
|
|
44
|
-
if (!inChapterSelect)
|
|
45
|
-
SetPresentData(saveDatas.Get<List<PresentData>>(saveKey));
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
/// <summary>
|
|
49
|
-
///
|
|
50
|
-
/// </summary>
|
|
51
|
-
/// <param name="newDatas"></param>
|
|
52
|
-
protected virtual void SetPresentData(List<PresentData> newDatas)
|
|
53
|
-
{
|
|
54
|
-
ClearPresentData();
|
|
55
|
-
|
|
56
|
-
if (newDatas != null)
|
|
57
|
-
foreach (var presentData in newDatas)
|
|
58
|
-
presentDatas.Add(presentData.DeepCopy());
|
|
59
|
-
}
|
|
60
|
-
|
|
61
|
-
/// <summary>
|
|
62
|
-
///
|
|
63
|
-
/// </summary>
|
|
64
|
-
protected virtual void ClearPresentData() => presentDatas.Clear();
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
/// <inheritdoc/>
|
|
68
|
-
public virtual void CarryOverOnChapterSelect(Dictionary<string, object> oldSaveDatas, Dictionary<string, object> newSaveDatas) =>
|
|
69
|
-
newSaveDatas.Set(saveKey, oldSaveDatas.Get<List<PresentData>>(saveKey));
|
|
70
|
-
}
|
|
1
|
+
//Author: Benjamin "Sweden" Jillson : Discord: sweden_gaming For Project Eden's Garden
|
|
2
|
+
using DREditor.Saving;
|
|
3
|
+
using DREditor.Services;
|
|
4
|
+
using DREditor.Utility;
|
|
5
|
+
using System.Collections.Generic;
|
|
6
|
+
using UnityEngine;
|
|
7
|
+
|
|
8
|
+
namespace DREditor.Presents
|
|
9
|
+
{
|
|
10
|
+
/// <summary>
|
|
11
|
+
///
|
|
12
|
+
/// </summary>
|
|
13
|
+
[ClassHeader(nameof(ServiceHolder<IPresentManager>) + " for type: " + nameof(IPresentManager) +
|
|
14
|
+
"\n\n")]
|
|
15
|
+
public class PresentManager : PresentManagerBase<PresentData>, IDRESaveable, IDRELoadableManager, ILoadOnChapterSelect
|
|
16
|
+
{
|
|
17
|
+
/// <summary>
|
|
18
|
+
///
|
|
19
|
+
/// </summary>
|
|
20
|
+
[Header("")]
|
|
21
|
+
[Divider]
|
|
22
|
+
[Tooltip("")]
|
|
23
|
+
[SerializeField] protected string saveKey = "presentData";
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
/// <inheritdoc/>
|
|
27
|
+
public override void AddPresent(int id, int amt = 1)
|
|
28
|
+
{
|
|
29
|
+
IAmountablePresent data = Get<IAmountablePresent>(id);
|
|
30
|
+
|
|
31
|
+
if (data != null)
|
|
32
|
+
data.Add(amt);
|
|
33
|
+
else
|
|
34
|
+
presentDatas.Add(new(id, amt));
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
|
|
38
|
+
/// <inheritdoc/>
|
|
39
|
+
public virtual void Save(Dictionary<string, object> saveData) => saveData.Set(saveKey, presentDatas);
|
|
40
|
+
|
|
41
|
+
/// <inheritdoc/>
|
|
42
|
+
public virtual void LoadManager(Dictionary<string, object> saveDatas, bool inChapterSelect)
|
|
43
|
+
{
|
|
44
|
+
if (!inChapterSelect)
|
|
45
|
+
SetPresentData(saveDatas.Get<List<PresentData>>(saveKey));
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
/// <summary>
|
|
49
|
+
///
|
|
50
|
+
/// </summary>
|
|
51
|
+
/// <param name="newDatas"></param>
|
|
52
|
+
protected virtual void SetPresentData(List<PresentData> newDatas)
|
|
53
|
+
{
|
|
54
|
+
ClearPresentData();
|
|
55
|
+
|
|
56
|
+
if (newDatas != null)
|
|
57
|
+
foreach (var presentData in newDatas)
|
|
58
|
+
presentDatas.Add(presentData.DeepCopy());
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
/// <summary>
|
|
62
|
+
///
|
|
63
|
+
/// </summary>
|
|
64
|
+
protected virtual void ClearPresentData() => presentDatas.Clear();
|
|
65
|
+
|
|
66
|
+
|
|
67
|
+
/// <inheritdoc/>
|
|
68
|
+
public virtual void CarryOverOnChapterSelect(Dictionary<string, object> oldSaveDatas, Dictionary<string, object> newSaveDatas) =>
|
|
69
|
+
newSaveDatas.Set(saveKey, oldSaveDatas.Get<List<PresentData>>(saveKey));
|
|
70
|
+
}
|
|
71
71
|
}
|
package/PresentManager.cs.meta
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
fileFormatVersion: 2
|
|
2
|
-
guid: c1e952d7bcf686c40b3de7ed39ee3f59
|
|
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: c1e952d7bcf686c40b3de7ed39ee3f59
|
|
3
|
+
MonoImporter:
|
|
4
|
+
externalObjects: {}
|
|
5
|
+
serializedVersion: 2
|
|
6
|
+
defaultReferences: []
|
|
7
|
+
executionOrder: 0
|
|
8
|
+
icon: {instanceID: 0}
|
|
9
|
+
userData:
|
|
10
|
+
assetBundleName:
|
|
11
|
+
assetBundleVariant:
|
package/PresentManagerBase.cs
CHANGED
|
@@ -1,35 +1,35 @@
|
|
|
1
|
-
//Author: Benjamin "Sweden" Jillson : Discord: sweden_gaming For Project Eden's Garden
|
|
2
|
-
using DREditor.Processables;
|
|
3
|
-
using DREditor.Services;
|
|
4
|
-
using System.Collections.Generic;
|
|
5
|
-
using System.Linq;
|
|
6
|
-
using UnityEngine;
|
|
7
|
-
|
|
8
|
-
namespace DREditor.Presents
|
|
9
|
-
{
|
|
10
|
-
/// <summary>
|
|
11
|
-
///
|
|
12
|
-
/// </summary>
|
|
13
|
-
/// <typeparam name="T"></typeparam>
|
|
14
|
-
public abstract class PresentManagerBase<T> : ServiceHolder<IPresentManager>, IPresentManager where T : PresentSaveBase, IIdentifiable
|
|
15
|
-
{
|
|
16
|
-
/// <summary>
|
|
17
|
-
///
|
|
18
|
-
/// </summary>
|
|
19
|
-
[Header("")]
|
|
20
|
-
[Divider]
|
|
21
|
-
[Tooltip("")]
|
|
22
|
-
[SerializeField] protected List<T> presentDatas = new();
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
public virtual int Count { get => presentDatas.Count; }
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
public abstract void AddPresent(int id, int amt = 1);
|
|
29
|
-
|
|
30
|
-
public virtual T1 Get<T1>(int id) where T1 : IIdentifiable
|
|
31
|
-
=> presentDatas.OfType<T1>().ToList().Find(i => i.ID == id);
|
|
32
|
-
|
|
33
|
-
public virtual bool HadPresent(int id) => presentDatas.Any(i => i.ID == id);
|
|
34
|
-
}
|
|
1
|
+
//Author: Benjamin "Sweden" Jillson : Discord: sweden_gaming For Project Eden's Garden
|
|
2
|
+
using DREditor.Processables;
|
|
3
|
+
using DREditor.Services;
|
|
4
|
+
using System.Collections.Generic;
|
|
5
|
+
using System.Linq;
|
|
6
|
+
using UnityEngine;
|
|
7
|
+
|
|
8
|
+
namespace DREditor.Presents
|
|
9
|
+
{
|
|
10
|
+
/// <summary>
|
|
11
|
+
///
|
|
12
|
+
/// </summary>
|
|
13
|
+
/// <typeparam name="T"></typeparam>
|
|
14
|
+
public abstract class PresentManagerBase<T> : ServiceHolder<IPresentManager>, IPresentManager where T : PresentSaveBase, IIdentifiable
|
|
15
|
+
{
|
|
16
|
+
/// <summary>
|
|
17
|
+
///
|
|
18
|
+
/// </summary>
|
|
19
|
+
[Header("")]
|
|
20
|
+
[Divider]
|
|
21
|
+
[Tooltip("")]
|
|
22
|
+
[SerializeField] protected List<T> presentDatas = new();
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
public virtual int Count { get => presentDatas.Count; }
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
public abstract void AddPresent(int id, int amt = 1);
|
|
29
|
+
|
|
30
|
+
public virtual T1 Get<T1>(int id) where T1 : IIdentifiable
|
|
31
|
+
=> presentDatas.OfType<T1>().ToList().Find(i => i.ID == id);
|
|
32
|
+
|
|
33
|
+
public virtual bool HadPresent(int id) => presentDatas.Any(i => i.ID == id);
|
|
34
|
+
}
|
|
35
35
|
}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
fileFormatVersion: 2
|
|
1
|
+
fileFormatVersion: 2
|
|
2
2
|
guid: 0ca4945c93489b341991bd0e7aa4f0a7
|
package/PresentReactionLevel.cs
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
//Author: Benjamin "Sweden" Jillson : Discord: sweden_gaming For Project Eden's Garden
|
|
2
|
-
using UnityEngine;
|
|
3
|
-
|
|
4
|
-
namespace DREditor.Presents
|
|
5
|
-
{
|
|
6
|
-
/// <summary>
|
|
7
|
-
///
|
|
8
|
-
/// </summary>
|
|
9
|
-
[System.Serializable]
|
|
10
|
-
[CreateAssetMenu(menuName = "DREditor/Presents/Reaction Level", fileName = "Present Reaction Level")]
|
|
11
|
-
public class PresentReactionLevel : ScriptableObject { }
|
|
12
|
-
}
|
|
1
|
+
//Author: Benjamin "Sweden" Jillson : Discord: sweden_gaming For Project Eden's Garden
|
|
2
|
+
using UnityEngine;
|
|
3
|
+
|
|
4
|
+
namespace DREditor.Presents
|
|
5
|
+
{
|
|
6
|
+
/// <summary>
|
|
7
|
+
///
|
|
8
|
+
/// </summary>
|
|
9
|
+
[System.Serializable]
|
|
10
|
+
[CreateAssetMenu(menuName = "DREditor/Presents/Reaction Level", fileName = "Present Reaction Level")]
|
|
11
|
+
public class PresentReactionLevel : ScriptableObject { }
|
|
12
|
+
}
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
fileFormatVersion: 2
|
|
2
|
-
guid: a0a7a132cecfe3c488321807deacba2b
|
|
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: a0a7a132cecfe3c488321807deacba2b
|
|
3
|
+
MonoImporter:
|
|
4
|
+
externalObjects: {}
|
|
5
|
+
serializedVersion: 2
|
|
6
|
+
defaultReferences: []
|
|
7
|
+
executionOrder: 0
|
|
8
|
+
icon: {instanceID: 0}
|
|
9
|
+
userData:
|
|
10
|
+
assetBundleName:
|
|
11
|
+
assetBundleVariant:
|
package/PresentSaveBase.cs
CHANGED
|
@@ -1,26 +1,26 @@
|
|
|
1
|
-
//Author: Benjamin "Sweden" Jillson : Discord: sweden_gaming For Project Eden's Garden
|
|
2
|
-
using DREditor.Processables;
|
|
3
|
-
using UnityEngine;
|
|
4
|
-
|
|
5
|
-
namespace DREditor.Presents
|
|
6
|
-
{
|
|
7
|
-
/// <summary>
|
|
8
|
-
///
|
|
9
|
-
/// </summary>
|
|
10
|
-
public abstract class PresentSaveBase : IIdentifiable
|
|
11
|
-
{
|
|
12
|
-
/// <summary>
|
|
13
|
-
///
|
|
14
|
-
/// </summary>
|
|
15
|
-
[Tooltip("")]
|
|
16
|
-
[SerializeField] protected int ID;
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
int IIdentifiable.ID => ID;
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
protected PresentSaveBase() { }
|
|
23
|
-
|
|
24
|
-
protected PresentSaveBase(int ID) => this.ID = ID;
|
|
25
|
-
}
|
|
1
|
+
//Author: Benjamin "Sweden" Jillson : Discord: sweden_gaming For Project Eden's Garden
|
|
2
|
+
using DREditor.Processables;
|
|
3
|
+
using UnityEngine;
|
|
4
|
+
|
|
5
|
+
namespace DREditor.Presents
|
|
6
|
+
{
|
|
7
|
+
/// <summary>
|
|
8
|
+
///
|
|
9
|
+
/// </summary>
|
|
10
|
+
public abstract class PresentSaveBase : IIdentifiable
|
|
11
|
+
{
|
|
12
|
+
/// <summary>
|
|
13
|
+
///
|
|
14
|
+
/// </summary>
|
|
15
|
+
[Tooltip("")]
|
|
16
|
+
[SerializeField] protected int ID;
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
int IIdentifiable.ID => ID;
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
protected PresentSaveBase() { }
|
|
23
|
+
|
|
24
|
+
protected PresentSaveBase(int ID) => this.ID = ID;
|
|
25
|
+
}
|
|
26
26
|
}
|
package/PresentSaveBase.cs.meta
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
fileFormatVersion: 2
|
|
1
|
+
fileFormatVersion: 2
|
|
2
2
|
guid: c958577bf5a0b6445a63250ed9440e30
|
package/ReactionLevelDatabase.cs
CHANGED
|
@@ -1,35 +1,35 @@
|
|
|
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.Presents
|
|
7
|
-
{
|
|
8
|
-
/// <summary>
|
|
9
|
-
///
|
|
10
|
-
/// </summary>
|
|
11
|
-
[System.Serializable]
|
|
12
|
-
[CreateAssetMenu(menuName = "DREditor/Presents/Reaction Level Database", fileName = "Reaction Level Database")]
|
|
13
|
-
public class ReactionLevelDatabase : ScriptableObject
|
|
14
|
-
{
|
|
15
|
-
/// <summary>
|
|
16
|
-
///
|
|
17
|
-
/// </summary>
|
|
18
|
-
[Tooltip("")]
|
|
19
|
-
[SerializeField] protected List<PresentReactionLevel> reactionLevels = new();
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
/// <summary>
|
|
23
|
-
///
|
|
24
|
-
/// </summary>
|
|
25
|
-
/// <returns></returns>
|
|
26
|
-
public virtual string[] GetReactionNames() => reactionLevels.Select(reactionLevel => reactionLevel.name).ToArray();
|
|
27
|
-
|
|
28
|
-
/// <summary>
|
|
29
|
-
///
|
|
30
|
-
/// </summary>
|
|
31
|
-
/// <param name="index"></param>
|
|
32
|
-
/// <returns></returns>
|
|
33
|
-
public virtual bool ReactionIndexValid(int index) => index >= 0 && index < reactionLevels.Count;
|
|
34
|
-
}
|
|
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.Presents
|
|
7
|
+
{
|
|
8
|
+
/// <summary>
|
|
9
|
+
///
|
|
10
|
+
/// </summary>
|
|
11
|
+
[System.Serializable]
|
|
12
|
+
[CreateAssetMenu(menuName = "DREditor/Presents/Reaction Level Database", fileName = "Reaction Level Database")]
|
|
13
|
+
public class ReactionLevelDatabase : ScriptableObject
|
|
14
|
+
{
|
|
15
|
+
/// <summary>
|
|
16
|
+
///
|
|
17
|
+
/// </summary>
|
|
18
|
+
[Tooltip("")]
|
|
19
|
+
[SerializeField] protected List<PresentReactionLevel> reactionLevels = new();
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
/// <summary>
|
|
23
|
+
///
|
|
24
|
+
/// </summary>
|
|
25
|
+
/// <returns></returns>
|
|
26
|
+
public virtual string[] GetReactionNames() => reactionLevels.Select(reactionLevel => reactionLevel.name).ToArray();
|
|
27
|
+
|
|
28
|
+
/// <summary>
|
|
29
|
+
///
|
|
30
|
+
/// </summary>
|
|
31
|
+
/// <param name="index"></param>
|
|
32
|
+
/// <returns></returns>
|
|
33
|
+
public virtual bool ReactionIndexValid(int index) => index >= 0 && index < reactionLevels.Count;
|
|
34
|
+
}
|
|
35
35
|
}
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
fileFormatVersion: 2
|
|
2
|
-
guid: cdbb190fefc7f534ebab9a4bf8e77133
|
|
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: cdbb190fefc7f534ebab9a4bf8e77133
|
|
3
|
+
MonoImporter:
|
|
4
|
+
externalObjects: {}
|
|
5
|
+
serializedVersion: 2
|
|
6
|
+
defaultReferences: []
|
|
7
|
+
executionOrder: 0
|
|
8
|
+
icon: {instanceID: 0}
|
|
9
|
+
userData:
|
|
10
|
+
assetBundleName:
|
|
11
|
+
assetBundleVariant:
|
|
@@ -1,54 +1,54 @@
|
|
|
1
|
-
%YAML 1.1
|
|
2
|
-
%TAG !u! tag:unity3d.com,2011:
|
|
3
|
-
--- !u!1 &6482524680141576321
|
|
4
|
-
GameObject:
|
|
5
|
-
m_ObjectHideFlags: 0
|
|
6
|
-
m_CorrespondingSourceObject: {fileID: 0}
|
|
7
|
-
m_PrefabInstance: {fileID: 0}
|
|
8
|
-
m_PrefabAsset: {fileID: 0}
|
|
9
|
-
serializedVersion: 6
|
|
10
|
-
m_Component:
|
|
11
|
-
- component: {fileID: 2412666774934771798}
|
|
12
|
-
- component: {fileID: 6213949345921309375}
|
|
13
|
-
m_Layer: 5
|
|
14
|
-
m_Name: Present_Manager
|
|
15
|
-
m_TagString: Untagged
|
|
16
|
-
m_Icon: {fileID: 0}
|
|
17
|
-
m_NavMeshLayer: 0
|
|
18
|
-
m_StaticEditorFlags: 0
|
|
19
|
-
m_IsActive: 1
|
|
20
|
-
--- !u!224 &2412666774934771798
|
|
21
|
-
RectTransform:
|
|
22
|
-
m_ObjectHideFlags: 0
|
|
23
|
-
m_CorrespondingSourceObject: {fileID: 0}
|
|
24
|
-
m_PrefabInstance: {fileID: 0}
|
|
25
|
-
m_PrefabAsset: {fileID: 0}
|
|
26
|
-
m_GameObject: {fileID: 6482524680141576321}
|
|
27
|
-
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
|
28
|
-
m_LocalPosition: {x: 0, y: 0, z: 0}
|
|
29
|
-
m_LocalScale: {x: 1, y: 1, z: 1}
|
|
30
|
-
m_ConstrainProportionsScale: 0
|
|
31
|
-
m_Children: []
|
|
32
|
-
m_Father: {fileID: 0}
|
|
33
|
-
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
|
34
|
-
m_AnchorMin: {x: 0.5, y: 0.5}
|
|
35
|
-
m_AnchorMax: {x: 0.5, y: 0.5}
|
|
36
|
-
m_AnchoredPosition: {x: 0, y: 0}
|
|
37
|
-
m_SizeDelta: {x: 100, y: 100}
|
|
38
|
-
m_Pivot: {x: 0.5, y: 0.5}
|
|
39
|
-
--- !u!114 &6213949345921309375
|
|
40
|
-
MonoBehaviour:
|
|
41
|
-
m_ObjectHideFlags: 0
|
|
42
|
-
m_CorrespondingSourceObject: {fileID: 0}
|
|
43
|
-
m_PrefabInstance: {fileID: 0}
|
|
44
|
-
m_PrefabAsset: {fileID: 0}
|
|
45
|
-
m_GameObject: {fileID: 6482524680141576321}
|
|
46
|
-
m_Enabled: 1
|
|
47
|
-
m_EditorHideFlags: 0
|
|
48
|
-
m_Script: {fileID: 11500000, guid: c1e952d7bcf686c40b3de7ed39ee3f59, type: 3}
|
|
49
|
-
m_Name:
|
|
50
|
-
m_EditorClassIdentifier:
|
|
51
|
-
registerService: 1
|
|
52
|
-
dontDestroyOnLoad: 0
|
|
53
|
-
presentDatas: []
|
|
54
|
-
saveKey: presentData
|
|
1
|
+
%YAML 1.1
|
|
2
|
+
%TAG !u! tag:unity3d.com,2011:
|
|
3
|
+
--- !u!1 &6482524680141576321
|
|
4
|
+
GameObject:
|
|
5
|
+
m_ObjectHideFlags: 0
|
|
6
|
+
m_CorrespondingSourceObject: {fileID: 0}
|
|
7
|
+
m_PrefabInstance: {fileID: 0}
|
|
8
|
+
m_PrefabAsset: {fileID: 0}
|
|
9
|
+
serializedVersion: 6
|
|
10
|
+
m_Component:
|
|
11
|
+
- component: {fileID: 2412666774934771798}
|
|
12
|
+
- component: {fileID: 6213949345921309375}
|
|
13
|
+
m_Layer: 5
|
|
14
|
+
m_Name: Present_Manager
|
|
15
|
+
m_TagString: Untagged
|
|
16
|
+
m_Icon: {fileID: 0}
|
|
17
|
+
m_NavMeshLayer: 0
|
|
18
|
+
m_StaticEditorFlags: 0
|
|
19
|
+
m_IsActive: 1
|
|
20
|
+
--- !u!224 &2412666774934771798
|
|
21
|
+
RectTransform:
|
|
22
|
+
m_ObjectHideFlags: 0
|
|
23
|
+
m_CorrespondingSourceObject: {fileID: 0}
|
|
24
|
+
m_PrefabInstance: {fileID: 0}
|
|
25
|
+
m_PrefabAsset: {fileID: 0}
|
|
26
|
+
m_GameObject: {fileID: 6482524680141576321}
|
|
27
|
+
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
|
28
|
+
m_LocalPosition: {x: 0, y: 0, z: 0}
|
|
29
|
+
m_LocalScale: {x: 1, y: 1, z: 1}
|
|
30
|
+
m_ConstrainProportionsScale: 0
|
|
31
|
+
m_Children: []
|
|
32
|
+
m_Father: {fileID: 0}
|
|
33
|
+
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
|
34
|
+
m_AnchorMin: {x: 0.5, y: 0.5}
|
|
35
|
+
m_AnchorMax: {x: 0.5, y: 0.5}
|
|
36
|
+
m_AnchoredPosition: {x: 0, y: 0}
|
|
37
|
+
m_SizeDelta: {x: 100, y: 100}
|
|
38
|
+
m_Pivot: {x: 0.5, y: 0.5}
|
|
39
|
+
--- !u!114 &6213949345921309375
|
|
40
|
+
MonoBehaviour:
|
|
41
|
+
m_ObjectHideFlags: 0
|
|
42
|
+
m_CorrespondingSourceObject: {fileID: 0}
|
|
43
|
+
m_PrefabInstance: {fileID: 0}
|
|
44
|
+
m_PrefabAsset: {fileID: 0}
|
|
45
|
+
m_GameObject: {fileID: 6482524680141576321}
|
|
46
|
+
m_Enabled: 1
|
|
47
|
+
m_EditorHideFlags: 0
|
|
48
|
+
m_Script: {fileID: 11500000, guid: c1e952d7bcf686c40b3de7ed39ee3f59, type: 3}
|
|
49
|
+
m_Name:
|
|
50
|
+
m_EditorClassIdentifier:
|
|
51
|
+
registerService: 1
|
|
52
|
+
dontDestroyOnLoad: 0
|
|
53
|
+
presentDatas: []
|
|
54
|
+
saveKey: presentData
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
fileFormatVersion: 2
|
|
2
|
-
guid: 2d7be3ffa5563fa4eb826b8b52f13021
|
|
3
|
-
PrefabImporter:
|
|
4
|
-
externalObjects: {}
|
|
5
|
-
userData:
|
|
6
|
-
assetBundleName:
|
|
7
|
-
assetBundleVariant:
|
|
1
|
+
fileFormatVersion: 2
|
|
2
|
+
guid: 2d7be3ffa5563fa4eb826b8b52f13021
|
|
3
|
+
PrefabImporter:
|
|
4
|
+
externalObjects: {}
|
|
5
|
+
userData:
|
|
6
|
+
assetBundleName:
|
|
7
|
+
assetBundleVariant:
|
package/StudentReaction.cs
CHANGED
|
@@ -1,28 +1,28 @@
|
|
|
1
|
-
//Author: Benjamin "Sweden" Jillson : Discord: sweden_gaming For Project Eden's Garden
|
|
2
|
-
using DREditor.Characters;
|
|
3
|
-
using UnityEngine;
|
|
4
|
-
|
|
5
|
-
namespace DREditor.Presents
|
|
6
|
-
{
|
|
7
|
-
/// <summary>
|
|
8
|
-
///
|
|
9
|
-
/// </summary>
|
|
10
|
-
[System.Serializable]
|
|
11
|
-
public class StudentReaction : IReactionEntry
|
|
12
|
-
{
|
|
13
|
-
/// <summary>
|
|
14
|
-
///
|
|
15
|
-
/// </summary>
|
|
16
|
-
[SerializeField] protected Character character;
|
|
17
|
-
|
|
18
|
-
/// <summary>
|
|
19
|
-
///
|
|
20
|
-
/// </summary>
|
|
21
|
-
[SerializeField] protected int reactionIndex = 2;
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
public virtual Character Character { get => character; set => character = value; }
|
|
25
|
-
|
|
26
|
-
public virtual int ReactionIndex { get => reactionIndex; set => reactionIndex = value; }
|
|
27
|
-
}
|
|
1
|
+
//Author: Benjamin "Sweden" Jillson : Discord: sweden_gaming For Project Eden's Garden
|
|
2
|
+
using DREditor.Characters;
|
|
3
|
+
using UnityEngine;
|
|
4
|
+
|
|
5
|
+
namespace DREditor.Presents
|
|
6
|
+
{
|
|
7
|
+
/// <summary>
|
|
8
|
+
///
|
|
9
|
+
/// </summary>
|
|
10
|
+
[System.Serializable]
|
|
11
|
+
public class StudentReaction : IReactionEntry
|
|
12
|
+
{
|
|
13
|
+
/// <summary>
|
|
14
|
+
///
|
|
15
|
+
/// </summary>
|
|
16
|
+
[SerializeField] protected Character character;
|
|
17
|
+
|
|
18
|
+
/// <summary>
|
|
19
|
+
///
|
|
20
|
+
/// </summary>
|
|
21
|
+
[SerializeField] protected int reactionIndex = 2;
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
public virtual Character Character { get => character; set => character = value; }
|
|
25
|
+
|
|
26
|
+
public virtual int ReactionIndex { get => reactionIndex; set => reactionIndex = value; }
|
|
27
|
+
}
|
|
28
28
|
}
|
package/StudentReaction.cs.meta
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
fileFormatVersion: 2
|
|
1
|
+
fileFormatVersion: 2
|
|
2
2
|
guid: 48843c304e9b11748b735d42ee65e19a
|