コード例 #1
0
        /// <summary>
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void OnGameHostChanged(object sender, GameHostChangedEventArgs e)
        {
            if (e.UserId == OnlineManager.Self.OnlineUser.Id)
            {
                ReadyUp.ChangeText("START MATCH");

                if (!RightAligned.Contains(SelectMap))
                {
                    RightAligned.Add(SelectMap);
                }

                if (!RightAligned.Contains(SelectModifiers))
                {
                    RightAligned.Add(SelectModifiers);
                }
            }
            else
            {
                if (OnlineManager.CurrentGame.PlayersReady.Contains(OnlineManager.Self.OnlineUser.Id))
                {
                    ReadyUp.ChangeText("UNREADY");
                }
                else
                {
                    ReadyUp.ChangeText("READY");
                }

                RightAligned.Remove(SelectMap);
                SelectMap.Parent = null;
            }

            AlignRightItems(RightAligned);
        }
コード例 #2
0
 /// <summary>
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void OnGameHostChanged(object sender, GameHostChangedEventArgs e)
 => HostCrown.Visible = e.UserId == Item.Id;
コード例 #3
0
 /// <summary>
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 /// <exception cref="NotImplementedException"></exception>
 private void OnGameHostChanged(object sender, GameHostChangedEventArgs e)
 => Close(false);