33 lines
845 B
C#
33 lines
845 B
C#
using System.Collections;
|
|
using System.Collections.Generic;
|
|
using Script;
|
|
using UnityEngine;
|
|
|
|
public class WeatherManager : MonoBehaviour
|
|
{
|
|
public GameObject ysq;
|
|
public GameObject carglass;
|
|
public GameObject weather_rain;//雨
|
|
public GameObject weather_fog;//雾
|
|
public GameObject weather_snow;//雪
|
|
void Start()
|
|
{
|
|
switch ( GameInfo.instance.carSelectTypeInfo[CarType.天气])
|
|
{
|
|
case "雨天":
|
|
carglass.SetActive(true);
|
|
ysq.GetComponent<Animation>().Play();
|
|
weather_rain.SetActive(true);
|
|
break;
|
|
case "雪天":
|
|
weather_snow.SetActive(true);
|
|
break;
|
|
case "雾天":
|
|
|
|
weather_fog.SetActive(true);
|
|
break;
|
|
}
|
|
}
|
|
|
|
}
|