Ejemplo n.º 1
0
 public void CreateDeterministicSubwave()
 {
     toBuild         = CreateInstance("WaveScriptable") as WaveScriptable;
     showPanel       = true;
     showRandomPanel = false;
     panel.Reset();
 }
Ejemplo n.º 2
0
 public void CreateRandomSubwave()
 {
     toBuild         = CreateInstance("RandomWaveScriptable") as WaveScriptable;
     showRandomPanel = true;
     showPanel       = false;
     randompanel.Reset();
 }
    void Import()
    {
        // 读取 json
        var            waves = JsonUtility.FromJson <WaveScriptable.WaveScriptableWrapper>(jsonStr);
        WaveScriptable asset = ScriptableObject.CreateInstance <WaveScriptable>();

        asset.waves = waves.waves;
        AssetDatabase.CreateAsset(asset, "Assets/New.asset");
        AssetDatabase.SaveAssets();

        Selection.activeObject = asset;
    }
Ejemplo n.º 4
0
    void Start()
    {
        // 判断使用哪一个关卡
        if (GameManager.Instance.shouldGotoTutorial)
        {
            stageWaves    = tutorialWaveScriptable;
            waveHint.text = "";
        }
        else
        {
            // 如果不是到教程关,就根据难度选择关卡
            stageWaves    = GameManager.Instance.GetWaveScriptableByCurrentDifficulty();
            waveHint.text = "难度:" + GameManager.Instance.GetCurrentDifficultyName();
        }
        // 计算总怪数
        foreach (var wave in stageWaves.waves)
        {
            stageTotalEnemyCount += wave.waveEles.Length;
        }

        FadeInEffect(() => {
            RealStart();
        });
    }
Ejemplo n.º 5
0
 public DeterministicSubWave(WaveScriptable toBuild)
 {
     _speedMultiplier = toBuild.speedMultiplier;
     _delay           = toBuild.timeBetweenFish;
     data             = toBuild.fishInWave;
 }