/// <summary> /// Try comply target value /// </summary> public void CheckCompliance() { if (IsComplied()) { Reached?.Invoke(this, EventArgs.Empty); } }
public void Happen() { //NOTE check null here in case of no listener's situation... //NOTE every arg should extend from EventArgs Reached?.Invoke(this, null !); var ms = Reached.GetType().GetMembers(); }
private void FrameReached() { if (OnReached != null) { OnReached.Invoke(); } }
private void OnTriggerEnter(Collider col) { if (!col.gameObject.CompareTag("Throwable")) { return; } if (Reached != null) { Reached.Invoke(); } }
private void Activate() { if (Time.time - _lastActivated < minimumTimeBetweenLandings) { return; } _particle.Play(); _audioSource.Play(); _activated = true; Reached.Invoke(this); }
/// <summary> /// Trigger the reached event. /// </summary> void OnReached() { Reached?.Invoke(this); }