Exemplo n.º 1
0
 public Spacer(WeatherKind weather, Int32 temp, WindKind wind, Boolean?decision)
 {
     Weather            = weather;
     CelsiusTemperature = temp;
     Wind     = wind;
     Decision = decision;
     Guid     = Guid.NewGuid();
 }
Exemplo n.º 2
0
    private void ChangeWeather()
    {
        if (currentWeather == WeatherKind.Sunny && Random.value < 0.5f)
        {
            return;
        }
        WeatherKind old = currentWeather;

        currentWeather = Helper.GetRandomEnum <WeatherKind>();
        if (old == currentWeather)
        {
            return;
        }
        SetWeather();
    }
Exemplo n.º 3
0
 // Use this for initialization
 void Start()
 {
     currentWeather = WeatherKind.Sunny;
     SetWeather();
 }