本文整理汇总了C#中Critter.GetDefense方法的典型用法代码示例。如果您正苦于以下问题:C# Critter.GetDefense方法的具体用法?C# Critter.GetDefense怎么用?C# Critter.GetDefense使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Critter
的用法示例。
在下文中一共展示了Critter.GetDefense方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: CloneStats
public void CloneStats(Critter critter)
{
offense = critter.GetOffense();
defense = critter.GetDefense();
baseSpeed = critter.GetBaseSpeed();
sense = critter.GetSense();
sneak = critter.GetSneak();
size = critter.GetSize();
breedRate = critter.GetBreedRate();
metabolism = critter.GetMetabolism();
biomePref = critter.GetBiomePrefs();
climateFocus = critter.GetClimateFocus();
climatePref = critter.GetClimatePref();
climateRange = critter.GetClimateRange();
geoPref = critter.GetGeoPrefs();
tempFocus = critter.GetTempFocus();
tempPref = critter.GetTempPref();
tempRange = critter.GetTempRange();
evoMod = critter.GetEvoMod();
migrateMod = critter.GetMigrateMod();
}
示例2: PopulateSliders
private void PopulateSliders(Critter critter)
{
statSliders[0].value = critter.GetOffense();
statSliders[1].value = critter.GetDefense();
statSliders[2].value = critter.GetSpeed();
statSliders[3].value = critter.GetSense();
statSliders[4].value = critter.GetSneak();
subStatSliders[0].value = critter.GetSize();
subStatSliders[1].value = critter.GetBreedRate();
subStatSliders[2].value = critter.GetEfficiency();
subStatSliders[3].value = critter.GetMetabolism();
}
示例3: IsThreat
//Determines if this critter is a threat
public bool IsThreat(Critter critter)
{
bool isThreat;
float score;
float attackerThreat = GetThreatScore();
score = (Mathf.Round(100*(critter.GetDefense() + critter.GetSpeed() + (critter.GetSneak()/2))));
score = score / 100;
if((score * 1.05) < attackerThreat){
isThreat = true;
}
else{
isThreat = false;
}
return isThreat;
}