Beispiel #1
0
    List <int> GeneratePitch(ExpeditionMenu.QuestType type, int nExpedition)
    {
        List <int> forestIndex = new List <int>()
        {
            0, 1, 2, 3, 4, 5, 6, 7, 8, 9
        };
        List <int> cryptIndex = new List <int>()
        {
            0, 1, 2, 3, 4, 5, 6, 7, 8, 9
        };
        List <int> pitchIndex = new List <int>();

        switch (type)
        {
        case ExpeditionMenu.QuestType.Forest:
            for (int i = 0; i < nExpedition; i++)
            {
                int n = Random.Range(0, forestIndex.Count);
                pitchIndex.Add(forestIndex[n]);
                forestIndex.RemoveAt(n);
            }
            break;

        case ExpeditionMenu.QuestType.Crypt:
            for (int i = 0; i < nExpedition; i++)
            {
                int n = Random.Range(0, cryptIndex.Count);
                pitchIndex.Add(cryptIndex[n]);
                cryptIndex.RemoveAt(n);
            }
            break;
        }
        return(pitchIndex);
    }
Beispiel #2
0
    public string expeditionPitch(ExpeditionMenu.QuestType type, int nPitch)
    {
        string pitch = "";

        switch (type)
        {
        case ExpeditionMenu.QuestType.Forest:
            pitch = pitchForest[nPitch];
            break;

        case ExpeditionMenu.QuestType.Crypt:
            pitch = pitchCrypt[nPitch];
            break;
        }

        return(pitch);
    }