コード例 #1
0
        public void InitOutfitsDistribution(int[] activeOutfitsIndexes, int lastOutfitUsed)
        {
            allOutfitsChange.Clear();

            //Disable some outfits
            activeOutfitsIndexes = activeOutfitsIndexes.Where(val => val != 6 && val != 7 && val != 8).ToArray();

            int[] sequence = SharedHelper.GeneratePermutationArray(activeOutfitsIndexes, 18, lastOutfitUsed);

            for (int i = 0; i < sequence.Length; i++)
            {
                allOutfitsChange.Enqueue(sequence[i]);
            }

            #region debug
            string singleStringAllOutfitsChanges = "";
            for (var i = 0; i < allOutfitsChange.Count; i++)
            {
                singleStringAllOutfitsChanges += allOutfitsChange.ToArray()[i] + ",";
            }
            //SharedHelper.Log("singleStringAllOutfitsChanges:\r\n" + singleStringAllOutfitsChanges);
            #endregion
        }