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.
Files changed (23) hide show
  1. package/Runtime/BaseClasses/DescriptionBaseSO.cs +3 -2
  2. package/Runtime/BaseClasses/RaiseEvent.cs +14 -0
  3. package/Runtime/BaseClasses/RaiseEvent.cs.meta +11 -0
  4. package/Runtime/BaseClasses/SerializableScriptableObject.cs +2 -2
  5. package/Runtime/PingSystem/PingableScriptableObject.cs +1 -0
  6. package/Runtime/ScriptableObjects/Advanced.meta +8 -0
  7. package/Runtime/ScriptableObjects/BoolEventChannelSO.cs +1 -1
  8. package/Runtime/SenderInterfaces/TransformEventSender.cs +1 -0
  9. package/package.json +1 -1
  10. /package/Runtime/ScriptableObjects/{IntBoolEventChannelSO.cs → Advanced/IntBoolEventChannelSO.cs} +0 -0
  11. /package/Runtime/ScriptableObjects/{IntBoolEventChannelSO.cs.meta → Advanced/IntBoolEventChannelSO.cs.meta} +0 -0
  12. /package/Runtime/ScriptableObjects/{IntFloatEventChannelSO.cs → Advanced/IntFloatEventChannelSO.cs} +0 -0
  13. /package/Runtime/ScriptableObjects/{IntFloatEventChannelSO.cs.meta → Advanced/IntFloatEventChannelSO.cs.meta} +0 -0
  14. /package/Runtime/ScriptableObjects/{IntGameObjectEventChannelSO.cs → Advanced/IntGameObjectEventChannelSO.cs} +0 -0
  15. /package/Runtime/ScriptableObjects/{IntGameObjectEventChannelSO.cs.meta → Advanced/IntGameObjectEventChannelSO.cs.meta} +0 -0
  16. /package/Runtime/ScriptableObjects/{IntIntEventChannelSO.cs → Advanced/IntIntEventChannelSO.cs} +0 -0
  17. /package/Runtime/ScriptableObjects/{IntIntEventChannelSO.cs.meta → Advanced/IntIntEventChannelSO.cs.meta} +0 -0
  18. /package/Runtime/ScriptableObjects/{IntStringEventChannelSO.cs → Advanced/IntStringEventChannelSO.cs} +0 -0
  19. /package/Runtime/ScriptableObjects/{IntStringEventChannelSO.cs.meta → Advanced/IntStringEventChannelSO.cs.meta} +0 -0
  20. /package/Runtime/ScriptableObjects/{StringFloatEventChannelSO.cs → Advanced/StringFloatEventChannelSO.cs} +0 -0
  21. /package/Runtime/ScriptableObjects/{StringFloatEventChannelSO.cs.meta → Advanced/StringFloatEventChannelSO.cs.meta} +0 -0
  22. /package/Runtime/ScriptableObjects/{StringStringtEventChannelSO.cs → Advanced/StringStringtEventChannelSO.cs} +0 -0
  23. /package/Runtime/ScriptableObjects/{StringStringtEventChannelSO.cs.meta → Advanced/StringStringtEventChannelSO.cs.meta} +0 -0
@@ -1,11 +1,12 @@
1
- using UnityEngine;
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
+ }
@@ -0,0 +1,11 @@
1
+ fileFormatVersion: 2
2
+ guid: 044c219836bd9784e8d0ce56ce217576
3
+ MonoImporter:
4
+ externalObjects: {}
5
+ serializedVersion: 2
6
+ defaultReferences: []
7
+ executionOrder: 0
8
+ icon: {instanceID: 0}
9
+ userData:
10
+ assetBundleName:
11
+ assetBundleVariant:
@@ -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
  }
@@ -3,6 +3,7 @@ using UnityEngine;
3
3
 
4
4
  namespace jeanf.EventSystem
5
5
  {
6
+ using jeanf.propertyDrawer;
6
7
  public class PingableScriptableObject : MonoBehaviour, IScriptableObjectEventSender, IScriptableObjectEventListener, IDebugBehaviour
7
8
  {
8
9
  public bool isDebug
@@ -0,0 +1,8 @@
1
+ fileFormatVersion: 2
2
+ guid: 79ca00458077fbd419084dcda94a6497
3
+ folderAsset: yes
4
+ DefaultImporter:
5
+ externalObjects: {}
6
+ userData:
7
+ assetBundleName:
8
+ assetBundleVariant:
@@ -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
 
@@ -4,6 +4,7 @@ using UnityEngine.Serialization;
4
4
 
5
5
  namespace jeanf.EventSystem
6
6
  {
7
+ using jeanf.propertyDrawer;
7
8
  public class TransformEventSender : MonoBehaviour, IDebugBehaviour
8
9
  {
9
10
  public bool isDebug
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name":"fr.jeanf.eventsystem",
3
- "version":"0.1.83",
3
+ "version":"0.1.85",
4
4
  "displayName":"Event System",
5
5
  "description":"This package contains a basic Event System based on Scriptable Objects as communication medium",
6
6
  "unity": "2021.3",