Exemple #1
0
    public Transform SpawnNextAI(AIController.AIType type)
    {
        if (index < aiSpawnPoints.Count)
        {
            Vector3 nextSpawn = aiSpawnPoints[index];
            lastIndex = index;
            index++;
            switch (type)
            {
            case AIController.AIType.AGGRESSIVE: return(SpawnAggressiveAI(nextSpawn));

            case AIController.AIType.DEFENSIVE: return(SpawnDefensiveAI(nextSpawn));
            }
        }
        if (testBoth && testedAIs < 1)
        {
            testedAIs = 1;
            index     = 0;
            if (aiType == AIController.AIType.AGGRESSIVE)
            {
                aiType = AIController.AIType.DEFENSIVE;
            }
            else
            {
                aiType = AIController.AIType.AGGRESSIVE;
            }
            return(SpawnNextAI(aiType));
        }
        Debug.Log("Alle AIs gespawned.");
        Debug.Log("Ergebnis:\n" + "Distanz\t" + "Zeit\t" + "Stucked\n" + result);
        return(null);
    }
 public AISettings(AIController.AIType type)
 {
     this.type = type;
     if (type == AIController.AIType.AGGRESSIVE)
     {
         minDistance      = 25;
         maxLP            = 10;
         shootDistance    = 40;
         coolDown         = 0.25f;
         accuracy         = 70;
         maxExtraCooldown = 0.25f;
         maxAreaWidth     = 0;
     }
     else
     {
         minDistance      = 40;
         maxLP            = 10;
         shootDistance    = 50;
         coolDown         = 0.25f;
         accuracy         = 70;
         maxExtraCooldown = 0.25f;
         maxAreaWidth     = 0;
     }
 }