fr.jeanf.eventsystem 0.1.91 → 0.1.93
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/Runtime/Listeners/Advanced/DecimalBoolEventListener.cs +49 -0
- package/Runtime/Listeners/Advanced/DecimalBoolEventListener.cs.meta +11 -0
- package/Runtime/Listeners/Advanced/DecimalDecimalEventListener.cs +49 -0
- package/Runtime/Listeners/Advanced/DecimalDecimalEventListener.cs.meta +11 -0
- package/Runtime/Listeners/Advanced/DecimalFloatEventListener.cs +49 -0
- package/Runtime/Listeners/Advanced/DecimalFloatEventListener.cs.meta +11 -0
- package/Runtime/Listeners/Advanced/DecimalGameObjectEventListener.cs +49 -0
- package/Runtime/Listeners/Advanced/DecimalGameObjectEventListener.cs.meta +11 -0
- package/Runtime/Listeners/Advanced/DecimalIntEventListener.cs +49 -0
- package/Runtime/Listeners/Advanced/DecimalIntEventListener.cs.meta +11 -0
- package/Runtime/Listeners/Advanced/DecimalStringEventListener.cs +49 -0
- package/Runtime/Listeners/Advanced/DecimalStringEventListener.cs.meta +11 -0
- package/Runtime/Listeners/Advanced.meta +8 -0
- package/Runtime/ScriptableObjects/Advanced/DecimalBoolEventChannelSO.cs +17 -0
- package/Runtime/ScriptableObjects/Advanced/DecimalBoolEventChannelSO.cs.meta +11 -0
- package/Runtime/ScriptableObjects/Advanced/DecimalDecimalEventChannelSO.cs +17 -0
- package/Runtime/ScriptableObjects/Advanced/DecimalDecimalEventChannelSO.cs.meta +11 -0
- package/Runtime/ScriptableObjects/Advanced/DecimalFloatEventChannelSO.cs +17 -0
- package/Runtime/ScriptableObjects/Advanced/DecimalFloatEventChannelSO.cs.meta +11 -0
- package/Runtime/ScriptableObjects/Advanced/DecimalGameObjectEventChannelSO.cs +17 -0
- package/Runtime/ScriptableObjects/Advanced/DecimalGameObjectEventChannelSO.cs.meta +11 -0
- package/Runtime/ScriptableObjects/Advanced/DecimalIntEventChannelSO.cs +17 -0
- package/Runtime/ScriptableObjects/Advanced/DecimalIntEventChannelSO.cs.meta +11 -0
- package/Runtime/ScriptableObjects/Advanced/DecimalStringEventChannelSO.cs +17 -0
- package/Runtime/ScriptableObjects/Advanced/DecimalStringEventChannelSO.cs.meta +11 -0
- package/Runtime/SenderInterfaces/Advanced/DecimalBoolEventSender.cs +22 -0
- package/Runtime/SenderInterfaces/Advanced/DecimalBoolEventSender.cs.meta +11 -0
- package/Runtime/SenderInterfaces/Advanced/DecimalDecimalEventSender.cs +22 -0
- package/Runtime/SenderInterfaces/Advanced/DecimalDecimalEventSender.cs.meta +11 -0
- package/Runtime/SenderInterfaces/Advanced/DecimalFloatEventSender.cs +23 -0
- package/Runtime/SenderInterfaces/Advanced/DecimalFloatEventSender.cs.meta +11 -0
- package/Runtime/SenderInterfaces/Advanced/DecimalGameObjectEventSender.cs +21 -0
- package/Runtime/SenderInterfaces/Advanced/DecimalGameObjectEventSender.cs.meta +11 -0
- package/Runtime/SenderInterfaces/Advanced/DecimalIntEventSender.cs +22 -0
- package/Runtime/SenderInterfaces/Advanced/DecimalIntEventSender.cs.meta +11 -0
- package/Runtime/SenderInterfaces/Advanced/DecimalStringEventSender.cs +22 -0
- package/Runtime/SenderInterfaces/Advanced/DecimalStringEventSender.cs.meta +11 -0
- package/Runtime/SenderInterfaces/Advanced.meta +8 -0
- package/package.json +1 -1
- /package/Runtime/Listeners/{IntBoolEventListener.cs → Advanced/IntBoolEventListener.cs} +0 -0
- /package/Runtime/Listeners/{IntBoolEventListener.cs.meta → Advanced/IntBoolEventListener.cs.meta} +0 -0
- /package/Runtime/Listeners/{IntFloatEventListener.cs → Advanced/IntFloatEventListener.cs} +0 -0
- /package/Runtime/Listeners/{IntFloatEventListener.cs.meta → Advanced/IntFloatEventListener.cs.meta} +0 -0
- /package/Runtime/Listeners/{IntGameObjectEventListener.cs → Advanced/IntGameObjectEventListener.cs} +0 -0
- /package/Runtime/Listeners/{IntGameObjectEventListener.cs.meta → Advanced/IntGameObjectEventListener.cs.meta} +0 -0
- /package/Runtime/Listeners/{IntIntEventListener.cs → Advanced/IntIntEventListener.cs} +0 -0
- /package/Runtime/Listeners/{IntIntEventListener.cs.meta → Advanced/IntIntEventListener.cs.meta} +0 -0
- /package/Runtime/Listeners/{IntStringEventListener.cs → Advanced/IntStringEventListener.cs} +0 -0
- /package/Runtime/Listeners/{IntStringEventListener.cs.meta → Advanced/IntStringEventListener.cs.meta} +0 -0
- /package/Runtime/Listeners/{StringBoolEventListener.cs → Advanced/StringBoolEventListener.cs} +0 -0
- /package/Runtime/Listeners/{StringBoolEventListener.cs.meta → Advanced/StringBoolEventListener.cs.meta} +0 -0
- /package/Runtime/Listeners/{StringFloatEventListener.cs → Advanced/StringFloatEventListener.cs} +0 -0
- /package/Runtime/Listeners/{StringFloatEventListener.cs.meta → Advanced/StringFloatEventListener.cs.meta} +0 -0
- /package/Runtime/Listeners/{StringStringEventListener.cs → Advanced/StringStringEventListener.cs} +0 -0
- /package/Runtime/Listeners/{StringStringEventListener.cs.meta → Advanced/StringStringEventListener.cs.meta} +0 -0
- /package/Runtime/SenderInterfaces/{IntBoolEventSender.cs → Advanced/IntBoolEventSender.cs} +0 -0
- /package/Runtime/SenderInterfaces/{IntBoolEventSender.cs.meta → Advanced/IntBoolEventSender.cs.meta} +0 -0
- /package/Runtime/SenderInterfaces/{IntFloatEventSender.cs → Advanced/IntFloatEventSender.cs} +0 -0
- /package/Runtime/SenderInterfaces/{IntFloatEventSender.cs.meta → Advanced/IntFloatEventSender.cs.meta} +0 -0
- /package/Runtime/SenderInterfaces/{IntGameObjectEventSender.cs → Advanced/IntGameObjectEventSender.cs} +0 -0
- /package/Runtime/SenderInterfaces/{IntGameObjectEventSender.cs.meta → Advanced/IntGameObjectEventSender.cs.meta} +0 -0
- /package/Runtime/SenderInterfaces/{IntIntEventSender.cs → Advanced/IntIntEventSender.cs} +0 -0
- /package/Runtime/SenderInterfaces/{IntIntEventSender.cs.meta → Advanced/IntIntEventSender.cs.meta} +0 -0
- /package/Runtime/SenderInterfaces/{IntStringEventSender.cs → Advanced/IntStringEventSender.cs} +0 -0
- /package/Runtime/SenderInterfaces/{IntStringEventSender.cs.meta → Advanced/IntStringEventSender.cs.meta} +0 -0
- /package/Runtime/SenderInterfaces/{StringBoolEventSender.cs → Advanced/StringBoolEventSender.cs} +0 -0
- /package/Runtime/SenderInterfaces/{StringBoolEventSender.cs.meta → Advanced/StringBoolEventSender.cs.meta} +0 -0
- /package/Runtime/SenderInterfaces/{StringFloatEventSender.cs → Advanced/StringFloatEventSender.cs} +0 -0
- /package/Runtime/SenderInterfaces/{StringFloatEventSender.cs.meta → Advanced/StringFloatEventSender.cs.meta} +0 -0
- /package/Runtime/SenderInterfaces/{StringStringEventSender.cs → Advanced/StringStringEventSender.cs} +0 -0
- /package/Runtime/SenderInterfaces/{StringStringEventSender.cs.meta → Advanced/StringStringEventSender.cs.meta} +0 -0
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
using UnityEngine;
|
|
2
|
+
using UnityEngine.Events;
|
|
3
|
+
|
|
4
|
+
/// <summary>
|
|
5
|
+
/// To use a generic UnityEvent type you must override the generic type.
|
|
6
|
+
/// </summary>
|
|
7
|
+
namespace jeanf.EventSystem
|
|
8
|
+
{
|
|
9
|
+
[System.Serializable]
|
|
10
|
+
public class DecimalBoolEvent : UnityEvent<decimal, bool>
|
|
11
|
+
{
|
|
12
|
+
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
/// <summary>
|
|
16
|
+
/// A flexible handler for int events in the form of a MonoBehaviour. Responses can be connected directly from the Unity Inspector.
|
|
17
|
+
/// </summary>
|
|
18
|
+
public class DecimalBoolEventListener : MonoBehaviour, IDebugBehaviour
|
|
19
|
+
{
|
|
20
|
+
public bool isDebug
|
|
21
|
+
{
|
|
22
|
+
get => _isDebug;
|
|
23
|
+
set => _isDebug = value;
|
|
24
|
+
}
|
|
25
|
+
[SerializeField] private bool _isDebug = false;
|
|
26
|
+
|
|
27
|
+
[SerializeField] private DecimalBoolEventChannelSO _channel = default;
|
|
28
|
+
|
|
29
|
+
public DecimalBoolEvent OnEventRaised;
|
|
30
|
+
|
|
31
|
+
private void OnEnable()
|
|
32
|
+
{
|
|
33
|
+
if (_channel != null)
|
|
34
|
+
_channel.OnEventRaised += Respond;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
private void OnDisable()
|
|
38
|
+
{
|
|
39
|
+
if (_channel != null)
|
|
40
|
+
_channel.OnEventRaised -= Respond;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
private void Respond(decimal nb, bool value)
|
|
44
|
+
{
|
|
45
|
+
OnEventRaised?.Invoke(nb, value);
|
|
46
|
+
if(isDebug) Debug.Log($" decimal-bool event raised: <{nb},{value}>");
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
}
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
using UnityEngine;
|
|
2
|
+
using UnityEngine.Events;
|
|
3
|
+
|
|
4
|
+
/// <summary>
|
|
5
|
+
/// To use a generic UnityEvent type you must override the generic type.
|
|
6
|
+
/// </summary>
|
|
7
|
+
namespace jeanf.EventSystem
|
|
8
|
+
{
|
|
9
|
+
[System.Serializable]
|
|
10
|
+
public class DecimalDecimalEvent : UnityEvent<decimal, decimal>
|
|
11
|
+
{
|
|
12
|
+
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
/// <summary>
|
|
16
|
+
/// A flexible handler for int events in the form of a MonoBehaviour. Responses can be connected directly from the Unity Inspector.
|
|
17
|
+
/// </summary>
|
|
18
|
+
public class DecimalDecimalEventListener : MonoBehaviour, IDebugBehaviour
|
|
19
|
+
{
|
|
20
|
+
public bool isDebug
|
|
21
|
+
{
|
|
22
|
+
get => _isDebug;
|
|
23
|
+
set => _isDebug = value;
|
|
24
|
+
}
|
|
25
|
+
[SerializeField] private bool _isDebug = false;
|
|
26
|
+
|
|
27
|
+
[SerializeField] private DecimalDecimalEventChannelSO _channel = default;
|
|
28
|
+
|
|
29
|
+
public DecimalDecimalEvent OnEventRaised;
|
|
30
|
+
|
|
31
|
+
private void OnEnable()
|
|
32
|
+
{
|
|
33
|
+
if (_channel != null)
|
|
34
|
+
_channel.OnEventRaised += Respond;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
private void OnDisable()
|
|
38
|
+
{
|
|
39
|
+
if (_channel != null)
|
|
40
|
+
_channel.OnEventRaised -= Respond;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
private void Respond(decimal nb, decimal value)
|
|
44
|
+
{
|
|
45
|
+
OnEventRaised?.Invoke(nb, value);
|
|
46
|
+
if(isDebug) Debug.Log($" int-bool event raised: <{nb},{value}>");
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
}
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
using UnityEngine;
|
|
2
|
+
using UnityEngine.Events;
|
|
3
|
+
|
|
4
|
+
/// <summary>
|
|
5
|
+
/// To use a generic UnityEvent type you must override the generic type.
|
|
6
|
+
/// </summary>
|
|
7
|
+
namespace jeanf.EventSystem
|
|
8
|
+
{
|
|
9
|
+
[System.Serializable]
|
|
10
|
+
public class DecimalFloatEvent : UnityEvent<decimal, float>
|
|
11
|
+
{
|
|
12
|
+
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
/// <summary>
|
|
16
|
+
/// A flexible handler for int events in the form of a MonoBehaviour. Responses can be connected directly from the Unity Inspector.
|
|
17
|
+
/// </summary>
|
|
18
|
+
public class DecimalFloatEventListener : MonoBehaviour, IDebugBehaviour
|
|
19
|
+
{
|
|
20
|
+
public bool isDebug
|
|
21
|
+
{
|
|
22
|
+
get => _isDebug;
|
|
23
|
+
set => _isDebug = value;
|
|
24
|
+
}
|
|
25
|
+
[SerializeField] private bool _isDebug = false;
|
|
26
|
+
|
|
27
|
+
[SerializeField] private DecimalFloatEventChannelSO _channel = default;
|
|
28
|
+
|
|
29
|
+
public DecimalFloatEvent OnEventRaised;
|
|
30
|
+
|
|
31
|
+
private void OnEnable()
|
|
32
|
+
{
|
|
33
|
+
if (_channel != null)
|
|
34
|
+
_channel.OnEventRaised += Respond;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
private void OnDisable()
|
|
38
|
+
{
|
|
39
|
+
if (_channel != null)
|
|
40
|
+
_channel.OnEventRaised -= Respond;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
private void Respond(decimal nb, float value)
|
|
44
|
+
{
|
|
45
|
+
OnEventRaised?.Invoke(nb, value);
|
|
46
|
+
if(isDebug) Debug.Log($" decimal-float event raised: <{nb},{value}>");
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
}
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
using UnityEngine;
|
|
2
|
+
using UnityEngine.Events;
|
|
3
|
+
|
|
4
|
+
/// <summary>
|
|
5
|
+
/// To use a generic UnityEvent type you must override the generic type.
|
|
6
|
+
/// </summary>
|
|
7
|
+
namespace jeanf.EventSystem
|
|
8
|
+
{
|
|
9
|
+
[System.Serializable]
|
|
10
|
+
public class DecimalGameObjectEvent : UnityEvent<decimal, GameObject>
|
|
11
|
+
{
|
|
12
|
+
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
/// <summary>
|
|
16
|
+
/// A flexible handler for int events in the form of a MonoBehaviour. Responses can be connected directly from the Unity Inspector.
|
|
17
|
+
/// </summary>
|
|
18
|
+
public class DecimalGameObjectEventListener : MonoBehaviour, IDebugBehaviour
|
|
19
|
+
{
|
|
20
|
+
public bool isDebug
|
|
21
|
+
{
|
|
22
|
+
get => _isDebug;
|
|
23
|
+
set => _isDebug = value;
|
|
24
|
+
}
|
|
25
|
+
[SerializeField] private bool _isDebug = false;
|
|
26
|
+
|
|
27
|
+
[SerializeField] private DecimalGameObjectEventChannelSO _channel = default;
|
|
28
|
+
|
|
29
|
+
public DecimalGameObjectEvent OnEventRaised;
|
|
30
|
+
|
|
31
|
+
private void OnEnable()
|
|
32
|
+
{
|
|
33
|
+
if (_channel != null)
|
|
34
|
+
_channel.OnEventRaised += Respond;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
private void OnDisable()
|
|
38
|
+
{
|
|
39
|
+
if (_channel != null)
|
|
40
|
+
_channel.OnEventRaised -= Respond;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
private void Respond(decimal nb, GameObject value)
|
|
44
|
+
{
|
|
45
|
+
OnEventRaised?.Invoke(nb, value);
|
|
46
|
+
if(isDebug) Debug.Log($" decimal-gameObject event raised: <{nb},{value}>");
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
}
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
using UnityEngine;
|
|
2
|
+
using UnityEngine.Events;
|
|
3
|
+
|
|
4
|
+
/// <summary>
|
|
5
|
+
/// To use a generic UnityEvent type you must override the generic type.
|
|
6
|
+
/// </summary>
|
|
7
|
+
namespace jeanf.EventSystem
|
|
8
|
+
{
|
|
9
|
+
[System.Serializable]
|
|
10
|
+
public class DecimalIntEvent : UnityEvent<decimal, int>
|
|
11
|
+
{
|
|
12
|
+
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
/// <summary>
|
|
16
|
+
/// A flexible handler for int events in the form of a MonoBehaviour. Responses can be connected directly from the Unity Inspector.
|
|
17
|
+
/// </summary>
|
|
18
|
+
public class DecimalIntEventListener : MonoBehaviour, IDebugBehaviour
|
|
19
|
+
{
|
|
20
|
+
public bool isDebug
|
|
21
|
+
{
|
|
22
|
+
get => _isDebug;
|
|
23
|
+
set => _isDebug = value;
|
|
24
|
+
}
|
|
25
|
+
[SerializeField] private bool _isDebug = false;
|
|
26
|
+
|
|
27
|
+
[SerializeField] private DecimalIntEventChannelSO _channel = default;
|
|
28
|
+
|
|
29
|
+
public DecimalIntEvent OnEventRaised;
|
|
30
|
+
|
|
31
|
+
private void OnEnable()
|
|
32
|
+
{
|
|
33
|
+
if (_channel != null)
|
|
34
|
+
_channel.OnEventRaised += Respond;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
private void OnDisable()
|
|
38
|
+
{
|
|
39
|
+
if (_channel != null)
|
|
40
|
+
_channel.OnEventRaised -= Respond;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
private void Respond(decimal nb, int value)
|
|
44
|
+
{
|
|
45
|
+
OnEventRaised?.Invoke(nb, value);
|
|
46
|
+
if(isDebug) Debug.Log($" int-bool event raised: <{nb},{value}>");
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
}
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
using UnityEngine;
|
|
2
|
+
using UnityEngine.Events;
|
|
3
|
+
|
|
4
|
+
/// <summary>
|
|
5
|
+
/// To use a generic UnityEvent type you must override the generic type.
|
|
6
|
+
/// </summary>
|
|
7
|
+
namespace jeanf.EventSystem
|
|
8
|
+
{
|
|
9
|
+
[System.Serializable]
|
|
10
|
+
public class DecimalStringEvent : UnityEvent<decimal, string>
|
|
11
|
+
{
|
|
12
|
+
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
/// <summary>
|
|
16
|
+
/// A flexible handler for int events in the form of a MonoBehaviour. Responses can be connected directly from the Unity Inspector.
|
|
17
|
+
/// </summary>
|
|
18
|
+
public class DecimalStringEventListener : MonoBehaviour, IDebugBehaviour
|
|
19
|
+
{
|
|
20
|
+
public bool isDebug
|
|
21
|
+
{
|
|
22
|
+
get => _isDebug;
|
|
23
|
+
set => _isDebug = value;
|
|
24
|
+
}
|
|
25
|
+
[SerializeField] private bool _isDebug = false;
|
|
26
|
+
|
|
27
|
+
[SerializeField] private DecimalStringEventChannelSO _channel = default;
|
|
28
|
+
|
|
29
|
+
public DecimalStringEvent OnEventRaised;
|
|
30
|
+
|
|
31
|
+
private void OnEnable()
|
|
32
|
+
{
|
|
33
|
+
if (_channel != null)
|
|
34
|
+
_channel.OnEventRaised += Respond;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
private void OnDisable()
|
|
38
|
+
{
|
|
39
|
+
if (_channel != null)
|
|
40
|
+
_channel.OnEventRaised -= Respond;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
private void Respond(decimal nb, string value)
|
|
44
|
+
{
|
|
45
|
+
OnEventRaised?.Invoke(nb, value);
|
|
46
|
+
if(isDebug) Debug.Log($" decimal-bool event raised: <{nb},{value}>");
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
using UnityEngine;
|
|
2
|
+
using UnityEngine.Events;
|
|
3
|
+
|
|
4
|
+
namespace jeanf.EventSystem
|
|
5
|
+
{
|
|
6
|
+
[CreateAssetMenu(menuName = "Events/Advanced/<Decimal,Bool> Event Channel")]
|
|
7
|
+
|
|
8
|
+
public class DecimalBoolEventChannelSO : DescriptionBaseSO
|
|
9
|
+
{
|
|
10
|
+
public UnityAction<decimal, bool> OnEventRaised;
|
|
11
|
+
|
|
12
|
+
public void RaiseEvent(decimal nb, bool value)
|
|
13
|
+
{
|
|
14
|
+
OnEventRaised?.Invoke(nb, value);
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
using UnityEngine;
|
|
2
|
+
using UnityEngine.Events;
|
|
3
|
+
|
|
4
|
+
namespace jeanf.EventSystem
|
|
5
|
+
{
|
|
6
|
+
[CreateAssetMenu(menuName = "Events/Advanced/<Decimal,Decimal> Event Channel")]
|
|
7
|
+
|
|
8
|
+
public class DecimalDecimalEventChannelSO : DescriptionBaseSO
|
|
9
|
+
{
|
|
10
|
+
public UnityAction<decimal, decimal> OnEventRaised;
|
|
11
|
+
|
|
12
|
+
public void RaiseEvent(decimal nb, decimal value)
|
|
13
|
+
{
|
|
14
|
+
OnEventRaised?.Invoke(nb, value);
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
using UnityEngine;
|
|
2
|
+
using UnityEngine.Events;
|
|
3
|
+
|
|
4
|
+
namespace jeanf.EventSystem
|
|
5
|
+
{
|
|
6
|
+
[CreateAssetMenu(menuName = "Events/Advanced/<Decimal,Float> Event Channel")]
|
|
7
|
+
|
|
8
|
+
public class DecimalFloatEventChannelSO : DescriptionBaseSO
|
|
9
|
+
{
|
|
10
|
+
public UnityAction<decimal, float> OnEventRaised;
|
|
11
|
+
|
|
12
|
+
public void RaiseEvent(decimal nb, float value)
|
|
13
|
+
{
|
|
14
|
+
OnEventRaised?.Invoke(nb, value);
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
using UnityEngine;
|
|
2
|
+
using UnityEngine.Events;
|
|
3
|
+
|
|
4
|
+
namespace jeanf.EventSystem
|
|
5
|
+
{
|
|
6
|
+
[CreateAssetMenu(menuName = "Events/Advanced/<Decimal,GameObject> Event Channel")]
|
|
7
|
+
|
|
8
|
+
public class DecimalGameObjectEventChannelSO : DescriptionBaseSO
|
|
9
|
+
{
|
|
10
|
+
public UnityAction<decimal, GameObject> OnEventRaised;
|
|
11
|
+
|
|
12
|
+
public void RaiseEvent(decimal nb, GameObject value)
|
|
13
|
+
{
|
|
14
|
+
OnEventRaised?.Invoke(nb, value);
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
using UnityEngine;
|
|
2
|
+
using UnityEngine.Events;
|
|
3
|
+
|
|
4
|
+
namespace jeanf.EventSystem
|
|
5
|
+
{
|
|
6
|
+
[CreateAssetMenu(menuName = "Events/Advanced/<Decimal,Int> Event Channel")]
|
|
7
|
+
|
|
8
|
+
public class DecimalIntEventChannelSO : DescriptionBaseSO
|
|
9
|
+
{
|
|
10
|
+
public UnityAction<decimal, int> OnEventRaised;
|
|
11
|
+
|
|
12
|
+
public void RaiseEvent(decimal nb, int value)
|
|
13
|
+
{
|
|
14
|
+
OnEventRaised?.Invoke(nb, value);
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
using UnityEngine;
|
|
2
|
+
using UnityEngine.Events;
|
|
3
|
+
|
|
4
|
+
namespace jeanf.EventSystem
|
|
5
|
+
{
|
|
6
|
+
[CreateAssetMenu(menuName = "Events/Advanced/<Decimal,String> Event Channel")]
|
|
7
|
+
|
|
8
|
+
public class DecimalStringEventChannelSO : DescriptionBaseSO
|
|
9
|
+
{
|
|
10
|
+
public UnityAction<decimal, string> OnEventRaised;
|
|
11
|
+
|
|
12
|
+
public void RaiseEvent(decimal nb, string value)
|
|
13
|
+
{
|
|
14
|
+
OnEventRaised?.Invoke(nb, value);
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
using UnityEngine;
|
|
2
|
+
|
|
3
|
+
namespace jeanf.EventSystem
|
|
4
|
+
{
|
|
5
|
+
public class DecimalBoolEventSender : MonoBehaviour, IDebugBehaviour
|
|
6
|
+
{
|
|
7
|
+
public bool isDebug
|
|
8
|
+
{
|
|
9
|
+
get => _isDebug;
|
|
10
|
+
set => _isDebug = value;
|
|
11
|
+
}
|
|
12
|
+
[SerializeField] private bool _isDebug = false;
|
|
13
|
+
|
|
14
|
+
[field: Header("Broadcasting on:")] public DecimalBoolEventChannelSO boolMessageChannel;
|
|
15
|
+
|
|
16
|
+
public void SendIntBool(decimal nb, bool value)
|
|
17
|
+
{
|
|
18
|
+
boolMessageChannel.RaiseEvent(nb, value);
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
using UnityEngine;
|
|
2
|
+
|
|
3
|
+
namespace jeanf.EventSystem
|
|
4
|
+
{
|
|
5
|
+
public class DecimalDecimalEventSender : MonoBehaviour, IDebugBehaviour
|
|
6
|
+
{
|
|
7
|
+
public bool isDebug
|
|
8
|
+
{
|
|
9
|
+
get => _isDebug;
|
|
10
|
+
set => _isDebug = value;
|
|
11
|
+
}
|
|
12
|
+
[SerializeField] private bool _isDebug = false;
|
|
13
|
+
|
|
14
|
+
[field: Header("Broadcasting on:")] public DecimalDecimalEventChannelSO _channel;
|
|
15
|
+
|
|
16
|
+
public void SendIntInt(decimal nb, decimal value)
|
|
17
|
+
{
|
|
18
|
+
_channel.RaiseEvent(nb, value);
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
using UnityEngine;
|
|
2
|
+
using UnityEngine.Serialization;
|
|
3
|
+
|
|
4
|
+
namespace jeanf.EventSystem
|
|
5
|
+
{
|
|
6
|
+
public class DecimalFloatEventSender : MonoBehaviour, IDebugBehaviour
|
|
7
|
+
{
|
|
8
|
+
public bool isDebug
|
|
9
|
+
{
|
|
10
|
+
get => _isDebug;
|
|
11
|
+
set => _isDebug = value;
|
|
12
|
+
}
|
|
13
|
+
[SerializeField] private bool _isDebug = false;
|
|
14
|
+
|
|
15
|
+
[field: Header("Broadcasting on:")] public DecimalFloatEventChannelSO channel;
|
|
16
|
+
|
|
17
|
+
public void SendIntFloat(int nb, float value)
|
|
18
|
+
{
|
|
19
|
+
channel.RaiseEvent(nb, value);
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
using UnityEngine;
|
|
2
|
+
|
|
3
|
+
namespace jeanf.EventSystem
|
|
4
|
+
{
|
|
5
|
+
public class DecimalGameObjectEventSender : MonoBehaviour, IDebugBehaviour
|
|
6
|
+
{
|
|
7
|
+
public bool isDebug
|
|
8
|
+
{
|
|
9
|
+
get => _isDebug;
|
|
10
|
+
set => _isDebug = value;
|
|
11
|
+
}
|
|
12
|
+
[SerializeField] private bool _isDebug = false;
|
|
13
|
+
|
|
14
|
+
[field: Header("Broadcasting on:")] public DecimalGameObjectEventChannelSO gameObjectMessageChannel;
|
|
15
|
+
|
|
16
|
+
public void SendIntBool(decimal nb, GameObject value)
|
|
17
|
+
{
|
|
18
|
+
gameObjectMessageChannel.RaiseEvent(nb, value);
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
using UnityEngine;
|
|
2
|
+
|
|
3
|
+
namespace jeanf.EventSystem
|
|
4
|
+
{
|
|
5
|
+
public class DecimalIntEventSender : MonoBehaviour, IDebugBehaviour
|
|
6
|
+
{
|
|
7
|
+
public bool isDebug
|
|
8
|
+
{
|
|
9
|
+
get => _isDebug;
|
|
10
|
+
set => _isDebug = value;
|
|
11
|
+
}
|
|
12
|
+
[SerializeField] private bool _isDebug = false;
|
|
13
|
+
|
|
14
|
+
[field: Header("Broadcasting on:")] public DecimalIntEventChannelSO _channel;
|
|
15
|
+
|
|
16
|
+
public void SendDecimalInt(int nb, int value)
|
|
17
|
+
{
|
|
18
|
+
_channel.RaiseEvent(nb, value);
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
using UnityEngine;
|
|
2
|
+
|
|
3
|
+
namespace jeanf.EventSystem
|
|
4
|
+
{
|
|
5
|
+
public class DecimalStringEventSender : MonoBehaviour, IDebugBehaviour
|
|
6
|
+
{
|
|
7
|
+
public bool isDebug
|
|
8
|
+
{
|
|
9
|
+
get => _isDebug;
|
|
10
|
+
set => _isDebug = value;
|
|
11
|
+
}
|
|
12
|
+
[SerializeField] private bool _isDebug = false;
|
|
13
|
+
|
|
14
|
+
[field: Header("Broadcasting on:")] public DecimalStringEventChannelSO _channel;
|
|
15
|
+
|
|
16
|
+
public void SendIntString(decimal nb, string value)
|
|
17
|
+
{
|
|
18
|
+
_channel.RaiseEvent(nb, value);
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
|
package/package.json
CHANGED
|
File without changes
|
/package/Runtime/Listeners/{IntBoolEventListener.cs.meta → Advanced/IntBoolEventListener.cs.meta}
RENAMED
|
File without changes
|
|
File without changes
|
/package/Runtime/Listeners/{IntFloatEventListener.cs.meta → Advanced/IntFloatEventListener.cs.meta}
RENAMED
|
File without changes
|
/package/Runtime/Listeners/{IntGameObjectEventListener.cs → Advanced/IntGameObjectEventListener.cs}
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
/package/Runtime/Listeners/{IntIntEventListener.cs.meta → Advanced/IntIntEventListener.cs.meta}
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
/package/Runtime/Listeners/{StringBoolEventListener.cs → Advanced/StringBoolEventListener.cs}
RENAMED
|
File without changes
|
|
File without changes
|
/package/Runtime/Listeners/{StringFloatEventListener.cs → Advanced/StringFloatEventListener.cs}
RENAMED
|
File without changes
|
|
File without changes
|
/package/Runtime/Listeners/{StringStringEventListener.cs → Advanced/StringStringEventListener.cs}
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
/package/Runtime/SenderInterfaces/{IntBoolEventSender.cs.meta → Advanced/IntBoolEventSender.cs.meta}
RENAMED
|
File without changes
|
/package/Runtime/SenderInterfaces/{IntFloatEventSender.cs → Advanced/IntFloatEventSender.cs}
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
/package/Runtime/SenderInterfaces/{IntIntEventSender.cs.meta → Advanced/IntIntEventSender.cs.meta}
RENAMED
|
File without changes
|
/package/Runtime/SenderInterfaces/{IntStringEventSender.cs → Advanced/IntStringEventSender.cs}
RENAMED
|
File without changes
|
|
File without changes
|
/package/Runtime/SenderInterfaces/{StringBoolEventSender.cs → Advanced/StringBoolEventSender.cs}
RENAMED
|
File without changes
|
|
File without changes
|
/package/Runtime/SenderInterfaces/{StringFloatEventSender.cs → Advanced/StringFloatEventSender.cs}
RENAMED
|
File without changes
|
|
File without changes
|
/package/Runtime/SenderInterfaces/{StringStringEventSender.cs → Advanced/StringStringEventSender.cs}
RENAMED
|
File without changes
|
|
File without changes
|