Exemplo n.º 1
0
    public void InitPS()
    {
        SceneBaseManager sceneBaseManager = GameScenesHandler.Instance.manager.GetSceneManager <SceneBaseManager>();

        ParticleSystem.ShapeModule shapeModule = psFog.shape;
        shapeModule.scale = sceneBaseManager.scaleRangeForFog;
    }
Exemplo n.º 2
0
 public T GetSceneManager <T>() where T : SceneBaseManager
 {
     if (_sceneManager == null)
     {
         _sceneManager = FindWithTag <T>(TagInfo.Tag_SceneManager);
     }
     return(_sceneManager as T);
 }
Exemplo n.º 3
0
    public void InitPS()
    {
        SceneBaseManager sceneBaseManager = GameScenesHandler.Instance.manager.GetSceneManager <SceneBaseManager>();

        ParticleSystem.ShapeModule shapeModule = psCloudy.shape;
        shapeModule.scale    = sceneBaseManager.scaleForSunny;
        shapeModule.position = sceneBaseManager.positionForSunny;
    }
Exemplo n.º 4
0
    /// <summary>
    /// 设置大风
    /// </summary>
    public void SetWind()
    {
        if (objWind_1)
        {
            objWind_1.SetActive(true);
        }
        SceneBaseManager sceneManager = GameScenesHandler.Instance.manager.GetSceneManager <SceneBaseManager>();

        ParticleSystem.ShapeModule shapeModuleWind_1 = psWind_1.shape;
        shapeModuleWind_1.position = sceneManager.positionForWind;
        shapeModuleWind_1.scale    = sceneManager.scaleForWind;

        if (objWind_2)
        {
            objWind_2.SetActive(true);
        }
        ParticleSystem.ShapeModule shapeModuleWind_2 = psWind_1.shape;
        shapeModuleWind_2.scale = sceneManager.scaleRangeForWind;
    }
Exemplo n.º 5
0
    /// <summary>
    /// 设置落叶
    /// </summary>
    public void SetDefoliation()
    {
        if (objWind_1)
        {
            objWind_1.SetActive(true);
        }
        SceneBaseManager sceneManager = GameScenesHandler.Instance.manager.GetSceneManager <SceneBaseManager>();

        ParticleSystem.ShapeModule shapeModule = psWind_1.shape;
        shapeModule.position = sceneManager.positionForWind;
        shapeModule.scale    = sceneManager.scaleForWind;

        if (objDefoliation_1)
        {
            objDefoliation_1.SetActive(true);
        }
        ParticleSystem.ShapeModule shapeModuleDefoliation = psDefoliation_1.shape;
        shapeModuleDefoliation.position = sceneManager.positionForWind;
        shapeModuleDefoliation.scale    = sceneManager.scaleForWind;
    }
Exemplo n.º 6
0
    bool CreateScenePrefab(int sceneID)
    {
        if (sceneID == 0)
        {
            Debug.Log("SceneID is 0!");
            return(false);
        }

        SceneBaseManager smBase = GameObject.FindObjectOfType <SceneBaseManager>();

        if (null != smBase)
        {
            smBase.gameObject.SetActive(false);
        }

        GameObject       game  = new GameObject("SceneCtrl");
        SceneBaseManager scene = null;
        SceneNode        node  = FSDataNodeTable <SceneNode> .GetSingleton().FindDataByType(sceneID);

        if (null == node)
        {
            return(false);
        }
        int type = node.game_type;

        if (type == 6)
        {
            return(false);
        }
        switch (type)
        {
        case 1:
            if (sceneID == 10000)
            {
                if (!GameLibrary.isNetworkVersion)
                {
                    Globe.isFightGuide = true;
                }
                scene = game.AddComponent <SceneNewbieGuide>();
            }
            else
            {
                scene = game.AddComponent <SceneDungeons>();
            }
            scene.sceneType = SceneType.KM; break;

        case 2:
            scene           = game.AddComponent <SceneMoba1>();
            scene.sceneType = SceneType.Dungeons_MB1; break;

        case 3:
            scene           = game.AddComponent <SceneTotalPoints>();
            scene.sceneType = SceneType.TP; break;

        case 4:
            scene           = game.AddComponent <SceneEscort>();
            scene.sceneType = SceneType.KV; break;

        case 5:
            scene           = game.AddComponent <SceneTowerDefence>();
            scene.sceneType = SceneType.TD; break;
        }
        scene.CreateScenePrefab(game);
        return(true);
    }