fr.jeanf.eventsystem 0.1.80 → 0.1.82

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.
@@ -0,0 +1,37 @@
1
+ #if UNITY_EDITOR
2
+
3
+ using jeanf.EventSystem;
4
+ using UnityEditor;
5
+ using UnityEngine;
6
+
7
+ namespace uvs.tools
8
+ {
9
+ public class BoolEventOnClick : MonoBehaviour
10
+ {
11
+
12
+ [Header("Broadcasting on:")] [SerializeField]
13
+ private BoolEventChannelSO TestChannel;
14
+
15
+ [Space(20)]
16
+ [SerializeField] private bool valueToSend = false;
17
+
18
+ public void CallFunction()
19
+ {
20
+ TestChannel.RaiseEvent(valueToSend);
21
+ }
22
+ }
23
+
24
+ [CustomEditor(typeof(BoolEventOnClick))]
25
+ public class BoolEventOnClickEditor : Editor {
26
+ override public void OnInspectorGUI () {
27
+ DrawDefaultInspector();
28
+ var eventToSend = (BoolEventOnClick)target;
29
+ if(GUILayout.Button("Send bool", GUILayout.Height(30))) {
30
+ eventToSend.CallFunction(); // how do i call this?
31
+ }
32
+ GUILayout.Space(10);
33
+ }
34
+ }
35
+ }
36
+
37
+ #endif
@@ -0,0 +1,11 @@
1
+ fileFormatVersion: 2
2
+ guid: dd606e56e2b811c449003342d759f031
3
+ MonoImporter:
4
+ externalObjects: {}
5
+ serializedVersion: 2
6
+ defaultReferences: []
7
+ executionOrder: 0
8
+ icon: {instanceID: 0}
9
+ userData:
10
+ assetBundleName:
11
+ assetBundleVariant:
@@ -0,0 +1,36 @@
1
+ #if UNITY_EDITOR
2
+
3
+ using jeanf.EventSystem;
4
+ using UnityEditor;
5
+ using UnityEngine;
6
+
7
+ namespace uvs.tools
8
+ {
9
+ public class SendIntEventOnClick : MonoBehaviour
10
+ {
11
+
12
+ [Header("Broadcasting on:")] [SerializeField]
13
+ private IntEventChannelSO TestChannel;
14
+
15
+ [Space(20)]
16
+ [SerializeField] private int messageToSend = 1;
17
+ public void CallFunction()
18
+ {
19
+ TestChannel.RaiseEvent(messageToSend);
20
+ }
21
+ }
22
+
23
+ [CustomEditor(typeof(SendIntEventOnClick))]
24
+ public class IntEventOnClickEditor : Editor {
25
+ override public void OnInspectorGUI () {
26
+ DrawDefaultInspector();
27
+ var eventToSend = (SendIntEventOnClick)target;
28
+ if(GUILayout.Button("Send int", GUILayout.Height(30))) {
29
+ eventToSend.CallFunction(); // how do i call this?
30
+ }
31
+ GUILayout.Space(10);
32
+ }
33
+ }
34
+ }
35
+
36
+ #endif
@@ -0,0 +1,11 @@
1
+ fileFormatVersion: 2
2
+ guid: b4abaa4bc64166341a724f30c325c2ac
3
+ MonoImporter:
4
+ externalObjects: {}
5
+ serializedVersion: 2
6
+ defaultReferences: []
7
+ executionOrder: 0
8
+ icon: {instanceID: 0}
9
+ userData:
10
+ assetBundleName:
11
+ assetBundleVariant:
@@ -0,0 +1,37 @@
1
+ #if UNITY_EDITOR
2
+
3
+ using jeanf.EventSystem;
4
+ using UnityEditor;
5
+ using UnityEngine;
6
+
7
+ namespace uvs.tools
8
+ {
9
+ public class SendStringEventOnClick : MonoBehaviour
10
+ {
11
+
12
+ [Header("Broadcasting on:")] [SerializeField]
13
+ private StringEventChannelSO TestChannel;
14
+
15
+ [Space(20)]
16
+ [SerializeField] private string messageToSend = "Test123";
17
+
18
+ public void CallFunction()
19
+ {
20
+ TestChannel.RaiseEvent(messageToSend);
21
+ }
22
+ }
23
+
24
+ [CustomEditor(typeof(SendStringEventOnClick))]
25
+ public class StringEventOnClickEditor : Editor {
26
+ override public void OnInspectorGUI () {
27
+ DrawDefaultInspector();
28
+ var eventToSend = (SendStringEventOnClick)target;
29
+ if(GUILayout.Button("Send string", GUILayout.Height(30))) {
30
+ eventToSend.CallFunction(); // how do i call this?
31
+ }
32
+ GUILayout.Space(10);
33
+ }
34
+ }
35
+ }
36
+
37
+ #endif
@@ -0,0 +1,11 @@
1
+ fileFormatVersion: 2
2
+ guid: 025cc6d62b166084c9a929ec0d7ce112
3
+ MonoImporter:
4
+ externalObjects: {}
5
+ serializedVersion: 2
6
+ defaultReferences: []
7
+ executionOrder: 0
8
+ icon: {instanceID: 0}
9
+ userData:
10
+ assetBundleName:
11
+ assetBundleVariant:
@@ -0,0 +1,33 @@
1
+ #if UNITY_EDITOR
2
+
3
+ using jeanf.EventSystem;
4
+ using UnityEditor;
5
+ using UnityEngine;
6
+
7
+ namespace uvs.tools
8
+ {
9
+ public class SendVoidEventOnClick : MonoBehaviour
10
+ {
11
+ [Header("Broadcasting on:")] [SerializeField]
12
+ private VoidEventChannelSO TestChannel;
13
+
14
+ public void CallFunction()
15
+ {
16
+ TestChannel.RaiseEvent();
17
+ }
18
+ }
19
+
20
+ [CustomEditor(typeof(SendVoidEventOnClick))]
21
+ public class VoidEventOnClickEditor : Editor {
22
+ override public void OnInspectorGUI () {
23
+ DrawDefaultInspector();
24
+ var eventToSend = (SendVoidEventOnClick)target;
25
+ if(GUILayout.Button("Send void", GUILayout.Height(30))) {
26
+ eventToSend.CallFunction(); // how do i call this?
27
+ }
28
+ GUILayout.Space(10);
29
+ }
30
+ }
31
+ }
32
+
33
+ #endif
@@ -0,0 +1,11 @@
1
+ fileFormatVersion: 2
2
+ guid: 0f8644a8ea88b1444abc26c3c6bcc54e
3
+ MonoImporter:
4
+ externalObjects: {}
5
+ serializedVersion: 2
6
+ defaultReferences: []
7
+ executionOrder: 0
8
+ icon: {instanceID: 0}
9
+ userData:
10
+ assetBundleName:
11
+ assetBundleVariant:
@@ -1,5 +1,5 @@
1
1
  fileFormatVersion: 2
2
- guid: 1f31d9fe882dc9a4bb1c224b9ddf2549
2
+ guid: c0adab4b6643b4a43833066a82b1981e
3
3
  folderAsset: yes
4
4
  DefaultImporter:
5
5
  externalObjects: {}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name":"fr.jeanf.eventsystem",
3
- "version":"0.1.80",
3
+ "version":"0.1.82",
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",