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


C# EPersistenceID类代码示例

本文整理汇总了C#中EPersistenceID的典型用法代码示例。如果您正苦于以下问题:C# EPersistenceID类的具体用法?C# EPersistenceID怎么用?C# EPersistenceID使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


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

示例1: CChatPlayer

 // Construction
 public CChatPlayer( EPersistenceID persistence_id, ESessionID session_id, string name, List< EPersistenceID > ignore_list )
 {
     PersistenceID = persistence_id;
     SessionID = session_id;
     Name = name;
     ignore_list.ShallowCopy( m_IgnoreList );
 }
开发者ID:bretambrose,项目名称:CatalogueRaisonnePublic,代码行数:8,代码来源:ChatPlayer.cs

示例2: Clone_By_Observer

		// Public interface
		public CGameState Clone_By_Observer( EPersistenceID observer, bool is_admin )
		{
			CGameState game_state = new CGameState();

			// Unconditional cloning
			game_state.CurrentTurnIndex = CurrentTurnIndex;
			game_state.Mode = Mode;

			DiscardPiles.FullClone( game_state.m_DiscardPiles );
			m_TurnSequence.ShallowCopy( game_state.m_TurnSequence );

			foreach ( var side_pair in m_CardCollections )
			{
				Dictionary< ECardColor, CCardCollection > collection_dictionary = new Dictionary< ECardColor, CCardCollection >();
				game_state.m_CardCollections.Add( side_pair.Key, collection_dictionary );

				side_pair.Value.FullClone( collection_dictionary );
			}

			// Conditional cloning
			m_PlayerHands.VarClone( game_state.m_PlayerHands, n => ( is_admin || observer == n.Key ) ? EGameStateClonePermission.Full : EGameStateClonePermission.Hidden );

			game_state.m_Deck = m_Deck.Clone( is_admin ? EGameStateClonePermission.Full : EGameStateClonePermission.Hidden ) as CDeck;

			return game_state;
		}
开发者ID:bretambrose,项目名称:CatalogueRaisonnePublic,代码行数:27,代码来源:GameState.cs

示例3: Check_Join

        public EJoinLobbyFailureReason Check_Join( EPersistenceID player_id )
        {
            CPersistentPlayerData creator_player_data = CDatabaseProxy.Instance.Get_Player_Data( Creator );
            if ( creator_player_data.IgnoreList.Contains( player_id ) )
            {
                return EJoinLobbyFailureReason.Creator_Is_Ignoring_You;
            }

            if ( !Can_Be_Joined() )
            {
                return EJoinLobbyFailureReason.Lobby_Full;
            }

            if ( Is_Banned( player_id ) )
            {
                return EJoinLobbyFailureReason.Banned;
            }

            if ( Password != null && Password.Length > 0 )
            {
                return EJoinLobbyFailureReason.Password_Mismatch;
            }

            return EJoinLobbyFailureReason.None;
        }
开发者ID:bretambrose,项目名称:CatalogueRaisonnePublic,代码行数:25,代码来源:ServerLobby.cs

示例4: Add_Player_To_Ignore_List

 private void Add_Player_To_Ignore_List( EPersistenceID player_id, EPersistenceID ignored_id )
 {
     CChatPlayer player_data = Get_Player_By_Persistence_ID( player_id );
     if ( player_data != null )
     {
         player_data.Add_Ignored_Player( ignored_id );
     }
 }
开发者ID:bretambrose,项目名称:CatalogueRaisonnePublic,代码行数:8,代码来源:ChatServer.cs

示例5: Remove_Member

 public void Remove_Member( EPersistenceID player_id )
 {
     MatchState.Remove_Observer( player_id );
     if ( MatchState.Remove_Player( player_id ) )
     {
         CClientPlayerInfoManager.Instance.End_Player_Listen( player_id, EPlayerListenReason.In_Match );
     }
 }
开发者ID:bretambrose,项目名称:CatalogueRaisonnePublic,代码行数:8,代码来源:ClientMatchInstance.cs

示例6: Add_Channel_To_Player

 private void Add_Channel_To_Player( EPersistenceID player_id, EChannelID channel_id )
 {
     CChatPlayer player = Get_Player_By_Persistence_ID( player_id );
     if ( player != null )
     {
         player.Add_Channel( channel_id );
     }
 }
开发者ID:bretambrose,项目名称:CatalogueRaisonnePublic,代码行数:8,代码来源:ChatServer.cs

示例7: Join_General_Channel

        // Player ops
        public static void Join_General_Channel( EPersistenceID player_id, EMessageRequestID client_request_id )
        {
            ESessionID session_id = CConnectedPlayerManager.Instance.Get_Active_Player_Session_ID( player_id );

            Change_System_Channel( player_id,
                                          CConnectedPlayerManager.Instance.GeneralChatChannel,
                                          EChannelGameProperties.OrdinarySingletonMask,
                                          delegate( CResponseMessage response ) { On_Join_General_Channel_Response( response, session_id, client_request_id ); } );
        }
