当前位置: 首页>>代码示例>>C#>>正文


C# ServerMessage.ToString方法代码示例

本文整理汇总了C#中Essential.Messages.ServerMessage.ToString方法的典型用法代码示例。如果您正苦于以下问题:C# ServerMessage.ToString方法的具体用法?C# ServerMessage.ToString怎么用?C# ServerMessage.ToString使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Essential.Messages.ServerMessage的用法示例。


在下文中一共展示了ServerMessage.ToString方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: SendPlayMessageToLobby


//.........这里部分代码省略.........
            {
                ServerMessage SerializeLobby = new ServerMessage(Outgoing.SerializeLobby);
                SerializeLobby.AppendInt32(Player.UserId); // Player ID
                SerializeLobby.AppendBoolean(true);
                SerializeLobby.AppendBoolean(true);
                SerializeLobby.AppendBoolean(true);
                SerializeLobby.AppendUInt(0);
                SerializeLobby.AppendUInt(6);
                SerializeLobby.AppendUInt(0);
                SerializeLobby.AppendString("0.4");
                SerializeLobby.AppendString("-2.0");
                SerializeLobby.AppendString("0.1");
                SerializeLobby.AppendString("0.2");
                SerializeLobby.AppendUInt(100);
                SerializeLobby.AppendUInt(1);
                SerializeLobby.AppendString("0.5");
                SerializeLobby.AppendString("-2.0");
                SerializeLobby.AppendString("0.1");
                SerializeLobby.AppendString("0.15");
                SerializeLobby.AppendUInt(150);
                SerializeLobby.AppendUInt(2);
                SerializeLobby.AppendString("0.7");
                SerializeLobby.AppendString("-1.2");
                SerializeLobby.AppendString("0.2");
                SerializeLobby.AppendString("0.2");
                SerializeLobby.AppendUInt(100);
                SerializeLobby.AppendUInt(3);
                SerializeLobby.AppendString("0.9");
                SerializeLobby.AppendString("-1.5");
                SerializeLobby.AppendString("0.2");
                SerializeLobby.AppendString("0.2");
                SerializeLobby.AppendUInt(200);
                SerializeLobby.AppendUInt(4);
                SerializeLobby.AppendString("1.1");
                SerializeLobby.AppendString("-1.5");
                SerializeLobby.AppendString("0.15");
                SerializeLobby.AppendString("0.15");
                SerializeLobby.AppendUInt(300);
                SerializeLobby.AppendUInt(5);
                SerializeLobby.AppendString("1.5");
                SerializeLobby.AppendString("-2.0");
                SerializeLobby.AppendString("0.15");
                SerializeLobby.AppendString("0.2");
                SerializeLobby.AppendUInt(200);
                SerializeLobby.AppendUInt(3);
                SerializeLobby.AppendUInt(0);
                SerializeLobby.AppendInt32(Player.UClient.Basejump_Bigparachutes > 3 ? 3 : Player.UClient.Basejump_Bigparachutes);
                SerializeLobby.AppendUInt(1);
                SerializeLobby.AppendInt32(Player.UClient.Basejump_Missiles > 3 ? 3 : Player.UClient.Basejump_Missiles);
                SerializeLobby.AppendUInt(2);
                SerializeLobby.AppendInt32(Player.UClient.Basejump_Shields > 3 ? 3 : Player.UClient.Basejump_Shields);
                SerializeLobby.AppendInt32(Lobbys[LobbyId].Players.Count);
                foreach (GamePlayer AllPlayboy in Lobbys[LobbyId].Players)
                {
                    SerializeLobby.AppendInt32(AllPlayboy.UserId);
                    SerializeLobby.AppendString(AllPlayboy.Username);
                    SerializeLobby.AppendString("http://localhost/getlook.php?figure=" + Essential.GetGame().GetClientManager().GetClientByHabbo(AllPlayboy.Username).GetHabbo().Figure);
                    SerializeLobby.AppendString(Essential.GetGame().GetClientManager().GetClientByHabbo(AllPlayboy.Username).GetHabbo().Gender);
                    SerializeLobby.AppendString("hhfi");
                    SerializeLobby.AppendUInt(1);
                    SerializeLobby.AppendString("BaseJumpMissile");
                    SerializeLobby.AppendInt32(1);
                        SerializeLobby.AppendString("http://localhost/swf/c_images/album1584/ADM.gif");
                }
           /*     SerializeLobby.AppendInt32(2);
                SerializeLobby.AppendString("Testityyppi");
                SerializeLobby.AppendString("http://localhost/swf/games/gamecenter_basejump/avatarimage.png");
                SerializeLobby.AppendString("F");
                SerializeLobby.AppendString("hhfi");
                SerializeLobby.AppendUInt(1);
                SerializeLobby.AppendString("BaseJumpMissile");
                SerializeLobby.AppendUInt(1);
                SerializeLobby.AppendString("http://localhost/swf/c_images/album1584/ADM.gif");
                SerializeLobby.AppendInt32(4);
                SerializeLobby.AppendString("Testityyppi2");
                SerializeLobby.AppendString("http://localhost/swf/games/gamecenter_basejump/avatarimage.png");
                SerializeLobby.AppendString("F");
                SerializeLobby.AppendString("hhfi");
                SerializeLobby.AppendUInt(1);
                SerializeLobby.AppendString("BaseJumpMissile");
                SerializeLobby.AppendUInt(1);
                SerializeLobby.AppendString("http://localhost/swf/c_images/album1584/ADM.gif");
                SerializeLobby.AppendInt32(3);
                SerializeLobby.AppendString("Testityyppi5");
                SerializeLobby.AppendString("http://localhost/swf/games/gamecenter_basejump/avatarimage.png");
                SerializeLobby.AppendString("F");
                SerializeLobby.AppendString("hhfi");
                SerializeLobby.AppendUInt(1);
                SerializeLobby.AppendString("BaseJumpMissile");
                SerializeLobby.AppendUInt(1);
                SerializeLobby.AppendString("http://localhost/swf/c_images/album1584/ADM.gif");
                */
                using (System.IO.StreamWriter file = new System.IO.StreamWriter(@"C:\filut\testit.txt", true))
                {
                    file.WriteLine(SerializeLobby.ToString());
                }
                Player.UClient.SendMessage(SerializeLobby);
            }
          
        }
开发者ID:RootkitR,项目名称:Essential-5.1,代码行数:101,代码来源:GamesManager.cs


注:本文中的Essential.Messages.ServerMessage.ToString方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。