Example #1
0
 /// <summary>
 /// Notifies all <see cref="Subscribers"/> with the latest slot change details.
 /// </summary>
 /// <param name="slot">Last interacted slot</param>
 /// <param name="type">Last interacted slot interaction type</param>
 public void NotifySlotChanged(SlotChange slot, SlotTouchType type)
 {
     foreach (var sub in Subscribers)
     {
         ResetView(sub, slot, type);
     }
     Previous     = slot;
     PreviousType = type;
 }
Example #2
0
        private void ResetView(ISlotViewer sub, SlotChange slot, SlotTouchType type)
        {
            if (Previous != null)
            {
                sub.NotifySlotOld(Previous);
            }

            int index = sub.ViewIndex;

            if (index == slot.Box)
            {
                sub.NotifySlotChanged(slot, type);
            }
        }