예제 #1
0
    public void InitAllyPlayerId(System.Random rand)
    {
        allyPlayerIdDic.Clear();
        allyPlayerIdDic.Add(0, AdventureAlly.DefaultPlayerId);
        allyPlayerIdDic.Add(1, AdventureAlly.PujaStartPlayerId);
        int        i            = 2;
        List <int> playerIdList = new List <int> ();

        for (int j = 0; j < PujaAllyCount - 1; j++)
        {
            playerIdList.Add(AdventureAlly.PujaStartPlayerId + 1 + j);
        }
        for (int j = 0; j < PajaAllyCount; j++)
        {
            playerIdList.Add(AdventureAlly.PajaStartPlayerId + j);
        }
        for (int j = 0; j < EnemyNpcAllyCount; j++)
        {
            playerIdList.Add(AdventureAlly.EnemyNpcStartPlayerId + j);
        }
        VArtifactUtil.Shuffle(playerIdList, rand);
        for (; i < AllyCount; i++)
        {
            allyPlayerIdDic.Add(i, playerIdList[i - 2]);
        }
        foreach (KeyValuePair <int, int> kvp in allyPlayerIdDic)
        {
            Debug.Log("ally: " + kvp.Key + " playerId:" + kvp.Value);
        }
    }
예제 #2
0
    public void InitAllyColor(System.Random myRand)
    {
        allyColor.Clear();
        allyColor.Add(0, 0);
        List <int> colorList = new List <int> ();

        for (int i = 1; i < AllyCount; i++)
        {
            colorList.Add(i);
        }
        VArtifactUtil.Shuffle(colorList, myRand);
        for (int i = 1; i < AllyCount; i++)
        {
            allyColor.Add(i, colorList[i - 1]);
        }
        foreach (KeyValuePair <int, int> kvp in allyColor)
        {
            Debug.Log("ally: " + kvp.Key + " color:" + kvp.Value);
        }
    }