public ItemType Use()
 {
     if (queue.Count > 0)
     {
         ItemType itemType = queue[0];
         itemSprite.RemoveChild(itemSprite[0]);
         queue.RemoveAt(0);
         return(itemType);
     }
     else
     {
         return(ItemType.None);
     }
 }
Exemple #2
0
 private void RemoveNext()
 {
     while (allSlideSprite.ChildrenCount > currentIndex)
     {
         allSlideSprite.RemoveChild(allSlideSprite[allSlideSprite.ChildrenCount - 1]);
     }
 }
Exemple #3
0
 protected override void UpdateImpl()
 {
     for (int i = onpus.Count - 1; i >= 0; i--)
     {
         OnpuObject onpu = onpus[i];
         onpu.Position = new SharpDX.Vector2(onpu.Position.X + onpu.VelX, onpu.Position.Y);
         onpu.Alpha    = (black.Position.X - onpu.Position.X) / (black.Width - black.Rectangle.Width);
         if (onpu.Alpha <= 0)
         {
             onpuSprite.RemoveChild(onpus[i]);
             onpus.RemoveAt(i);
         }
     }
 }
Exemple #4
0
        public void DeleteUser(UserPlayState userPlayState)
        {
            PlayUserIcon found = null;

            foreach (PlayUserIcon playUserIcon in iconSprite.Children)
            {
                if (playUserIcon.UserPlayState == userPlayState)
                {
                    found = playUserIcon;
                    break;
                }
            }

            if (found != null)
            {
                iconSprite.RemoveChild(found);
            }
        }