Skip to content

Commit bdf0ea4

Browse files
committed
updated doc comments
1 parent d0a209d commit bdf0ea4

File tree

2 files changed

+14
-7
lines changed

2 files changed

+14
-7
lines changed

Scripts/Signal.cs

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,10 @@
55

66
namespace Signals
77
{
8+
/// <summary>
9+
/// Signal with no value.
10+
/// Implements the <see cref="ISignal"/> interface.
11+
/// </summary>
812
[CreateAssetMenu(menuName = "Signals/Signal")]
913
public class Signal : ScriptableObject, ISignal
1014
{
@@ -15,6 +19,9 @@ public class Signal : ScriptableObject, ISignal
1519
#endif
1620
[SerializeField] UnityEvent _onTriggered;
1721

22+
/// <summary>
23+
/// Invoked when <see cref="Trigger"/> is called.
24+
/// </summary>
1825
public UnityEvent OnTriggered
1926
{
2027
get
@@ -23,6 +30,9 @@ public UnityEvent OnTriggered
2330
}
2431
}
2532

33+
/// <summary>
34+
/// Triggers the <see cref="OnTriggered"/> event.
35+
/// </summary>
2636
public void Trigger()
2737
{
2838
_onTriggered.Invoke();

Scripts/SignalListener.cs

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -17,12 +17,9 @@ public class SignalListener : MonoBehaviour
1717
#pragma warning restore
1818
#endif
1919
[SerializeField] Signal _signal;
20-
2120
[SerializeField] UnityEvent _onTriggered;
22-
2321
[SerializeField] bool _invokeImmediately;
2422

25-
2623
protected virtual void Awake()
2724
{
2825
if (_onTriggered == null) _onTriggered = new UnityEvent();
@@ -37,6 +34,7 @@ protected virtual void OnDisable()
3734
{
3835
RemoveListener();
3936
}
37+
4038
/// <summary>
4139
/// The signal whose <see cref="Signal.OnTriggered"/> event is propagated.
4240
/// </summary>
@@ -54,9 +52,8 @@ public Signal Signal
5452
}
5553
}
5654

57-
5855
/// <summary>
59-
/// Invoked when the <see cref="Signal.OnTriggered"/> of the signal has changed.
56+
/// Invoked when <see cref="Signal.Trigger"/> of the <see cref="Signal"/> is called.
6057
/// </summary>
6158
public UnityEvent OnTriggered
6259
{
@@ -67,7 +64,7 @@ public UnityEvent OnTriggered
6764
}
6865

6966
/// <summary>
70-
/// If true the OnChanged event will also be invoked when the SignalListener is enabled or <see cref="Signal"/> is set.
67+
/// If true the <see cref="OnChanged"/> event will also be invoked when the SignalListener is enabled or <see cref="Signal"/> is set.
7168
/// </summary>
7269
public bool InvokeImmediately
7370
{
@@ -148,7 +145,7 @@ public ET OnChanged
148145
}
149146

150147
/// <summary>
151-
/// If true the OnChanged event will also be invoked when the SignalListener is enabled or <see cref="Signal"/> is set.
148+
/// If true the <see cref="OnChanged"/> event will also be invoked when the SignalListener is enabled or <see cref="Signal"/> is set.
152149
/// </summary>
153150
public bool InvokeImmediately
154151
{

0 commit comments

Comments
 (0)