net.dreditor.freetimereportcards 0.0.0-stage → 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.FreeTimeReportCards.asmdef +22 -0
- package/DREditor.FreeTimeReportCards.asmdef.meta +7 -0
- package/DisplayFTEData.cs +43 -0
- package/DisplayFTEData.cs.meta +11 -0
- package/DisplayFTETabsOnSelectedCharacter.cs +40 -0
- package/DisplayFTETabsOnSelectedCharacter.cs.meta +11 -0
- package/DisplayFTEUITabsOnReset.cs +24 -0
- package/DisplayFTEUITabsOnReset.cs.meta +11 -0
- package/DisplaySelectedFTETab.cs +31 -0
- package/DisplaySelectedFTETab.cs.meta +11 -0
- package/FTEReportCard.cs +74 -0
- package/FTEReportCard.cs.meta +11 -0
- package/FTEReportCardBase.cs +172 -0
- package/FTEReportCardBase.cs.meta +11 -0
- package/IDisplayFTEUITab.cs +14 -0
- package/IDisplayFTEUITab.cs.meta +11 -0
- package/IResetFTEUITab.cs +15 -0
- package/IResetFTEUITab.cs.meta +11 -0
- package/IUpdateFTEUITab.cs +14 -0
- package/IUpdateFTEUITab.cs.meta +11 -0
- package/ReportCardUIMainTab.cs +27 -0
- package/ReportCardUIMainTab.cs.meta +11 -0
- package/Samples~/FTE_Info_Text.prefab +167 -0
- package/Samples~/FTE_Info_Text.prefab.meta +7 -0
- package/Samples~/FTE_Lock_Image_ETemplate.prefab +100 -0
- package/Samples~/FTE_Lock_Image_ETemplate.prefab.meta +7 -0
- package/Samples~/FTE_Number_Text.prefab +154 -0
- package/Samples~/FTE_Number_Text.prefab.meta +7 -0
- package/Samples~/FTE_Selected_Tab.prefab +100 -0
- package/Samples~/FTE_Selected_Tab.prefab.meta +7 -0
- package/Samples~/FTE_Selected_Tabs.prefab +938 -0
- package/Samples~/FTE_Selected_Tabs.prefab.meta +7 -0
- package/Samples~/FTE_Tab_Locks.prefab +775 -0
- package/Samples~/FTE_Tab_Locks.prefab.meta +7 -0
- package/Samples~/FTE_Tab_Numbers.prefab +951 -0
- package/Samples~/FTE_Tab_Numbers.prefab.meta +7 -0
- package/Samples~/Report_Card_FTE_UI_ETemplate.prefab +811 -0
- package/Samples~/Report_Card_FTE_UI_ETemplate.prefab.meta +7 -0
- package/Samples~/Report_Card_Main_UI_ETemplate.prefab +2099 -0
- package/Samples~/Report_Card_Main_UI_ETemplate.prefab.meta +7 -0
- package/package.json +42 -4
- package/package.json.meta +7 -0
- package/README.md +0 -3
package/.attestation.p7m
ADDED
|
Binary file
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "DREditor.FreeTimeReportCards",
|
|
3
|
+
"rootNamespace": "",
|
|
4
|
+
"references": [
|
|
5
|
+
"Unity.TextMeshPro",
|
|
6
|
+
"Unity.InputSystem",
|
|
7
|
+
"DREditor",
|
|
8
|
+
"DREditor.Controls",
|
|
9
|
+
"DREditor.UIHandling",
|
|
10
|
+
"DREditor.UI.ReportCards",
|
|
11
|
+
"DREditor.FreeTime"
|
|
12
|
+
],
|
|
13
|
+
"includePlatforms": [],
|
|
14
|
+
"excludePlatforms": [],
|
|
15
|
+
"allowUnsafeCode": false,
|
|
16
|
+
"overrideReferences": false,
|
|
17
|
+
"precompiledReferences": [],
|
|
18
|
+
"autoReferenced": true,
|
|
19
|
+
"defineConstraints": [],
|
|
20
|
+
"versionDefines": [],
|
|
21
|
+
"noEngineReferences": false
|
|
22
|
+
}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
//Author: Benjamin "Sweden" Jillson : Discord: sweden_gaming For Project Eden's Garden
|
|
2
|
+
using DREditor.UIHandling;
|
|
3
|
+
using System.Collections;
|
|
4
|
+
using UnityEngine;
|
|
5
|
+
|
|
6
|
+
namespace DREditor.FreeTimeReportCards
|
|
7
|
+
{
|
|
8
|
+
/// <summary>
|
|
9
|
+
///
|
|
10
|
+
/// </summary>
|
|
11
|
+
[ClassHeader(nameof(IDisplayFTEUITab) +
|
|
12
|
+
"\n\n")]
|
|
13
|
+
public class DisplayFTEData : MonoBehaviour, IDisplayFTEUITab
|
|
14
|
+
{
|
|
15
|
+
/// <summary>
|
|
16
|
+
///
|
|
17
|
+
/// </summary>
|
|
18
|
+
[Tooltip("")]
|
|
19
|
+
[SerializeField] protected bool hideOnStart = true;
|
|
20
|
+
|
|
21
|
+
/// <summary>
|
|
22
|
+
///
|
|
23
|
+
/// </summary>
|
|
24
|
+
[Tooltip("")]
|
|
25
|
+
[SerializeField] protected UIVisibilityComponent fteText = null;
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
protected virtual void Start() => StartCoroutine(LateStart());
|
|
29
|
+
|
|
30
|
+
/// <summary>
|
|
31
|
+
///
|
|
32
|
+
/// </summary>
|
|
33
|
+
protected virtual IEnumerator LateStart()
|
|
34
|
+
{
|
|
35
|
+
yield return null;
|
|
36
|
+
|
|
37
|
+
fteText.Invoke(!hideOnStart);
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
/// <inheritdoc/>
|
|
41
|
+
public virtual void DisplayFTETabData(int fteIndex) => fteText.Invoke(fteIndex > 0);
|
|
42
|
+
}
|
|
43
|
+
}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
//Author: Benjamin "Sweden" Jillson : Discord: sweden_gaming For Project Eden's Garden
|
|
2
|
+
using DREditor.UIHandling;
|
|
3
|
+
using System.Collections.Generic;
|
|
4
|
+
using UnityEngine;
|
|
5
|
+
|
|
6
|
+
namespace DREditor.FreeTimeReportCards
|
|
7
|
+
{
|
|
8
|
+
/// <summary>
|
|
9
|
+
///
|
|
10
|
+
/// </summary>
|
|
11
|
+
[ClassHeader(nameof(IUpdateFTEUITab) +
|
|
12
|
+
"\n\n")]
|
|
13
|
+
public class DisplayFTETabsOnSelectedCharacter : MonoBehaviour, IUpdateFTEUITab
|
|
14
|
+
{
|
|
15
|
+
/// <summary>
|
|
16
|
+
///
|
|
17
|
+
/// </summary>
|
|
18
|
+
[Tooltip("")]
|
|
19
|
+
[SerializeField] protected List<UIVisibilityComponent> fteTabs = new();
|
|
20
|
+
|
|
21
|
+
/// <summary>
|
|
22
|
+
///
|
|
23
|
+
/// </summary>
|
|
24
|
+
[Tooltip("")]
|
|
25
|
+
[SerializeField] protected bool invert = false;
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
/// <inheritdoc/>
|
|
29
|
+
public virtual void UpdateUnlockedFTETabs(int characterAffinity)
|
|
30
|
+
{
|
|
31
|
+
for (int i = 0; i < fteTabs.Count; i++)
|
|
32
|
+
{
|
|
33
|
+
bool lockState = invert ? i < characterAffinity : i >= characterAffinity;
|
|
34
|
+
|
|
35
|
+
if (i < fteTabs.Count && fteTabs[i] != null)
|
|
36
|
+
fteTabs[i].Invoke(lockState);
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
//Author: Benjamin "Sweden" Jillson : Discord: sweden_gaming For Project Eden's Garden
|
|
2
|
+
using DREditor.UIHandling;
|
|
3
|
+
using UnityEngine;
|
|
4
|
+
|
|
5
|
+
namespace DREditor.FreeTimeReportCards
|
|
6
|
+
{
|
|
7
|
+
/// <summary>
|
|
8
|
+
///
|
|
9
|
+
/// </summary>
|
|
10
|
+
[ClassHeader(nameof(IResetFTEUITab) +
|
|
11
|
+
"\n\n")]
|
|
12
|
+
public class DisplayFTEUITabsOnReset : MonoBehaviour, IResetFTEUITab
|
|
13
|
+
{
|
|
14
|
+
/// <summary>
|
|
15
|
+
///
|
|
16
|
+
/// </summary>
|
|
17
|
+
[Tooltip("")]
|
|
18
|
+
[SerializeField] protected UIVisibilityComponent fteUIPage;
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
/// <inheritdoc/>
|
|
22
|
+
public virtual void ResetComponent(bool currentCharacterIsFTECharacter) => fteUIPage.Invoke(currentCharacterIsFTECharacter);
|
|
23
|
+
}
|
|
24
|
+
}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
//Author: Benjamin "Sweden" Jillson : Discord: sweden_gaming For Project Eden's Garden
|
|
2
|
+
using DREditor.UIHandling;
|
|
3
|
+
using System.Collections.Generic;
|
|
4
|
+
using UnityEngine;
|
|
5
|
+
|
|
6
|
+
namespace DREditor.FreeTimeReportCards
|
|
7
|
+
{
|
|
8
|
+
/// <summary>
|
|
9
|
+
///
|
|
10
|
+
/// </summary>
|
|
11
|
+
[ClassHeader(nameof(IDisplayFTEUITab) +
|
|
12
|
+
"\n\n")]
|
|
13
|
+
public class DisplaySelectedFTETab : MonoBehaviour, IDisplayFTEUITab
|
|
14
|
+
{
|
|
15
|
+
/// <summary>
|
|
16
|
+
///
|
|
17
|
+
/// </summary>
|
|
18
|
+
[Tooltip("")]
|
|
19
|
+
[SerializeField] protected List<UIVisibilityComponent> fteSelectedTabs = new();
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
/// <inheritdoc/>
|
|
23
|
+
public virtual void DisplayFTETabData(int fteIndex)
|
|
24
|
+
{
|
|
25
|
+
foreach (var fte in fteSelectedTabs)
|
|
26
|
+
fte.Hide();
|
|
27
|
+
|
|
28
|
+
fteSelectedTabs[fteIndex].Show();
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
}
|
package/FTEReportCard.cs
ADDED
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
//Author: Benjamin "Sweden" Jillson : Discord: sweden_gaming For Project Eden's Garden
|
|
2
|
+
using DREditor.UI.ReportCards;
|
|
3
|
+
using System.Collections.Generic;
|
|
4
|
+
using System.Linq;
|
|
5
|
+
using UnityEngine;
|
|
6
|
+
|
|
7
|
+
namespace DREditor.FreeTimeReportCards
|
|
8
|
+
{
|
|
9
|
+
/// <summary>
|
|
10
|
+
///
|
|
11
|
+
/// </summary>
|
|
12
|
+
[ClassHeader(nameof(ReportCardControllableComponent) + ", " + nameof(FTEReportCardBase) +
|
|
13
|
+
"\n\n")]
|
|
14
|
+
public class FTEReportCard : FTEReportCardBase
|
|
15
|
+
{
|
|
16
|
+
/// <summary>
|
|
17
|
+
///
|
|
18
|
+
/// </summary>
|
|
19
|
+
protected IEnumerable<IUpdateFTEUITab> updateableTabs;
|
|
20
|
+
|
|
21
|
+
/// <summary>
|
|
22
|
+
///
|
|
23
|
+
/// </summary>
|
|
24
|
+
protected IEnumerable<IDisplayFTEUITab> displayableTabs;
|
|
25
|
+
|
|
26
|
+
/// <summary>
|
|
27
|
+
///
|
|
28
|
+
/// </summary>
|
|
29
|
+
protected IEnumerable<IResetFTEUITab> resetableTabs;
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
/// <inheritdoc/>
|
|
33
|
+
protected override void Start()
|
|
34
|
+
{
|
|
35
|
+
base.Start();
|
|
36
|
+
|
|
37
|
+
var allComponents = GetComponentsInChildren<Component>();
|
|
38
|
+
|
|
39
|
+
updateableTabs = allComponents.OfType<IUpdateFTEUITab>();
|
|
40
|
+
|
|
41
|
+
displayableTabs = allComponents.OfType<IDisplayFTEUITab>();
|
|
42
|
+
|
|
43
|
+
resetableTabs = allComponents.OfType<IResetFTEUITab>();
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
|
|
47
|
+
/// <inheritdoc/>
|
|
48
|
+
protected override void UpdateUnlockedFTETabs()
|
|
49
|
+
{
|
|
50
|
+
base.UpdateUnlockedFTETabs();
|
|
51
|
+
|
|
52
|
+
foreach (var tab in updateableTabs)
|
|
53
|
+
tab?.UpdateUnlockedFTETabs(GetCharacterAffinity());
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
/// <inheritdoc/>
|
|
57
|
+
protected override void DisplayFTETabData()
|
|
58
|
+
{
|
|
59
|
+
base.DisplayFTETabData();
|
|
60
|
+
|
|
61
|
+
foreach (var tab in displayableTabs)
|
|
62
|
+
tab?.DisplayFTETabData(fteIndex);
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
/// <inheritdoc/>
|
|
66
|
+
public override void ResetComponent()
|
|
67
|
+
{
|
|
68
|
+
base.ResetComponent();
|
|
69
|
+
|
|
70
|
+
foreach (var tab in resetableTabs)
|
|
71
|
+
tab?.ResetComponent(!character.NotFTECharacter);
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
}
|
|
@@ -0,0 +1,172 @@
|
|
|
1
|
+
//Author: Benjamin "Sweden" Jillson : Discord: sweden_gaming For Project Eden's Garden
|
|
2
|
+
using DREditor.FreeTime;
|
|
3
|
+
using DREditor.UI.ReportCards;
|
|
4
|
+
using System.Linq;
|
|
5
|
+
using TMPro;
|
|
6
|
+
using UnityEngine;
|
|
7
|
+
using UnityEngine.Events;
|
|
8
|
+
using UnityEngine.InputSystem;
|
|
9
|
+
using static UnityEngine.InputSystem.InputAction;
|
|
10
|
+
|
|
11
|
+
namespace DREditor.FreeTimeReportCards
|
|
12
|
+
{
|
|
13
|
+
/// <summary>
|
|
14
|
+
///
|
|
15
|
+
/// </summary>
|
|
16
|
+
[ClassHeader(nameof(ReportCardControllableComponent) +
|
|
17
|
+
"\n\n")]
|
|
18
|
+
public abstract class FTEReportCardBase : ReportCardControllableComponent
|
|
19
|
+
{
|
|
20
|
+
/// <summary>
|
|
21
|
+
///
|
|
22
|
+
/// </summary>
|
|
23
|
+
[Tooltip("")]
|
|
24
|
+
[SerializeField] protected InputActionReference navigate = null;
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
/// <summary>
|
|
28
|
+
///
|
|
29
|
+
/// </summary>
|
|
30
|
+
[Header("")]
|
|
31
|
+
[Divider]
|
|
32
|
+
[Tooltip("")]
|
|
33
|
+
[SerializeField] protected TextMeshProUGUI textFTE;
|
|
34
|
+
|
|
35
|
+
|
|
36
|
+
/// <summary>
|
|
37
|
+
///
|
|
38
|
+
/// </summary>
|
|
39
|
+
[Header("")]
|
|
40
|
+
[Divider]
|
|
41
|
+
[Tooltip("")]
|
|
42
|
+
[SerializeField] protected bool useHorizontalInput = false;
|
|
43
|
+
|
|
44
|
+
/// <summary>
|
|
45
|
+
///
|
|
46
|
+
/// </summary>
|
|
47
|
+
[Tooltip("")]
|
|
48
|
+
[SerializeField] protected int maxEventsPerCharacter = 5;
|
|
49
|
+
|
|
50
|
+
|
|
51
|
+
[Header("")]
|
|
52
|
+
[Divider]
|
|
53
|
+
[Header("")]
|
|
54
|
+
[SerializeField] protected UnityEvent<int> OnFTETabsUpdated = null;
|
|
55
|
+
|
|
56
|
+
|
|
57
|
+
[Header("")]
|
|
58
|
+
[SerializeField] protected UnityEvent<int> OnFTEIndexUpdated = null;
|
|
59
|
+
|
|
60
|
+
|
|
61
|
+
/// <summary>
|
|
62
|
+
///
|
|
63
|
+
/// </summary>
|
|
64
|
+
protected IFTEDataHandler fteData = null;
|
|
65
|
+
|
|
66
|
+
/// <summary>
|
|
67
|
+
///
|
|
68
|
+
/// </summary>
|
|
69
|
+
protected int fteIndex = 0;
|
|
70
|
+
|
|
71
|
+
|
|
72
|
+
|
|
73
|
+
|
|
74
|
+
/// <summary>
|
|
75
|
+
///
|
|
76
|
+
/// </summary>
|
|
77
|
+
protected virtual void Start()
|
|
78
|
+
{
|
|
79
|
+
fteData = FindObjectsByType<MonoBehaviour>().OfType<IFTEDataHandler>().FirstOrDefault();
|
|
80
|
+
|
|
81
|
+
if (fteData == null)
|
|
82
|
+
UnityEngine.Debug.LogWarning(nameof(FTEReportCardBase) + ": " +
|
|
83
|
+
"ALERT: The FTE data handler must be available for this script to operate." +
|
|
84
|
+
"\nPROPOSAL: Ensure that an object that inherits the type: " + nameof(IFTEDataHandler) + " is in the scene.");
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
|
|
88
|
+
/// <inheritdoc/>
|
|
89
|
+
public override void SetCardIndex(int cardIndex)
|
|
90
|
+
{
|
|
91
|
+
base.SetCardIndex(cardIndex);
|
|
92
|
+
|
|
93
|
+
UpdateUnlockedFTETabs();
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
/// <summary>
|
|
97
|
+
///
|
|
98
|
+
/// </summary>
|
|
99
|
+
protected virtual void UpdateUnlockedFTETabs() => OnFTETabsUpdated?.Invoke(GetCharacterAffinity());
|
|
100
|
+
|
|
101
|
+
|
|
102
|
+
/// <summary>
|
|
103
|
+
///
|
|
104
|
+
/// </summary>
|
|
105
|
+
/// <param name="context"></param>
|
|
106
|
+
protected virtual void ChangeFTE(CallbackContext context)
|
|
107
|
+
{
|
|
108
|
+
int inputAxis = useHorizontalInput ? (int)context.ReadValue<Vector2>().x : (int)context.ReadValue<Vector2>().y;
|
|
109
|
+
|
|
110
|
+
if (!context.performed || inputAxis == 0)
|
|
111
|
+
return;
|
|
112
|
+
|
|
113
|
+
// direction for the fte to move. -1 = up, 1 = down.
|
|
114
|
+
int dir = inputAxis * -1;
|
|
115
|
+
|
|
116
|
+
if (fteIndex + dir >= 0 &&
|
|
117
|
+
fteIndex + dir < maxEventsPerCharacter + 1 &&
|
|
118
|
+
ChangeFTE(fteIndex + dir))
|
|
119
|
+
OnUINavigated();
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
/// <summary>
|
|
123
|
+
///
|
|
124
|
+
/// </summary>
|
|
125
|
+
/// <param name="index"></param>
|
|
126
|
+
/// <returns></returns>
|
|
127
|
+
protected virtual bool ChangeFTE(int index)
|
|
128
|
+
{
|
|
129
|
+
bool affinityValid = index >= 0 && index <= GetCharacterAffinity();
|
|
130
|
+
|
|
131
|
+
bool result = !character.NotFTECharacter && affinityValid;
|
|
132
|
+
|
|
133
|
+
if (result)
|
|
134
|
+
{
|
|
135
|
+
fteIndex = index;
|
|
136
|
+
|
|
137
|
+
DisplayFTETabData();
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
return result;
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
/// <summary>
|
|
144
|
+
///
|
|
145
|
+
/// </summary>
|
|
146
|
+
protected virtual void DisplayFTETabData()
|
|
147
|
+
{
|
|
148
|
+
OnFTEIndexUpdated?.Invoke(fteIndex);
|
|
149
|
+
|
|
150
|
+
if (fteIndex > 0 && character.Has(out SimpleFTEEntryCollection collection))
|
|
151
|
+
textFTE.text = collection[fteIndex - 1];
|
|
152
|
+
}
|
|
153
|
+
|
|
154
|
+
|
|
155
|
+
/// <summary>
|
|
156
|
+
///
|
|
157
|
+
/// </summary>
|
|
158
|
+
/// <returns></returns>
|
|
159
|
+
protected virtual int GetCharacterAffinity()
|
|
160
|
+
=> fteData == null || character.NotFTECharacter ? 0 : fteData.GetAffinity(character.FirstName);
|
|
161
|
+
|
|
162
|
+
|
|
163
|
+
/// <inheritdoc/>
|
|
164
|
+
public override void ActivateControls() => navigate.action.performed += ChangeFTE;
|
|
165
|
+
|
|
166
|
+
/// <inheritdoc/>
|
|
167
|
+
public override void DeactivateControls() => navigate.action.performed -= ChangeFTE;
|
|
168
|
+
|
|
169
|
+
/// <inheritdoc/>
|
|
170
|
+
public override void ResetComponent() => ChangeFTE(0);
|
|
171
|
+
}
|
|
172
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
//Author: Benjamin "Sweden" Jillson : Discord: sweden_gaming For Project Eden's Garden
|
|
2
|
+
namespace DREditor.FreeTimeReportCards
|
|
3
|
+
{
|
|
4
|
+
/// <summary>
|
|
5
|
+
///
|
|
6
|
+
/// </summary>
|
|
7
|
+
public interface IDisplayFTEUITab
|
|
8
|
+
{
|
|
9
|
+
/// <summary>
|
|
10
|
+
///
|
|
11
|
+
/// </summary>
|
|
12
|
+
void DisplayFTETabData(int fteIndex);
|
|
13
|
+
}
|
|
14
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
//Author: Benjamin "Sweden" Jillson : Discord: sweden_gaming For Project Eden's Garden
|
|
2
|
+
namespace DREditor.FreeTimeReportCards
|
|
3
|
+
{
|
|
4
|
+
/// <summary>
|
|
5
|
+
///
|
|
6
|
+
/// </summary>
|
|
7
|
+
public interface IResetFTEUITab
|
|
8
|
+
{
|
|
9
|
+
/// <summary>
|
|
10
|
+
///
|
|
11
|
+
/// </summary>
|
|
12
|
+
/// <param name="currentCharacterIsFTECharacter"></param>
|
|
13
|
+
void ResetComponent(bool currentCharacterIsFTECharacter);
|
|
14
|
+
}
|
|
15
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
//Author: Benjamin "Sweden" Jillson : Discord: sweden_gaming For Project Eden's Garden
|
|
2
|
+
namespace DREditor.FreeTimeReportCards
|
|
3
|
+
{
|
|
4
|
+
/// <summary>
|
|
5
|
+
///
|
|
6
|
+
/// </summary>
|
|
7
|
+
public interface IUpdateFTEUITab
|
|
8
|
+
{
|
|
9
|
+
/// <summary>
|
|
10
|
+
///
|
|
11
|
+
/// </summary>
|
|
12
|
+
void UpdateUnlockedFTETabs(int characterAffinity);
|
|
13
|
+
}
|
|
14
|
+
}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
//Author: Benjamin "Sweden" Jillson : Discord: sweden_gaming For Project Eden's Garden
|
|
2
|
+
using DREditor.UIHandling;
|
|
3
|
+
using UnityEngine;
|
|
4
|
+
|
|
5
|
+
namespace DREditor.FreeTimeReportCards
|
|
6
|
+
{
|
|
7
|
+
/// <summary>
|
|
8
|
+
///
|
|
9
|
+
/// </summary>
|
|
10
|
+
[ClassHeader(nameof(IResetFTEUITab) + ", " + nameof(IDisplayFTEUITab) +
|
|
11
|
+
"\n\n")]
|
|
12
|
+
public class ReportCardUIMainTab : MonoBehaviour, IResetFTEUITab, IDisplayFTEUITab
|
|
13
|
+
{
|
|
14
|
+
/// <summary>
|
|
15
|
+
///
|
|
16
|
+
/// </summary>
|
|
17
|
+
[Tooltip("")]
|
|
18
|
+
[SerializeField] protected UIVisibilityComponent reportCardUIPage;
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
/// <inheritdoc/>
|
|
22
|
+
public virtual void DisplayFTETabData(int fteIndex) => reportCardUIPage.Invoke(fteIndex <= 0);
|
|
23
|
+
|
|
24
|
+
/// <inheritdoc/>
|
|
25
|
+
public virtual void ResetComponent(bool currentCharacterIsFTECharacter) => reportCardUIPage.Show();
|
|
26
|
+
}
|
|
27
|
+
}
|