Example #1
0
        private void SwitchColor()
        {
            bannerManager.SetColor(TileGrid.ColorComparer((int)activeMenu.GetInformation()));

            if (activeMenu is CreateLobby || activeMenu is JoinLobby)
            {
                bannerManager.OnColorSwitch(TileGrid.Player, (int)activeMenu.GetInformation(), TileGrid.ColorComparer(TileGrid.activeColor), bannerManager.LobbyBannerPos);
            }
        }
Example #2
0
        private void HandleColorSwitchMessage(NetIncomingMessage im)
        {
            var message = new ColorSwitchMessage(im);

            bannerManager.SetColor(TileGrid.ColorComparer(message.Color), message.Pos);

            if (this.IsHost)
            {
                bannerManager.OnColorSwitch(message.Name, message.Color, message.OldColor, message.Pos);
            }
        }