本文整理汇总了C#中Critter.ModifyEvoPts方法的典型用法代码示例。如果您正苦于以下问题:C# Critter.ModifyEvoPts方法的具体用法?C# Critter.ModifyEvoPts怎么用?C# Critter.ModifyEvoPts使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Critter
的用法示例。
在下文中一共展示了Critter.ModifyEvoPts方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: RefundEvo
public void RefundEvo(Critter critter)
{
if (critter.activeEvos.Contains(this)) {
if(cost > 0)
{
critter.ModifyEvoPts(cost - 1);
}
Deactivate(critter);
UnlockEvo(critter);
}
critter.statUpdateQueued = true;
}
示例2: BuyEvo
public void BuyEvo(Critter critter)
{
float pts = critter.GetEvoPts();
if (pts >= cost && !critter.activeEvos.Contains(this)) {
Activate(critter);
critter.ModifyEvoPts(-cost);
if(isMajor && !critter.GetIsPlayer()){
EquipOpenSlot(critter);
}
}
critter.statUpdateQueued = true;
}
示例3: Generate
//Runs Generators to create values for each species.
public void Generate(Hex hex, bool isPlayer)
{
name = "Bob " + num; num++;
GenerateSize();
GameObject creature = Instantiate(Creature, transform.position, Quaternion.identity) as GameObject;
critter = creature.GetComponent<Critter>();
//Assigns generated values for each Species after being Instantiated.
creature.name = name;
critter.SetName (name);
critter.SetNumber(critterCount);
critter.SetIsPlayer(isPlayer);
critter.SetSize(size);
baseFoodValue = (size*size) * 10;
critter.SetBaseFoodValue(baseFoodValue);
critter.SetSpeed(StatGenerator());
critter.SetSneak(StatGenerator());
critter.SetSense(StatGenerator());
critter.SetOffense(StatGenerator());
critter.SetDefense(StatGenerator());
critter.ModifyEvoPts(startEvoPts);
critter.adultPopulations.Add(startPop);
critter.cubPopulations.Add(startPop * .25f);
critter.babyPopulations.Add(startPop * .25f);
CreateCritterLists(critterCount);
AddToLocalCritterList(critter, hex);
critter.InitializeSlots();
critter.ResetPreferences();
UnlockCritterStartEvos(critter);
if (isPlayer){
Player player = FindObjectOfType<Player>();
critter.SetName(player.GetCritterName());
critter.SetTokenSprite(player.GetCritterTokenSprite());
critter.SetTokenColor(player.GetCritterTokenColor());
player.SetCritter(critter);
hex.SetPlayerHab(true);
}else if(!isPlayer){
critter.SetTokenSprite(SelectSprite());
critter.SetTokenColor(GenerateColor());
critter.GenerateTokens();
}
critter.InitializePopsList();
critterCount++;
}