Exemplo n.º 1
0
 public override void RegisterFailure()
 {
     if (Interlocked.Increment(ref _FailureAccured) >= (int)_FailureRetrySeverity)
     {
         StateToggle.Open(this);
     }
 }
Exemplo n.º 2
0
        /// <summary>
        /// Setup UI style for toggles
        /// </summary>
        /// <param name="normal">The normal checkbox sprite</param>
        /// <param name="onMark">Sprite for the on state</param>
        /// <param name="offMark">Sprite for the off state</param>
        public void setToggle(Sprite normal, Sprite onMark, Sprite offMark)
        {
            setSelectable(normal);

            if (onMark == null || offMark == null)
            {
                return;
            }

            StateToggle toggle = GetComponent <StateToggle>();

            if (toggle == null)
            {
                return;
            }

            toggle.OnSprite  = onMark;
            toggle.OffSprite = offMark;
        }
 public override void RegisterSuccess()
 {
     StateToggle.Close(this);
 }
 public override void RegisterFailure()
 {
     StateToggle.Open(this);
 }
 private void _TryCloseTheGate()
 {
     StateToggle.TryClose(this);
 }