开发者ID:bretambrose,项目名称:CatalogueRaisonnePublic,代码行数:10,代码来源:BackendAsyncOperations.cs

示例8: Handle_Ignore_Player_Request

        private void Handle_Ignore_Player_Request( CIgnorePlayerRequest message, EPersistenceID source_player )
        {
            CAddIgnoredPlayerPersistenceRequest ignore_request = new CAddIgnoredPlayerPersistenceRequest( source_player, message.PlayerName );
            ignore_request.Handler = delegate( CPersistenceResponse response )
            {
                On_Ignore_Persistence_Return( response, message.RequestID, source_player );
            };

            CDatabaseProxy.Instance.Submit_Request( ignore_request );
        }
开发者ID:bretambrose,项目名称:CatalogueRaisonnePublic,代码行数:10,代码来源:ServerSocialManager.cs

示例9: Is_Ignoring

        // Methods
        // Public interface
        public static bool Is_Ignoring( EPersistenceID source_player_id, EPersistenceID target_player_id )
        {
            CPersistentPlayerData source_data = CDatabaseProxy.Instance.Get_Player_Data( source_player_id );
            if ( source_data == null )
            {
                return false;
            }

            return source_data.IgnoreList.Contains( target_player_id );
        }
开发者ID:bretambrose,项目名称:CatalogueRaisonnePublic,代码行数:12,代码来源:ServerSocialManager.cs

示例10: CConnectedPlayer

 // Construction
 public CConnectedPlayer( EPersistenceID persistence_id, ESessionID session_id, string name )
 {
     PersistenceID = persistence_id;
     SessionID = session_id;
     Name = name;
     LobbyID = ELobbyID.Invalid;
     MatchID = EMatchInstanceID.Invalid;
     State = EConnectedPlayerState.Chat_Idle;
     ConnectionState = EConnectedPlayerConnectionState.Connecting;
 }
开发者ID:bretambrose,项目名称:CatalogueRaisonnePublic,代码行数:11,代码来源:ConnectedPlayer.cs

示例11: CClientPlayerInfo

        public CClientPlayerInfo( EPersistenceID persistence_id, string player_name )
            : base(persistence_id)
        {
            if ( player_name != null )
            {
                Name = player_name;
            }

            Initialized = false;
        }
开发者ID:bretambrose,项目名称:CatalogueRaisonnePublic,代码行数:10,代码来源:ClientPlayerInfoManager.cs

示例12: On_Player_Connection_State_Change

 public void On_Player_Connection_State_Change( EPersistenceID player_id, bool is_connected )
 {
     if ( is_connected )
     {
         MatchState.On_Player_Reconnect( player_id );
     }
     else
     {
         MatchState.On_Player_Disconnect( player_id );
     }
 }
开发者ID:bretambrose,项目名称:CatalogueRaisonnePublic,代码行数:11,代码来源:ClientMatchInstance.cs

示例13: CServerLobbyBrowser

        // Construction
        public CServerLobbyBrowser( EPersistenceID player_id, CBrowseLobbyMatchCriteria browse_criteria, bool join_first_available )
        {
            PlayerID = player_id;

            WatchStartInterval = ELobbyID.Invalid;
            WatchEndInterval = ELobbyID.Invalid;

            BrowseCriteria = browse_criteria;

            JoinFirstAvailable = join_first_available;
        }
开发者ID:bretambrose,项目名称:CatalogueRaisonnePublic,代码行数:12,代码来源:ServerLobbyBrowser.cs

示例14: Get_Player_Log_Name

 public static string Get_Player_Log_Name( EPersistenceID persistence_id )
 {
     CConnectedPlayer player = Instance.Get_Player_By_Persistence_ID( persistence_id );
     if ( player != null )
     {
         return player.Name;
     }
     else
     {
         return String.Format( "Player#{0}", (int)persistence_id );
     }
 }
开发者ID:bretambrose,项目名称:CatalogueRaisonnePublic,代码行数:12,代码来源:ConnectedPlayerManager.cs

示例15: Create_Lobby_Chat_Channel

        // Public interface
        // Operations
        // Channel Creation
        public static void Create_Lobby_Chat_Channel( CChatChannelConfig channel_config, ELobbyID lobby_id, EPersistenceID source_player )
        {
            CCreateChatChannelRequestServerMessage create_lobby_channel_message = new CCreateChatChannelRequestServerMessage( channel_config );
            create_lobby_channel_message.Handler =
                delegate( CResponseMessage response )
                {
                    CCreateChatChannelResponseServerMessage response_msg = response as CCreateChatChannelResponseServerMessage;
                    On_Lobby_Chat_Channel_Creation_Response( lobby_id, source_player, response_msg );
                };

            CServerMessageRouter.Send_Message_To_Chat_Server( create_lobby_channel_message );
        }
开发者ID:bretambrose,项目名称:CatalogueRaisonnePublic,代码行数:15,代码来源:BackendAsyncOperations.cs


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