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


C# CSteamID.IsValid方法代码示例

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


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

示例1: SetInvitedToGameId

 public void SetInvitedToGameId(ulong gameId)
 {
     CSteamID y = new CSteamID(gameId);
     if (y.IsValid() && (CoopLobby.Instance == null || CoopLobby.Instance.Info.LobbyId != y))
     {
         base.StartCoroutine(this.DelayedInviteReceived(new CoopLobbyInfo(gameId)));
     }
 }
开发者ID:GameDiffs,项目名称:TheForest,代码行数:8,代码来源:AutoJoinAfterMPInvite.cs

示例2: CheckParameters

		private void CheckParameters()
		{
			ulong ulSteamID;
			if (Program.LaunchParameters.ContainsKey("+connect_lobby") && ulong.TryParse(Program.LaunchParameters["+connect_lobby"], out ulSteamID))
			{
				CSteamID lobbySteamId = new CSteamID(ulSteamID);
				if (lobbySteamId.IsValid())
				{
					Main.OpenPlayerSelect(delegate(PlayerFileData playerData)
					{
						Main.ServerSideCharacter = false;
						playerData.SetAsActive();
						Main.menuMode = 882;
						Main.statusText = "Joining...";
						this._lobby.Join(lobbySteamId, new CallResult<LobbyEnter_t>.APIDispatchDelegate(this.OnLobbyEntered));
					});
				}
			}
		}
开发者ID:thegamingboffin,项目名称:Ulterraria_Reborn_GitHub,代码行数:19,代码来源:NetClientSocialModule.cs

示例3: LobbyEnter

 private static void LobbyEnter(LobbyEnter_t param)
 {
     try
     {
         CSteamID id = new CSteamID(param.m_ulSteamIDLobby);
         if (id.IsValid() && param.m_EChatRoomEnterResponse == 1u)
         {
             CoopLobbyInfo lobbyInfo = CoopLobbyManager.GetLobbyInfo(id);
             lobbyInfo.UpdateData();
             CoopLobby.SetActive(lobbyInfo);
             if (CoopLobbyManager.enterCallback != null)
             {
                 CoopLobbyManager.enterCallback();
             }
         }
         else if (CoopLobbyManager.enterFailCallback != null)
         {
             CoopLobbyManager.enterFailCallback();
         }
     }
     finally
     {
         CoopLobbyManager.enterCallback = null;
         CoopLobbyManager.enterFailCallback = null;
     }
 }
开发者ID:GameDiffs,项目名称:TheForest,代码行数:26,代码来源:CoopLobbyManager.cs

示例4: LobbyCreated

 private static void LobbyCreated(LobbyCreated_t param)
 {
     Debug.Log(string.Concat(new object[]
     {
         "LobbyCreated param.m_eResult=",
         param.m_eResult,
         ", lobbyId=",
         param.m_ulSteamIDLobby
     }));
     try
     {
         if (param.m_eResult == EResult.k_EResultOK)
         {
             CSteamID cSteamID = new CSteamID(param.m_ulSteamIDLobby);
             if (cSteamID.IsValid())
             {
                 CoopLobbyInfo coopLobbyInfo = new CoopLobbyInfo(param.m_ulSteamIDLobby);
                 coopLobbyInfo.IsOwner = true;
                 coopLobbyInfo.Name = CoopLobbyManager.createValues.Name;
                 coopLobbyInfo.MemberLimit = CoopLobbyManager.createValues.MemberLimit;
                 CoopLobbyManager.LobbyMatchList_Result = new List<CoopLobbyInfo>();
                 CoopLobbyManager.LobbyMatchList_Result.Add(coopLobbyInfo);
                 CoopLobby.SetActive(coopLobbyInfo);
                 if (TitleScreen.StartGameSetup.Type == TitleScreen.GameSetup.InitTypes.Continue)
                 {
                     SaveSlotUtils.LoadHostGameGUID();
                 }
                 if (CoopLobbyManager.createCallback != null)
                 {
                     try
                     {
                         CoopLobbyManager.createCallback();
                     }
                     catch (Exception var_1_E2)
                     {
                     }
                 }
                 goto IL_10C;
             }
         }
         if (CoopLobbyManager.createFailCallback != null)
         {
             try
             {
                 CoopLobbyManager.createFailCallback();
             }
             catch (Exception var_2_106)
             {
             }
         }
         IL_10C:;
     }
     finally
     {
         CoopLobbyManager.createValues = null;
         CoopLobbyManager.createCallback = null;
         CoopLobbyManager.createFailCallback = null;
     }
 }
开发者ID:GameDiffs,项目名称:TheForest,代码行数:59,代码来源:CoopLobbyManager.cs


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