fr.jeanf.eventsystem 0.1.4 → 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/Runtime/SenderInterfaces/VoidEventSender.cs +27 -0
- package/Runtime/SenderInterfaces/VoidEventSender.cs.meta +11 -0
- package/Samples/PlayerChannels/Grab_LeftHand.asset +16 -0
- package/Samples/PlayerChannels/Grab_LeftHand.asset.meta +8 -0
- package/Samples/PlayerChannels/Grab_RightHand.asset +16 -0
- package/Samples/PlayerChannels/Grab_RightHand.asset.meta +8 -0
- package/package.json +1 -1
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
using System;
|
|
2
|
+
using jeanf.EventSystem;
|
|
3
|
+
using UnityEngine;
|
|
4
|
+
|
|
5
|
+
public class VoidEventSender : 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 VoidEventChannelSO voidMessageChannel;
|
|
15
|
+
|
|
16
|
+
[SerializeField] private bool sendEventOnAwake = true;
|
|
17
|
+
|
|
18
|
+
private void Awake()
|
|
19
|
+
{
|
|
20
|
+
if(sendEventOnAwake) SendVoidEvent();
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
public void SendVoidEvent()
|
|
24
|
+
{
|
|
25
|
+
voidMessageChannel.RaiseEvent();
|
|
26
|
+
}
|
|
27
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
%YAML 1.1
|
|
2
|
+
%TAG !u! tag:unity3d.com,2011:
|
|
3
|
+
--- !u!114 &11400000
|
|
4
|
+
MonoBehaviour:
|
|
5
|
+
m_ObjectHideFlags: 0
|
|
6
|
+
m_CorrespondingSourceObject: {fileID: 0}
|
|
7
|
+
m_PrefabInstance: {fileID: 0}
|
|
8
|
+
m_PrefabAsset: {fileID: 0}
|
|
9
|
+
m_GameObject: {fileID: 0}
|
|
10
|
+
m_Enabled: 1
|
|
11
|
+
m_EditorHideFlags: 0
|
|
12
|
+
m_Script: {fileID: 11500000, guid: d84ad29ba75bd634eb5eda8abf406faf, type: 3}
|
|
13
|
+
m_Name: Grab_LeftHand
|
|
14
|
+
m_EditorClassIdentifier:
|
|
15
|
+
_guid:
|
|
16
|
+
description:
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
%YAML 1.1
|
|
2
|
+
%TAG !u! tag:unity3d.com,2011:
|
|
3
|
+
--- !u!114 &11400000
|
|
4
|
+
MonoBehaviour:
|
|
5
|
+
m_ObjectHideFlags: 0
|
|
6
|
+
m_CorrespondingSourceObject: {fileID: 0}
|
|
7
|
+
m_PrefabInstance: {fileID: 0}
|
|
8
|
+
m_PrefabAsset: {fileID: 0}
|
|
9
|
+
m_GameObject: {fileID: 0}
|
|
10
|
+
m_Enabled: 1
|
|
11
|
+
m_EditorHideFlags: 0
|
|
12
|
+
m_Script: {fileID: 11500000, guid: d84ad29ba75bd634eb5eda8abf406faf, type: 3}
|
|
13
|
+
m_Name: Grab_RightHand
|
|
14
|
+
m_EditorClassIdentifier:
|
|
15
|
+
_guid:
|
|
16
|
+
description:
|
package/package.json
CHANGED