本文整理汇总了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)));
}
}
示例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));
});
}
}
}
示例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;
}
}
示例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;
}
}