private static string GetHeatData(HeatTypes heatTypes, int day, string map) { switch (heatTypes) { case HeatTypes.None: return("[NONE]"); case HeatTypes.CreatureDeath: return(LoadFile(LoadDirectory + day + "\\CreatureDeaths.txt", map)); case HeatTypes.PlayerDeath: return(LoadFile(LoadDirectory + day + "\\PlayerDeaths.txt", map)); case HeatTypes.PlayerMurder: return(LoadFile(LoadDirectory + day + "\\PlayerMurders.txt", map)); case HeatTypes.QuestSuccess: return(LoadFile(LoadDirectory + day + "\\QuestsCompleted.txt", map)); case HeatTypes.ResourceSuccess: return(LoadFile(LoadDirectory + day + "\\ResourceHarvested.txt", map)); case HeatTypes.TamingSuccess: return(LoadFile(LoadDirectory + day + "\\TameCreature.txt", map)); case HeatTypes.VendorBuy: return(LoadFile(LoadDirectory + day + "\\VendorBuy.txt", map)); case HeatTypes.VendorSell: return(LoadFile(LoadDirectory + day + "\\VendorSell.txt", map)); default: return("[DEFAULT]"); } }
public static string LoadFromFile(HeatTypes heatTypes, int day, string map) { string HeatMapData = "[EMPTY]"; if (day < DateTime.Today.DayOfYear) { int Day_Offset = DateTime.Today.DayOfYear - day; StringBuilder sb = new StringBuilder(); for (int i = 0; i <= Day_Offset; i++) { int get_Day = day + i; if (Directory.Exists(LoadDirectory + get_Day + "\\")) { sb.Append(GetHeatData(heatTypes, get_Day, map)); } } HeatMapData = sb.ToString(); } else { if (Directory.Exists(LoadDirectory + day + "\\")) { HeatMapData = GetHeatData(heatTypes, day, map); } } return(HeatMapData); }
public void SetHeatMode(HeatTypes mode) { bool active = mode != HeatTypes.None; HeatCalculator.Type = mode; waterLayer.gameObject.SetActive(!active); soilLayer.gameObject.SetActive(!active); rockLayer.gameObject.SetActive(!active); heatLayer.gameObject.SetActive(active); RunHeatCalculation(); UpdateView(true); }
// Use this for initialization void Start() { BackgroundMode = false; HeatMode = HeatTypes.None; Instance = this; }
public void SetHeatMode(HeatTypes mode) { HeatMode = mode; TerrainControl.Instance.SetHeatMode(mode); }