本文整理汇总了C#中Hex.GetBiome方法的典型用法代码示例。如果您正苦于以下问题:C# Hex.GetBiome方法的具体用法?C# Hex.GetBiome怎么用?C# Hex.GetBiome使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Hex
的用法示例。
在下文中一共展示了Hex.GetBiome方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: UpdatePanel
private void UpdatePanel()
{
if(MapController.hexSelected){
targetHex = MapController.hexSelected.GetComponent<Hex>();
Hex.Biome hexBiome = targetHex.GetBiome();
Hex.BiomeType hexbiomeType = targetHex.GetBiomeType();
Hex.Geography hexGeo = targetHex.GetGeography();
Hex.Vegetation hexVeg = targetHex.GetVegetation();
int hexClimate = (int)targetHex.GetClimateVal();
int hexTemp = (int)targetHex.GetTempVal();
nameElements[0].text = hexBiome.ToString();
nameElements[2].text = hexGeo.ToString();
nameElements[8].text = hexVeg.ToString();
icons[0].sprite = iconControl.GetBiomeTypeIcon(hexbiomeType);
icons[0].color = uiControl.GetBiomeTypeSpriteColor(hexbiomeType);
icons[1].sprite = uiControl.GetGeoSprite(hexGeo);
icons[1].color = uiControl.GetGeoSpriteColor(hexGeo);
icons[2].color = iconControl.GetHexVegColor(hexVeg);
if (!critter)
{
critter = player.GetCritter();
if (!critter)
{
critter = GameController.CritterList[0];
}
}
if (critter){
values[0] = critter.GetBiomePref((Adaptation.BiomeAdaptition)hexbiomeType);
values[1] = critter.GetGeoPref((Adaptation.GeoAdaptation)hexGeo);
values[2] = critter.GetTempPref(hexTemp);
values[3] = critter.GetClimatePref(hexClimate);
for(int i = 0; i < 4; i++){
Text scoreText = nameElements[(i * 2 + 1)];
if(values[i] > 0){
scoreText.color = goodScore;
scoreText.text = "+" + values[i].ToString() + "%";
}
else if(values[i] < 0){
scoreText.color = badScore;
scoreText.text = values[i].ToString() + "%";
}
else{
scoreText.color = zeroScore;
scoreText.text = values[i].ToString() + "%";
}
}
UpdateSliders();
}
if (!critter.GetIsPlayer())
{
critter = null;
}
}
}