本文整理汇总了C#中Team.Load方法的典型用法代码示例。如果您正苦于以下问题:C# Team.Load方法的具体用法?C# Team.Load怎么用?C# Team.Load使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Team
的用法示例。
在下文中一共展示了Team.Load方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: DeleteTeam
void DeleteTeam()
{
var team = new Team(teamId);
StartCoroutine(team.Delete(error => {
Debug.LogError("Delete Team Failed: " + error.Message);
}, success => {
// Check Deleted.
var checkDelete = new Team(teamId);
StartCoroutine(checkDelete.Load(error => {
Debug.Log(error.Message);
if (error.Message.Equals("Could not find teams.")) {
// Passed!
Debug.Log("Delete Team Passed!");
} else {
// Actual error.
Debug.LogError("Delete Team Failed: " + error.Message);
}
}, deleteTestSuccess => {
// This shouldn't happen!
Debug.LogError("Delete Team Failed!");
}));
}));
}
示例2: LoadTeam
void LoadTeam()
{
var team = new Team(teamId);
StartCoroutine(team.Load(error => {
Debug.LogError("Failed to load Team: " + error.Message);
}, success => {
if (team.Name.Equals(teamName)) {
// Create is known to have passed here.
Debug.Log("Create Team Passed!");
// Load is also known to have passed here.
Debug.Log("Get Team Passed!");
// List Teams.
UpdateTeam();
}
}));
}