Ejemplo n.º 1
0
        private int Compare(PlayUserIcon icon1, PlayUserIcon icon2)
        {
            int ret;

            if (icon1.Alpha == 0 && icon2.Alpha == 0)
            {
                return(0);
            }
            else if (icon1.Alpha == 0)
            {
                return(1);
            }
            else if (icon2.Alpha == 0)
            {
                return(-1);
            }

            if (icon1.DisplayScore == icon2.DisplayScore)
            {
                ret = icon2.UserPlayState.User.ID - icon1.UserPlayState.User.ID;
            }
            else
            {
                ret = icon1.DisplayScore - icon2.DisplayScore;
            }
            return(ret * -1);
        }
Ejemplo n.º 2
0
        public void AddSelfUser(UserPlayState selfUserPlayState, ItemManagerComponent itemManager)
        {
            var playUserIcon = new PlayUserIcon(device, resourceManager, selfUserPlayState, itemManager)
            {
                Position = new SharpDX.Vector2(0, ChildrenCount * ItemHeight)
            };

            iconSprite.AddChild(playUserIcon);
        }
Ejemplo n.º 3
0
        public void AddUser(UserPlayState userPlayState)
        {
            var playUserIcon = new PlayUserIcon(device, resourceManager, userPlayState)
            {
                Position = new SharpDX.Vector2(0, ChildrenCount * ItemHeight)
            };

            iconSprite.AddChild(playUserIcon);
        }
Ejemplo n.º 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);
            }
        }