示例#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);
    }
示例#2
0
 public QuestType(ObjectiveEnum objectiveEnum, int targetValue, int totalEnemyCost, int waveAmount, int maxCost, int minCost = 0)
 {
     this.objectiveEnum  = objectiveEnum;
     this.targetValue    = targetValue;
     this.totalEnemyCost = totalEnemyCost;
     this.waveAmount     = waveAmount;
     this.maxCost        = maxCost;
     this.minCost        = minCost;
 }