示例#1
0
 /// <summary>
 /// Try comply target value
 /// </summary>
 public void CheckCompliance()
 {
     if (IsComplied())
     {
         Reached?.Invoke(this, EventArgs.Empty);
     }
 }
示例#2
0
 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();
 }
示例#3
0
 private void FrameReached()
 {
     if (OnReached != null)
     {
         OnReached.Invoke();
     }
 }
    private void OnTriggerEnter(Collider col)
    {
        if (!col.gameObject.CompareTag("Throwable"))
        {
            return;
        }

        if (Reached != null)
        {
            Reached.Invoke();
        }
    }
示例#5
0
    private void Activate()
    {
        if (Time.time - _lastActivated < minimumTimeBetweenLandings)
        {
            return;
        }

        _particle.Play();
        _audioSource.Play();
        _activated = true;
        Reached.Invoke(this);
    }
示例#6
0
 /// <summary>
 /// Trigger the reached event.
 /// </summary>
 void OnReached()
 {
     Reached?.Invoke(this);
 }