fr.jeanf.eventsystem 0.0.4 → 0.0.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.
@@ -1,5 +1,6 @@
1
1
  using System.Collections;
2
2
  using System.Collections.Generic;
3
+ using UnityEditor.TextCore.Text;
3
4
  using UnityEngine;
4
5
 
5
6
  namespace jeanf.EventSystem
@@ -10,6 +11,7 @@ namespace jeanf.EventSystem
10
11
  public Transform objectToTeleport;
11
12
  public Transform targetDestination;
12
13
  public bool alignToTarget;
14
+ public FilterSO filter;
13
15
 
14
16
  public TeleportInformation(Transform targetDestination, bool alignToTarget)
15
17
  {
@@ -18,12 +20,13 @@ namespace jeanf.EventSystem
18
20
  this.objectIsPlayer = true;
19
21
  }
20
22
 
21
- public TeleportInformation(Transform objectToTeleport, Transform targetDestination, bool alignToTarget, bool objectIsPlayer)
23
+ public TeleportInformation(Transform objectToTeleport, Transform targetDestination, bool alignToTarget, bool objectIsPlayer, FilterSO filter)
22
24
  {
23
25
  this.objectToTeleport = objectToTeleport;
24
26
  this.targetDestination = targetDestination;
25
27
  this.alignToTarget = alignToTarget;
26
28
  this.objectIsPlayer = objectIsPlayer;
29
+ this.filter = filter;
27
30
  }
28
31
  }
29
32
  }
@@ -18,14 +18,12 @@ namespace jeanf.EventSystem
18
18
 
19
19
  private void OnEnable()
20
20
  {
21
- if (_channel != null)
22
- _channel.OnEventRaised += Respond;
21
+ if (_channel != null) _channel.OnEventRaised += Respond;
23
22
  }
24
23
 
25
24
  private void OnDisable()
26
25
  {
27
- if (_channel != null)
28
- _channel.OnEventRaised -= Respond;
26
+ if (_channel != null) _channel.OnEventRaised -= Respond;
29
27
  }
30
28
 
31
29
  private void Respond( TeleportInformation teleportInformation)
@@ -0,0 +1,11 @@
1
+ using System.Collections.Generic;
2
+ using UnityEngine;
3
+
4
+ namespace jeanf.EventSystem
5
+ {
6
+ [CreateAssetMenu(menuName = "Events/Filters/DefaultFilter")]
7
+ public class FilterSO : ScriptableObject
8
+ {
9
+ public List<string> filters;
10
+ }
11
+ }
@@ -0,0 +1,11 @@
1
+ fileFormatVersion: 2
2
+ guid: 2fff979f934e8844ea0bb85ae8db36c7
3
+ MonoImporter:
4
+ externalObjects: {}
5
+ serializedVersion: 2
6
+ defaultReferences: []
7
+ executionOrder: 0
8
+ icon: {instanceID: 0}
9
+ userData:
10
+ assetBundleName:
11
+ assetBundleVariant:
@@ -1,8 +1,8 @@
1
1
  using UnityEngine;
2
2
  using UnityEngine.Events;
3
3
 
4
- namespace jeanf.EventSystem
5
- {
4
+ namespace jeanf.EventSystem
5
+ {
6
6
  [CreateAssetMenu(menuName = "Events/Teleport Event Channel")]
7
7
  public class TeleportEventChannelSO : DescriptionBaseSO
8
8
  {
@@ -5,6 +5,6 @@ namespace jeanf.EventSystem
5
5
  {
6
6
  public interface IVoidEventSender
7
7
  {
8
- VoidEventChannelSO boolMessageChannel { get; set; }
8
+ VoidEventChannelSO voidMessageChannel { get; set; }
9
9
  }
10
10
  }
@@ -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: 2fff979f934e8844ea0bb85ae8db36c7, type: 3}
13
+ m_Name: DefaultFilter
14
+ m_EditorClassIdentifier:
15
+ filters:
16
+ - Player
@@ -0,0 +1,8 @@
1
+ fileFormatVersion: 2
2
+ guid: 710fde9ddb9905c468ce1b051d216eef
3
+ NativeFormatImporter:
4
+ externalObjects: {}
5
+ mainObjectFileID: 11400000
6
+ userData:
7
+ assetBundleName:
8
+ assetBundleVariant:
@@ -0,0 +1,8 @@
1
+ fileFormatVersion: 2
2
+ guid: af5f81398ae7dbd4c9a58eb73eb2804d
3
+ folderAsset: yes
4
+ DefaultImporter:
5
+ externalObjects: {}
6
+ userData:
7
+ assetBundleName:
8
+ assetBundleVariant:
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name":"fr.jeanf.eventsystem",
3
- "version":"0.0.4",
3
+ "version":"0.0.6",
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",
@@ -25,6 +25,11 @@
25
25
  "displayName": "Player Channels",
26
26
  "description": "A set of channels used for the vr_player package",
27
27
  "path": "Samples/PlayerChannels"
28
+ },
29
+ {
30
+ "displayName": "Event filters",
31
+ "description": "A set of filters to segregate messages sent on the same channel",
32
+ "path": "Samples/Filters"
28
33
  }
29
34
  ]
30
35
  }