Example #1
0
    public void StartWeather(WeatherEnum weather)
    {
        if (weather == WeatherEnum.Null)
        {
            StopAll();
            return;
        }
        GameObject go;

        dic.TryGetValue(weather, out go);
        if (go != null)
        {
            go.SetActive(true);
        }
        else
        {
            string path = FilePathTools.GetParticle(weather.ToString());
            AssetsManager.Instance.LoadAssetAsync <GameObject>(path, (res) =>
            {
                ConfigWeather(weather, res);
            });
        }
    }