예제 #1
0
    public void StageReset()
    {
        stageClearPopUp.SetActive(false);
        gameManager.SetCSt(true);

        fusionManager.enemyBuildingScript.Reset();
        fusionManager.buildingScript.Reset();

        fusionManager.SetUnitNO(0);
        fusionManager.SetEnemyUnitNO(0);

        useMoneyNum        = 0;
        deathPlayerUnitNum = 0;
        killedEnemyUnitNum = 0;

        saveData.maxStatLev = 5 + 5 * (saveData.maxReachedStage / 10);

        foreach (var item in fusionManager.unitScript)
        {
            item.Destroye();
        }

        fusionManager.unitScript = new UnitScript[0];
        fusionManager.SetUnitNum(1);
        foreach (var item in fusionManager.enemyScript)
        {
            item.Destroye();
        }
        fusionManager.enemyScript = new EnemyScript[0];
        fusionManager.SetEnemyUnitNum(1);

        while (fusionManager.projectionScripts.Count > 0)
        {
            if (fusionManager.projectionScripts[0] != null)
            {
                Destroy(fusionManager.projectionScripts[0].gameObject);
                fusionManager.projectionScripts.Remove(fusionManager.projectionScripts[0]);
            }
            else if (fusionManager.projectionScripts[0] == null)
            {
                Destroy(fusionManager.projectionScripts[0].gameObject);
                fusionManager.projectionScripts.Remove(fusionManager.projectionScripts[0]);
            }
        }

        gameManager.Reset();
    }
예제 #2
0
    private void PlusEnemyNum()
    {
        fusionManager.SetEnemyUnitNum(thisUnitNum = fusionManager.GetEnemyUnitNum() + 1);

        fusionManager.SetEnemyUnitNO(thisUnitNO = fusionManager.GetEnemyUnitNO() + 1d);
    }