public double GetDriveTimeInYears() { long distance = distances[AlienPlanet.ToLower()]; int speed = mph[ModeOfTransport.ToLower()]; int hours = (int)(distance / speed); TimeSpan ts = new TimeSpan(hours, 0, 0); return(ts.TotalDays / 365); }
// Use this for initialization void Awake() { _state = 0; _timer = 0; _root = GetComponent <RootController>(); _meteoriteGenerator = GameObject.Find("MeteoriteManager").GetComponent <MeteoriteGenerator>(); _alienPlanet = GameObject.Find("AlienPlanet").GetComponent <AlienPlanet>(); _alienAttackManager = GameObject.Find("AlienAttackManager").GetComponent <AlienAttackManager>(); _alienAttackManager.SetEnable(false); for (int i = 0; i < _signal.Length; i++) { _signal[i].SetActive(false); } _coordinate.SetActive(false); }
public double GetAlienAge() { double coefficient = ageEffects[AlienPlanet.ToLower()]; return(EarthAgeInYears / coefficient); }