コード例 #1
0
    public void StartLevel(QuestType q = null)
    {
        if (q != null)
        {
            objectiveEnum  = q.objectiveEnum;
            targetValue    = q.targetValue;
            totalEnemyCost = q.totalEnemyCost;
            waveAmount     = q.waveAmount;
            maxCost        = q.maxCost;
            minCost        = q.minCost;
        }

        if (lootManager == null)
        {
            lootManager = FindObjectOfType <LootManager>();
        }
        lootManager.generateLoot(Mathf.RoundToInt((targetValue + 1) * 2f));
        lootManager.spawnLoot();

        if (enemyManager == null)
        {
            enemyManager = FindObjectOfType <EnemyManager>();
        }
        enemyManager.setEnemyManager(totalEnemyCost, waveAmount, maxCost, minCost);
    }