コード例 #1
0
ファイル: MenuManager.cs プロジェクト: gmich/TileEngine
        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);
            }
        }
コード例 #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);
            }
        }