-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathInterfaces.cs
40 lines (34 loc) · 1002 Bytes
/
Interfaces.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
/**
* Description: Interfaces for base classes.
* Copyright: © 2017-2020 Kornel, MIT License. Please see 'README.md' and 'LICENSE' files for more information.
**/
public interface IEventListener
{
void OnEventRaised();
}
public interface IEvent
{
void Broadcast(UnityEngine.GameObject gameObject);
void Subscribe(IEventListener listener);
void UnSubscribe(IEventListener listener);
}
public interface IEventListener<T>
{
void OnEventRaised(T parameter);
}
public interface IEvent<T>
{
void Broadcast(UnityEngine.GameObject gameObject, T parameter);
void Subscribe(IEventListener<T> listener);
void UnSubscribe(IEventListener<T> listener);
}
public interface IEventListener<T, U>
{
void OnEventRaised(T parameter1, U parameter2);
}
public interface IEvent<T, U>
{
void Broadcast(UnityEngine.GameObject gameObject, T parameter1, U parameter2);
void Subscribe(IEventListener<T, U> listener);
void UnSubscribe(IEventListener<T, U> listener);
}