public void UpdateFeatures() { if (!this.textsCreated) { this.textsCreated = true; this.CreateTextsAndSetPosition(); } bool showWorldFeatures = Find.PlaySettings.showWorldFeatures; for (int i = 0; i < this.features.Count; i++) { Vector3 position = WorldFeatures.texts[i].Position; bool flag = showWorldFeatures && !WorldRendererUtility.HiddenBehindTerrainNow(position); if (flag != WorldFeatures.texts[i].Active) { WorldFeatures.texts[i].SetActive(flag); WorldFeatures.texts[i].WrapAroundPlanetSurface(); } if (flag) { this.UpdateAlpha(WorldFeatures.texts[i], this.features[i]); } } }
public static bool HiddenBehindTerrainNow(this WorldObject o) { return(WorldRendererUtility.HiddenBehindTerrainNow(o.DrawPos)); }