fr.jeanf.eventsystem 0.1.83 → 0.1.85
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/BaseClasses/DescriptionBaseSO.cs +3 -2
- package/Runtime/BaseClasses/RaiseEvent.cs +14 -0
- package/Runtime/BaseClasses/RaiseEvent.cs.meta +11 -0
- package/Runtime/BaseClasses/SerializableScriptableObject.cs +2 -2
- package/Runtime/PingSystem/PingableScriptableObject.cs +1 -0
- package/Runtime/ScriptableObjects/Advanced.meta +8 -0
- package/Runtime/ScriptableObjects/BoolEventChannelSO.cs +1 -1
- package/Runtime/SenderInterfaces/TransformEventSender.cs +1 -0
- package/package.json +1 -1
- /package/Runtime/ScriptableObjects/{IntBoolEventChannelSO.cs → Advanced/IntBoolEventChannelSO.cs} +0 -0
- /package/Runtime/ScriptableObjects/{IntBoolEventChannelSO.cs.meta → Advanced/IntBoolEventChannelSO.cs.meta} +0 -0
- /package/Runtime/ScriptableObjects/{IntFloatEventChannelSO.cs → Advanced/IntFloatEventChannelSO.cs} +0 -0
- /package/Runtime/ScriptableObjects/{IntFloatEventChannelSO.cs.meta → Advanced/IntFloatEventChannelSO.cs.meta} +0 -0
- /package/Runtime/ScriptableObjects/{IntGameObjectEventChannelSO.cs → Advanced/IntGameObjectEventChannelSO.cs} +0 -0
- /package/Runtime/ScriptableObjects/{IntGameObjectEventChannelSO.cs.meta → Advanced/IntGameObjectEventChannelSO.cs.meta} +0 -0
- /package/Runtime/ScriptableObjects/{IntIntEventChannelSO.cs → Advanced/IntIntEventChannelSO.cs} +0 -0
- /package/Runtime/ScriptableObjects/{IntIntEventChannelSO.cs.meta → Advanced/IntIntEventChannelSO.cs.meta} +0 -0
- /package/Runtime/ScriptableObjects/{IntStringEventChannelSO.cs → Advanced/IntStringEventChannelSO.cs} +0 -0
- /package/Runtime/ScriptableObjects/{IntStringEventChannelSO.cs.meta → Advanced/IntStringEventChannelSO.cs.meta} +0 -0
- /package/Runtime/ScriptableObjects/{StringFloatEventChannelSO.cs → Advanced/StringFloatEventChannelSO.cs} +0 -0
- /package/Runtime/ScriptableObjects/{StringFloatEventChannelSO.cs.meta → Advanced/StringFloatEventChannelSO.cs.meta} +0 -0
- /package/Runtime/ScriptableObjects/{StringStringtEventChannelSO.cs → Advanced/StringStringtEventChannelSO.cs} +0 -0
- /package/Runtime/ScriptableObjects/{StringStringtEventChannelSO.cs.meta → Advanced/StringStringtEventChannelSO.cs.meta} +0 -0
|
@@ -1,11 +1,12 @@
|
|
|
1
|
-
using
|
|
1
|
+
using System;
|
|
2
|
+
using UnityEngine;
|
|
2
3
|
|
|
3
4
|
namespace jeanf.EventSystem
|
|
4
5
|
{
|
|
5
6
|
/// <summary>
|
|
6
7
|
/// Base class for ScriptableObjects that need a public description field.
|
|
7
8
|
/// </summary>
|
|
8
|
-
public class DescriptionBaseSO : SerializableScriptableObject
|
|
9
|
+
public abstract class DescriptionBaseSO : SerializableScriptableObject
|
|
9
10
|
{
|
|
10
11
|
[TextArea] public string description;
|
|
11
12
|
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
using System.Collections;
|
|
2
|
+
using System.Collections.Generic;
|
|
3
|
+
using UnityEngine;
|
|
4
|
+
using UnityEngine.Events;
|
|
5
|
+
|
|
6
|
+
public interface RaiseEvent
|
|
7
|
+
{
|
|
8
|
+
public delegate void TransferFunction();
|
|
9
|
+
|
|
10
|
+
public void RaiseEvent(TransferFunction transferFunction)
|
|
11
|
+
{
|
|
12
|
+
transferFunction.Invoke();
|
|
13
|
+
}
|
|
14
|
+
}
|
|
@@ -11,12 +11,12 @@ namespace jeanf.EventSystem
|
|
|
11
11
|
[SerializeField, HideInInspector] private string _guid;
|
|
12
12
|
public string Guid => _guid;
|
|
13
13
|
|
|
14
|
-
#if UNITY_EDITOR
|
|
14
|
+
#if UNITY_EDITOR
|
|
15
15
|
void OnValidate()
|
|
16
16
|
{
|
|
17
17
|
var path = AssetDatabase.GetAssetPath(this);
|
|
18
18
|
_guid = AssetDatabase.AssetPathToGUID(path);
|
|
19
19
|
}
|
|
20
|
-
#endif
|
|
20
|
+
#endif
|
|
21
21
|
}
|
|
22
22
|
}
|
|
@@ -4,7 +4,7 @@ using UnityEngine.Events;
|
|
|
4
4
|
namespace jeanf.EventSystem
|
|
5
5
|
{
|
|
6
6
|
[CreateAssetMenu(menuName = "Events/Bool Event Channel")]
|
|
7
|
-
public class BoolEventChannelSO : DescriptionBaseSO
|
|
7
|
+
public class BoolEventChannelSO : DescriptionBaseSO, RaiseEvent
|
|
8
8
|
{
|
|
9
9
|
public UnityAction<bool> OnEventRaised;
|
|
10
10
|
|
package/package.json
CHANGED
/package/Runtime/ScriptableObjects/{IntBoolEventChannelSO.cs → Advanced/IntBoolEventChannelSO.cs}
RENAMED
|
File without changes
|
|
File without changes
|
/package/Runtime/ScriptableObjects/{IntFloatEventChannelSO.cs → Advanced/IntFloatEventChannelSO.cs}
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
/package/Runtime/ScriptableObjects/{IntIntEventChannelSO.cs → Advanced/IntIntEventChannelSO.cs}
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|