本文整理汇总了C#中Profile.RecoverHP方法的典型用法代码示例。如果您正苦于以下问题:C# Profile.RecoverHP方法的具体用法?C# Profile.RecoverHP怎么用?C# Profile.RecoverHP使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Profile
的用法示例。
在下文中一共展示了Profile.RecoverHP方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Start
// Use this for initialization
void Start()
{
//Randomly decide which player goes first
if (Random.Range(1,3) == 2) playerTurn = PlayerIndex.One;
else playerTurn = PlayerIndex.Two;
player1 = new Player();
player2 = new Player();
if(!fromUpdate){
if (temp1 == null)
{
temp1 = GameObject.Find("default1").GetComponent<PlayerCard>();
}
PassStats((Player)player1, temp1, out player1);
if (temp2 == null)
{
temp2 = GameObject.Find("default2").GetComponent<PlayerCard>();
}
PassStats((Player)player2, temp2, out player2);
}
else{
passPlayer ((Player)playTemp1, out player1);
passPlayer ((Player)playTemp2, out player2);
}
player1.playerIndex = PlayerIndex.One;
player2.playerIndex = PlayerIndex.Two;
player1.RecoverHP(player1.hpMax);
player2.RecoverHP(player2.hpMax);
player1.UseEndurance(player1.enduranceMax);
player2.UseEndurance(player2.enduranceMax);
player1.profileObject = player1Object;
player2.profileObject = player2Object;
healthBar1Width = healthBar.width;
healthBar2Width = healthBar.width;
enduranceBar1Height = 0;
enduranceBar2Height = 0;
}