本文整理汇总了C#中PhotonPlayer.GetScore方法的典型用法代码示例。如果您正苦于以下问题:C# PhotonPlayer.GetScore方法的具体用法?C# PhotonPlayer.GetScore怎么用?C# PhotonPlayer.GetScore使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类PhotonPlayer
的用法示例。
在下文中一共展示了PhotonPlayer.GetScore方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: LoadPlayerData
/// <summary>
/// Loads the character body from the PhotonPlayer data.
/// </summary>
/// <param name="playerToLoad">Photonplayer of which the character body is loaded.</param>
public void LoadPlayerData(PhotonPlayer playerToLoad)
{
player = playerToLoad;
nameText.text = player.name;
object value;
if (player.customProperties.TryGetValue("gameState", out value))
{
int stateInt = (int)value;
if ((GameControl.GAMESTATE)stateInt == GameControl.GAMESTATE.MissionCompleted)
{
recentScoreObject.SetActive(true);
recentScoreText.text = player.GetScore().ToString();
}
}
character = new Character(player.customProperties);
character.InstantiateBody(characterContainer.transform);
}
示例2: ShowRecentScore
/// <summary>
/// Shows the score of the player if gamestate is MissionCompleted.
/// </summary>
/// <param name="recievedPlayer">Player which score is being recieved.</param>
/// <param name="state">Gamestate of the recieved player</param>
private void ShowRecentScore(PhotonPlayer recievedPlayer, GameControl.GAMESTATE state)
{
if (player == recievedPlayer && state == GameControl.GAMESTATE.MissionCompleted)
{
recentScoreObject.SetActive(true);
recentScoreText.text = recievedPlayer.GetScore().ToString();
}
}