public virtual void Validate()
 {
     if (listIndexCount == 0)
         return;
     AudioManager.Instance.PlaySound(validateClip);
     if (OnValidate != null) OnValidate.Invoke(indexSelection);
 }
 public void DoLayout(OnValidate onValidate)
 {
     if (GUILayout.Button(content))
     {
         onValidate.Invoke(rect);
     }
     if (Event.current.type == EventType.Repaint)
     {
         SetRect(GUILayoutUtility.GetLastRect());
     }
 }
Example #3
0
 internal void ValidateNote()
 {
     // The note is not eligible yet
     if (CurrentRank == ValidationRank.Null)
     {
         return;
     }
     Activated          = false;
     _spriteComp.sprite = _fixedState;
     OnValidate?.Invoke(this);
     _boxCollider.enabled = false;
     StartCoroutine(CoroutineExtension.WaitSecondsAnd(1f, () => ClearNote()));
 }
Example #4
0
        public bool Compile()
        {
            var valid = true;

            if (OnValidate == null)
            {
                return(valid);
            }
            foreach (var d in OnValidate.GetInvocationList())
            {
                if (!(bool)d.DynamicInvoke(null))
                {
                    valid = false;
                }
            }

            return(valid);
        }
Example #5
0
 public override void Validate()
 {
     OnValidate.Invoke();
 }
Example #6
0
        void ValidateAction()
        {
            OnValidate?.Invoke();

            ResponseAction(null);
        }