net.dreditor.eventobjectservices 0.1.3 → 0.1.6
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/BoolWithEventOnTitleScreen.cs +10 -0
- package/BoolWithEventOnTitleScreen.cs.meta +11 -0
- package/DREditor.EventObjectServices.asmdef +17 -0
- package/DREditor.EventObjectServices.asmdef.meta +7 -0
- package/EvaluateCamerasStates.cs +103 -0
- package/EvaluateCamerasStates.cs.meta +11 -0
- package/FloatWithEventListener.cs +10 -0
- package/FloatWithEventListener.cs.meta +11 -0
- package/FloatWithEventOnTitleScreen.cs +10 -0
- package/FloatWithEventOnTitleScreen.cs.meta +11 -0
- package/IntWithEventIndexListener.cs +25 -0
- package/IntWithEventIndexListener.cs.meta +11 -0
- package/IntWithEventListener.cs +10 -0
- package/IntWithEventListener.cs.meta +11 -0
- package/IntWithEventOnTitleScreen.cs +10 -0
- package/IntWithEventOnTitleScreen.cs.meta +11 -0
- package/InverseObjectStateBoolWithEvent.cs +50 -0
- package/InverseObjectStateBoolWithEvent.cs.meta +11 -0
- package/ObjectActiveOnChapterIndex.cs +84 -0
- package/ObjectActiveOnChapterIndex.cs.meta +11 -0
- package/ObjectNameDisplayer.cs +47 -0
- package/ObjectNameDisplayer.cs.meta +11 -0
- package/OptionWithEventListener.cs +57 -0
- package/OptionWithEventListener.cs.meta +11 -0
- package/ResetCharacterControllerOnEvent.cs +47 -0
- package/ResetCharacterControllerOnEvent.cs.meta +11 -0
- package/Samples/Float_With_Event_On_Title_Screen.prefab +48 -0
- package/{package.json.meta → Samples/Float_With_Event_On_Title_Screen.prefab.meta} +7 -7
- package/Samples/Int_With_Event_On_Title_Screen.prefab +48 -0
- package/Samples/Int_With_Event_On_Title_Screen.prefab.meta +7 -0
- package/Samples/Reset_Player.prefab +118 -0
- package/Samples/Reset_Player.prefab.meta +7 -0
- package/Samples/Selectable_Object_Manager.prefab +49 -0
- package/Samples/Selectable_Object_Manager.prefab.meta +7 -0
- package/Samples.meta +8 -0
- package/SceneEventOnStart.cs +27 -0
- package/SceneEventOnStart.cs.meta +11 -0
- package/SelectStringWithEvent.cs +44 -0
- package/SelectStringWithEvent.cs.meta +11 -0
- package/SelectableObjectManager.cs +45 -0
- package/SelectableObjectManager.cs.meta +11 -0
- package/SpriteOnIntEvent.cs +68 -0
- package/SpriteOnIntEvent.cs.meta +11 -0
- package/StringWithEventListener.cs +10 -0
- package/StringWithEventListener.cs.meta +11 -0
- package/TextWithEventListener.cs +46 -0
- package/TextWithEventListener.cs.meta +11 -0
- package/ValueWithEventListener.cs +60 -0
- package/ValueWithEventListener.cs.meta +11 -0
- package/ValueWithEventOnTitleScreen.cs +37 -0
- package/ValueWithEventOnTitleScreen.cs.meta +11 -0
- package/package.json +36 -29
- package/.attestation.p7m +0 -0
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
//Author: Benjamin "Sweden" Jillson : Discord: sweden_gaming For Project Eden's Garden
|
|
2
|
+
using DREditor.EventObjects;
|
|
3
|
+
using UnityEngine;
|
|
4
|
+
using UnityEngine.Events;
|
|
5
|
+
|
|
6
|
+
namespace DREditor.EventObjectServices
|
|
7
|
+
{
|
|
8
|
+
/// <summary>
|
|
9
|
+
///
|
|
10
|
+
/// </summary>
|
|
11
|
+
/// <typeparam name="T"></typeparam>
|
|
12
|
+
/// <typeparam name="TX"></typeparam>
|
|
13
|
+
/// <typeparam name="TY"></typeparam>
|
|
14
|
+
public abstract class ValueWithEventListener<T, TX, TY> : MonoBehaviour
|
|
15
|
+
where T : ValueWithEvent<TX, TY>
|
|
16
|
+
where TY : UnityEvent<TX>, new()
|
|
17
|
+
{
|
|
18
|
+
/// <summary>
|
|
19
|
+
///
|
|
20
|
+
/// </summary>
|
|
21
|
+
[Header("")]
|
|
22
|
+
[Divider]
|
|
23
|
+
[Tooltip("")]
|
|
24
|
+
[SerializeField] protected T valueWithEvent = null;
|
|
25
|
+
|
|
26
|
+
[Space]
|
|
27
|
+
|
|
28
|
+
[Header("")]
|
|
29
|
+
[SerializeField] protected TY OnValueChangedEvent;
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
/// <summary>
|
|
33
|
+
///
|
|
34
|
+
/// </summary>
|
|
35
|
+
protected TX UpdatedValue { get; private set; }
|
|
36
|
+
|
|
37
|
+
|
|
38
|
+
/// <summary>
|
|
39
|
+
///
|
|
40
|
+
/// </summary>
|
|
41
|
+
protected virtual void OnEnable() => valueWithEvent?.AddListener(OnValueChanged);
|
|
42
|
+
|
|
43
|
+
/// <summary>
|
|
44
|
+
///
|
|
45
|
+
/// </summary>
|
|
46
|
+
protected virtual void OnDisable() => valueWithEvent?.RemoveListener(OnValueChanged);
|
|
47
|
+
|
|
48
|
+
|
|
49
|
+
/// <summary>
|
|
50
|
+
///
|
|
51
|
+
/// </summary>
|
|
52
|
+
/// <param name="updatedValue"></param>
|
|
53
|
+
protected virtual void OnValueChanged(TX updatedValue)
|
|
54
|
+
{
|
|
55
|
+
UpdatedValue = updatedValue;
|
|
56
|
+
|
|
57
|
+
OnValueChangedEvent?.Invoke(updatedValue);
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
}
|
|
@@ -0,0 +1,37 @@
|
|
|
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
|
+
using UnityEngine.Events;
|
|
6
|
+
|
|
7
|
+
namespace DREditor.EventObjectServices
|
|
8
|
+
{
|
|
9
|
+
/// <summary>
|
|
10
|
+
///
|
|
11
|
+
/// </summary>
|
|
12
|
+
/// <typeparam name="T"></typeparam>
|
|
13
|
+
/// <typeparam name="TY"></typeparam>
|
|
14
|
+
public class ValueWithEventOnTitleScreen<T, TY> : MonoBehaviour, IToTitleScreen where TY : UnityEvent<T>, new()
|
|
15
|
+
{
|
|
16
|
+
/// <summary>
|
|
17
|
+
///
|
|
18
|
+
/// </summary>
|
|
19
|
+
[Header("")]
|
|
20
|
+
|
|
21
|
+
[Tooltip("")]
|
|
22
|
+
[SerializeField] protected ValueWithEvent<T, TY> valueWithEvent = null;
|
|
23
|
+
|
|
24
|
+
/// <summary>
|
|
25
|
+
///
|
|
26
|
+
/// </summary>
|
|
27
|
+
[Tooltip("")]
|
|
28
|
+
[SerializeField] protected T valueOnTitleScreen;
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
public virtual void ToTitleScreen()
|
|
32
|
+
{
|
|
33
|
+
if (valueWithEvent != null)
|
|
34
|
+
valueWithEvent.SetValue(valueOnTitleScreen);
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
}
|
package/package.json
CHANGED
|
@@ -1,29 +1,36 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "net.dreditor.eventobjectservices",
|
|
3
|
-
"displayName": "DREditor Event Object Services",
|
|
4
|
-
"version": "0.1.
|
|
5
|
-
"unity": "6000.4",
|
|
6
|
-
"publishConfig": {
|
|
7
|
-
"access": "public"
|
|
8
|
-
},
|
|
9
|
-
"description": "The beta for DREditor. A tool to create death game style projects without having to code.",
|
|
10
|
-
"author": {
|
|
11
|
-
"name": "Benjamin \"Sweden\" Jillson",
|
|
12
|
-
"
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
"com.unity.
|
|
17
|
-
"
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
"
|
|
22
|
-
"
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
1
|
+
{
|
|
2
|
+
"name": "net.dreditor.eventobjectservices",
|
|
3
|
+
"displayName": "DREditor Event Object Services",
|
|
4
|
+
"version": "0.1.6",
|
|
5
|
+
"unity": "6000.4",
|
|
6
|
+
"publishConfig": {
|
|
7
|
+
"access": "public"
|
|
8
|
+
},
|
|
9
|
+
"description": "The beta for DREditor. A tool to create death game style projects without having to code.",
|
|
10
|
+
"author": {
|
|
11
|
+
"name": "Benjamin \"Sweden\" Jillson",
|
|
12
|
+
"email": "dreditortool@gmail.com",
|
|
13
|
+
"url": "https://dreditor.net"
|
|
14
|
+
},
|
|
15
|
+
"dependencies": {
|
|
16
|
+
"com.unity.nuget.newtonsoft-json": "3.2.2",
|
|
17
|
+
"com.unity.cinemachine": "2.10.7",
|
|
18
|
+
"net.dreditor.core": "0.1.6"
|
|
19
|
+
},
|
|
20
|
+
"keywords": [
|
|
21
|
+
"editor",
|
|
22
|
+
"tool",
|
|
23
|
+
"dreditor"
|
|
24
|
+
],
|
|
25
|
+
"samples": [
|
|
26
|
+
{
|
|
27
|
+
"displayName": "Samples",
|
|
28
|
+
"description": "",
|
|
29
|
+
"path": "Samples~"
|
|
30
|
+
}
|
|
31
|
+
],
|
|
32
|
+
"documentationUrl": "https://dreditor.net",
|
|
33
|
+
"license": "Apache-2.0",
|
|
34
|
+
"licensesUrl": "https://dreditor.net/docs/LICENSE.html",
|
|
35
|
+
"changelogUrl": "https://dreditor.net/docs/CHANGELOG.html"
|
|
36
|
+
}
|
package/.attestation.p7m
DELETED
|
Binary file
|