當前位置: 首頁>>代碼示例>>C#>>正文


C# Player.GetListName方法代碼示例

本文整理匯總了C#中fCraft.Player.GetListName方法的典型用法代碼示例。如果您正苦於以下問題:C# Player.GetListName方法的具體用法?C# Player.GetListName怎麽用?C# Player.GetListName使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在fCraft.Player的用法示例。


在下文中一共展示了Player.GetListName方法的5個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的C#代碼示例。

示例1: WriteAddEntity

 public void WriteAddEntity( byte id, Player player, Position pos ) {
     if( player == null ) throw new ArgumentNullException( "player" );
     Write( OpCode.AddEntity );
     Write( id );
     Write( player.GetListName() );
     Write( pos.X );
     Write( pos.H );
     Write( pos.Y );
     Write( pos.R );
     Write( pos.L );
 }
開發者ID:fragmer,項目名稱:fCraft,代碼行數:11,代碼來源:PacketWriter.cs

示例2: WriteAddEntity

 public void WriteAddEntity( byte id, Player player, Position pos )
 {
     Write( OutputCodes.AddEntity );
     Write( id );
     Write( player.GetListName() );
     Write( (short)pos.x );
     Write( (short)pos.h );
     Write( (short)pos.y );
     Write( pos.r );
     Write( pos.l );
 }
開發者ID:asiekierka,項目名稱:afCraft,代碼行數:11,代碼來源:PacketWriter.cs

示例3: MakeAddEntity

 internal static Packet MakeAddEntity( Player player, Position pos ) {
     Packet packet = new Packet( 74 );
     packet.data[0] = (byte)OutputCodes.AddEntity;
     packet.data[1] = (byte)player.id;
     ASCIIEncoding.ASCII.GetBytes( player.GetListName().PadRight( 64 ), 0, 64, packet.data, 2 );
     ToNetOrder( pos.x, packet.data, 66 );
     ToNetOrder( pos.h, packet.data, 68 );
     ToNetOrder( pos.y, packet.data, 70 );
     packet.data[72] = pos.r;
     packet.data[73] = pos.l;
     return packet;
 }
開發者ID:fragmer,項目名稱:fCraft,代碼行數:12,代碼來源:PacketWriter.cs

示例4: ReAddEntity

 void ReAddEntity( VisibleEntity entity, Player player, Position newPos ) {
     SendNow( PacketWriter.MakeRemoveEntity( entity.Id ) );
     SendNow( PacketWriter.MakeAddEntity( entity.Id, player.GetListName(), newPos ) );
     entity.LastKnownPosition = newPos;
 }
開發者ID:fragmer,項目名稱:fCraft,代碼行數:5,代碼來源:Session.cs

示例5: AddEntity

 void AddEntity( Player player, Position newPos ) {
     var pos = new VisibleEntity( newPos, freePlayerIDs.Pop(), player.Info.Rank );
     entities.Add( player, pos );
     SendNow( PacketWriter.MakeAddEntity( pos.Id, player.GetListName(), newPos ) );
 }
開發者ID:fragmer,項目名稱:fCraft,代碼行數:5,代碼來源:Session.cs


注:本文中的fCraft.Player.GetListName方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。