本文整理汇总了C#中Critter.ResetAllXP方法的典型用法代码示例。如果您正苦于以下问题:C# Critter.ResetAllXP方法的具体用法?C# Critter.ResetAllXP怎么用?C# Critter.ResetAllXP使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Critter
的用法示例。
在下文中一共展示了Critter.ResetAllXP方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Clone
public void Clone(Critter originalCritter, Hex habitat)
{
name = "Bob " + num; num++;
GameObject newCreature = originalCritter.gameObject;
EvolutionList originList = originalCritter.GetComponent<EvolutionList>();
GameObject creature = Instantiate(newCreature, newCreature.transform.position, Quaternion.identity) as GameObject;
critter = creature.GetComponent<Critter>();
creature.name = name;
critter.SetName (name);
critter.SetNumber(critterCount);
critter.CloneStats(originalCritter);
baseFoodValue = (size * size) * 10;
critter.SetBaseFoodValue(baseFoodValue);
critter.SetTokenSprite(SelectSprite());
critter.SetTokenColor(originalCritter.GetTokenColor());
critter.GenerateDiet();
critter.GenerateLocomotion();
critter.SetIsPlayer(false);
critter.ResetAllXP();
critter.adultPopulations.Clear();
critter.cubPopulations.Clear();
critter.babyPopulations.Clear();
critter.ClearTokenList();
critter.habitats.Clear();
CreateCritterLists(critterCount);
AddToLocalCritterList(critter, habitat);
critter.adultPopulations.Add(.5f * startPop);
critter.babyPopulations.Add(.2f * startPop);
critter.cubPopulations.Add(.1f * startPop);
critter.GenerateTokens();
creature.GetComponent<EvolutionList>().ClearChildren();
originList.AddNewChild(critter, TurnTimer.currentTurn);
critter.SetSplinterEvoStart();
critter.InitializePopsList();
critterCount++;
}