Esempio n. 1
0
    public void meteoChange(IMeteoStatus status)
    {
        Thorn.SetActive(true);
        Material[] materialArray = renderer.materials;
        if (status.getTemperature() < 10.0)
        {
            Thorn.SetActive(false);
        }
        else if (status.getTemperature() > 25.5)
        {
            Thorn.SetActive(false);
        }
        else
        {
            materialArray[0] = baseMaterial;
        }
        switch (status.getWeatherType())
        {
        case WeatherType.SNOW:
            Thorn.SetActive(false);
            break;

        default:
            break;
        }
        renderer.materials = materialArray;
    }
Esempio n. 2
0
    public void meteoChange(IMeteoStatus status)
    {
        CloudDisappear();
        if (status.getTemperature() < 10.0)
        {
        }
        else if (status.getTemperature() > 25.5)
        {
        }
        else
        {
        }
        switch (status.getWeatherType())
        {
        case WeatherType.SNOW:
            CloudDisappear();
            break;

        case WeatherType.RAIN:
            CloudAppear();
            break;

        default:
            CloudDisappear();
            break;
        }
    }
Esempio n. 3
0
    public void meteoChange(IMeteoStatus status)
    {
        Material[] materialArray = renderer.materials;

        if (status.getTemperature() < 10.0)
        {
            materialArray[1] = ColdMaterial;
        }
        else if (status.getTemperature() > 25.5)
        {
            materialArray[1] = HotMaterial;
        }
        else
        {
            materialArray[1] = baseMaterial;
        }
        switch (status.getWeatherType())
        {
        case WeatherType.SNOW:
            materialArray[1] = SnowMaterial;
            break;

        default:
            break;
        }
        renderer.materials = materialArray;
    }
Esempio n. 4
0
    public void meteoChange(IMeteoStatus status)
    {
        Node[]       nodes    = this.gameObject.GetComponentsInChildren <Node>();
        MeshCollider collider = this.gameObject.GetComponent <MeshCollider>();
        Water        water    = this.gameObject.GetComponent <Water>();

        Material[] materialArray = renderer.materials;

        if (status.getTemperature() < 10.0)
        {
            collider.enabled = true;
            liquid.moving    = false;
            foreach (var item in nodes)
            {
                item.cubeWalkable = true;
            }
            materialArray[0] = IceMaterial;
        }
        else if (status.getTemperature() > 25.5)
        {
            collider.enabled = false;
            liquid.moving    = true;
            foreach (var item in nodes)
            {
                item.cubeWalkable = false;
            }
            materialArray[0] = baseMaterial;
        }
        else
        {
            collider.enabled = false;
            liquid.moving    = true;
            foreach (var item in nodes)
            {
                item.cubeWalkable = false;
            }
            materialArray[0] = baseMaterial;
        }
        switch (status.getWeatherType())
        {
        case WeatherType.SNOW:
            materialArray[0] = IceMaterial;
            collider.enabled = true;
            liquid.moving    = false;
            foreach (var item in nodes)
            {
                item.cubeWalkable = true;
            }
            break;

        default:
            break;
        }
        renderer.materials = materialArray;
    }
Esempio n. 5
0
    public void meteoChange(IMeteoStatus status)
    {
        PauseEverything();
        if (status.getWeatherType() == WeatherType.NO)
        {
            if (hasWater)
            {
                waterFlow.UnPause();
            }
        }
        if (status.getWeatherType() == WeatherType.RAIN)
        {
            if (hasWater)
            {
                waterFlow.UnPause();
            }
        }
        if (status.getWeatherType() == WeatherType.SNOW)
        {
            if (hasWater)
            {
                waterFlow.Pause();
            }
        }

        if (status.getTemperature() < 10.0)
        {
            if (hasWater)
            {
                waterFlow.Pause();
            }
        }
        else if (status.getTemperature() > 25.5)
        {
            if (hasWater)
            {
                waterFlow.UnPause();
            }
        }
    }
Esempio n. 6
0
 public void meteoChange(IMeteoStatus status)
 {
     if (status.getTemperature() < 10.0)
     {
         currentStep = coldStep;
     }
     else if (status.getTemperature() > 25.5)
     {
         currentStep = hotStep;
     }
     if (status.getWeatherType() == WeatherType.NO)
     {
         currentStep = normalStep;
     }
     if (status.getWeatherType() == WeatherType.RAIN)
     {
         currentStep = rainStep;
     }
     if (status.getWeatherType() == WeatherType.SNOW)
     {
         currentStep = snowStep;
     }
 }