public Spacer(WeatherKind weather, Int32 temp, WindKind wind, Boolean?decision) { Weather = weather; CelsiusTemperature = temp; Wind = wind; Decision = decision; Guid = Guid.NewGuid(); }
private void ChangeWeather() { if (currentWeather == WeatherKind.Sunny && Random.value < 0.5f) { return; } WeatherKind old = currentWeather; currentWeather = Helper.GetRandomEnum <WeatherKind>(); if (old == currentWeather) { return; } SetWeather(); }
// Use this for initialization void Start() { currentWeather = WeatherKind.Sunny; SetWeather(); }